Skip to content

Daily

Check links in reported emails for phishing

Links in new mail are checked against a threat database and your security channel hears about any that look dangerous.

Runs
Daily
Apps
Outlook, Slack
AI
Not needed
Access
Mail.Read; chat:write

Send this to your assistant

Create a ClickRuntime automation: every 30 minutes, check the links in new emails in my Outlook Phishing folder against a URL reputation service and post anything risky to #security in Slack.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

At a small accounting firm, staff forward anything suspicious to one person who checks each link by hand. On busy days that review waits until the evening, and a convincing fake invoice can sit in someone's inbox all afternoon.

Checking every link automatically means the security channel gets a verdict within half an hour, so a warning can go out to the whole office before anyone else clicks.

What you get out of it

  • Faster warnings

    A dangerous link is flagged within the half hour, not at the end of the day. The team can warn colleagues while the same email is still landing in other inboxes.

  • Less manual checking

    Nobody has to paste links into a lookup site one at a time. Clean emails are passed over quietly and only the risky ones reach the channel.

  • A record of what was reported

    Every finding sits in Slack with the sender and subject. That helps when a client asks whether a strange email came from you.

  • Works with your existing habit

    Staff keep forwarding or moving suspicious mail to one folder. The checking happens behind the scenes without new tools to learn.

How it works

What happens, step by step

  1. Every 30 minutes it looks for new emails in your chosen Outlook folder.

  2. It pulls the web addresses out of each new email.

  3. Each address is checked against a threat database without opening the page.

  4. Anything flagged is posted to your security channel in Slack with the sender and subject.

  5. Emails already checked are remembered, so nothing is reported twice.

Before it runs live

  • Connect Outlook
  • Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)

What you get

RunsDaily
Check links in reported emails for phishingtoday, 9:00Succeeded
Slack · #security:warning: "Invoice overdue" from billing@northwind-pay.co: https://northwind-pay.co/login flagged as phishing

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Run it at a different time, more or less often, or only on weekdays
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Google Sheets
  • Combine it with other Outlook and Slack steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
scan_emails_for_phishing_links_report_to_slack.pyexample
GRAPH = "https://graph.microsoft.com/v1.0"
import re
from clickruntime import on_trigger, credentials, http, state, notify, report_fetched

@on_trigger
def run(event):
    h = {"Authorization": f"Bearer {credentials.connection('microsoft', 'work')}"}
    seen = state.get("seen") or []
    msgs = http.get(f"{GRAPH}/me/mailFolders/Phishing/messages", headers=h,
                    params={"$select": "id,subject,from,body", "$top": 25}).json()["value"]
    new = [m for m in msgs if m["id"] not in seen]
    report_fetched(len(new))
    if not new:
        return {"summary": "Nothing new"}
    key = credentials.secret("SAFE_BROWSING_KEY")
    for m in new:
        urls = sorted(set(re.findall(r"https?://[^\s\"'<>]+", m["body"]["content"])))[:20]
        body = {"threatInfo": {"threatTypes": ["MALWARE", "SOCIAL_ENGINEERING"], "platformTypes": ["ANY_PLATFORM"],
                "threatEntryTypes": ["URL"], "threatEntries": [{"url": u} for u in urls]}}
        hits = http.post(f"https://safebrowsing.googleapis.com/v4/threatMatches:find?key={key}", json=body).json().get("matches", [])
        if hits:
            bad = ", ".join(sorted({x["threat"]["url"] for x in hits}))
            notify.slack(f":warning: {m['subject']} from {m['from']['emailAddress']['address']}: {bad}", channel="#security")
    state.set("seen", (seen + [m["id"] for m in new])[-500:])
    return {"checked": len(new)}

FAQ

Common questions

Which emails are checked?
Messages in the folder you choose, such as a Phishing or Reported folder. You can point it at your inbox, but a dedicated folder keeps the checks focused.
What service checks the links?
A URL reputation service such as Google Safe Browsing or VirusTotal, using a free or paid key you save in your ClickRuntime dashboard.
Does it click the links?
No. It only sends the address to the reputation service, so nothing on the suspicious page is loaded.
What permissions does it need?
Mail.Read; chat:write. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it runs (daily). Checks that find nothing to do and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Check links in reported emails for phishing” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.