domainwidedelegation.comStart free

Use casesEmail operations

Detect and notify users of phishing links in mail

Automate scanning of mailboxes for phishing links and send contextual warnings to affected users before damage is done.

Who it is forSecurity operations and IT teams maintaining user safety at scale.
APIsGmail API, Chat API
Typical scopesgmail.readonly, chat.bot

The problem

Phishing attacks bypass filters and reach user inboxes. Manual review is slow and relies on user reports, so malicious links can be clicked before anyone intervenes.

How it works

  1. Use delegated access to scan recent messages for suspicious URLs using the Gmail API.
  2. Cross-check identified links against threat intelligence or custom blocklists.
  3. For each risky message, trigger a direct notification to the recipient via Chat API or email.
  4. Log flagged messages and notifications for audit and follow-up.

What changes

Users receive near-immediate warnings about specific phishing attempts, reducing the window for compromise and supporting incident response.

The trap in this one. Gmail API's message list and search endpoints can lag several minutes behind delivery, especially under load or in large tenants. This means high-risk mail may not be visible to your scanner until after users have already opened it, and no error is returned — the message simply isn't there yet. Relying on real-time detection from the API will miss some threats, and the delay is not documented or consistent.

Questions people ask

Why not use push notifications or webhooks for new mail?

Gmail API push notifications (watch) are unreliable for high-frequency polling at domain scale and can silently drop events, especially if the notification endpoint lags or rate limits.

Can this be used for post-delivery remediation?

Yes, you can also use the API to label or move messages after detection, but the same indexing lag applies — not all messages will be actionable immediately.

Want this built?

This is a pattern we run in production. We will set up the delegation and build this on top of it — $500 per hour, most of it working the same day.

Talk to us Or read the setup guide

Related use cases

Draft replies automatically in a shared inbox

A delegated service account reads an incoming enquiry, drafts a researched reply in the mailbox, and leaves it for a human to approve and send.

Triage and route inbound mail across a domain

Classify every inbound message, label it, and forward the ones that matter to the person who owns them — without touching a single mail rule.

Send mail as a shared alias from automation

Deliver notifications, confirmations and campaign replies from a branded address like support@ or updates@ without a human in the loop.