Skip to content

Every 5 minutes

Check suspicious links people forward to you

When someone forwards a suspicious email, the links in it are checked and the verdict is posted to your security channel.

Runs
Every 5 minutes
Apps
Gmail, Slack
AI
Not needed
Access
Gmail gmail.modify; Slack chat:write

Send this to your assistant

Create a ClickRuntime automation: every 5 minutes, check new emails sent to security@ for links and IP addresses, look each one up on VirusTotal, post the results to #security and reply to the person who reported it.

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

Employees who receive a suspicious link forward it to the security inbox, and then the waiting begins. An analyst opens the email, copies the URL into a reputation site, checks the sending IP, writes a reply and mentions it in chat. Each report takes ten minutes, and during a phishing wave dozens arrive, so the person who clicked and the colleagues who did not are left wondering which is safe.

Every 5 minutes new emails in the security inbox are fetched and any URLs, domains and IP addresses are extracted. Each indicator is checked against a reputation API, the verdict goes to Slack as a short summary, and a reply with the result is sent to the person who reported it.

Small security teams, IT generalists who also handle security and managed service providers will find it useful.

What you get out of it

  • Reporters get an answer fast

    An employee who forwarded a link hears back within minutes whether it was malicious, which keeps them from guessing and encourages people to keep reporting. Quick feedback is what keeps staff reporting rather than ignoring the next suspicious email.

  • Analysts skip the copy and paste

    Extracting indicators and querying the lookup is repetitive work, and having verdicts ready means analysts spend time on the cases that need judgment. Human attention is the scarcest resource in a small security team.

  • A wave of phishing is visible quickly

    When several people report the same domain, the Slack posts show the pattern early, so the domain can be blocked before more people click. Early detection is the difference between one click and twenty.

  • Every report leaves a record

    Verdicts posted to a channel create a searchable log of what was reported and found, which supports incident reviews and awareness training examples. Those examples also make good material for staff training sessions.

  • Consistent checks regardless of staffing

    Lookups run the same way at 3am or during a holiday, so an unusually quiet team is not a reason for a suspicious link to go unchecked. Attackers do not keep office hours, so neither should the first check.

How it works

What happens, step by step

  1. Every 5 minutes, ClickRuntime checks Gmail for suspicious emails your colleagues have forwarded, skipping any it has already handled.

  2. It pulls out the links and IP addresses in each email.

  3. It looks each one up on VirusTotal to see how many security vendors flag it as malicious or suspicious.

  4. The verdict is posted to your #security Slack channel, and the person who reported it gets an email reply with the results.

Before it runs live

  • Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
  • Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)

What you get

RunsEvery 5 minutes
Check suspicious links people forward to youtoday, 9:00Succeeded
Slack · #security🛡 Report from sam@acme.example: Weird invoice link https://acme-invoices.example/pay: 9 malicious, 2 suspicious

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

  • Act only on the items that match your own rules, and skip the rest
  • 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 Gmail 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.
threat_lookups_for_reported_urls_ips.pyexample
import base64, re
from email.message import EmailMessage
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, state, notify, report_fetched

def vt(kind, value, key):
    if kind == "urls":
        value = base64.urlsafe_b64encode(value.encode()).decode().strip("=")
    r = http.get(f"https://www.virustotal.com/api/v3/{kind}/{value}", headers={"x-apikey": key})
    return r.json()["data"]["attributes"]["last_analysis_stats"] if r.ok else None

@on_trigger
def run(event):
    gmail = build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    seen = set(state.get("seen") or [])
    msgs = gmail.users().messages().list(userId="me", q="to:security@ newer_than:1d", maxResults=20).execute().get("messages", [])
    new = [m for m in msgs if m["id"] not in seen]
    report_fetched(len(new))
    if not new:
        return {"new": 0}
    key = credentials.secret("VIRUSTOTAL_API_KEY")
    for m in new:
        msg = gmail.users().messages().get(userId="me", id=m["id"], format="full").execute()
        h = {x["name"]: x["value"] for x in msg["payload"]["headers"]}
        text = msg["snippet"] + " " + " ".join(base64.urlsafe_b64decode(p["body"].get("data", "") + "==").decode(errors="ignore")
                                               for p in msg["payload"].get("parts", [msg["payload"]]))
        found = [("urls", u) for u in set(re.findall(r"https?://[^\s<>\"']+", text))][:5]
        found += [("ip_addresses", ip) for ip in set(re.findall(r"\b(?:\d{1,3}\.){3}\d{1,3}\b", text))][:5]
        lines = [f"{v}: {s['malicious']} malicious, {s['suspicious']} suspicious" if s else f"{v}: not found"
                 for (k, v), s in ((f, vt(*f, key)) for f in found)]
        report = "\n".join(lines) or "No links or IPs found."
        notify.slack(f"🛡 Report from {h.get('From')}: {h.get('Subject')}\n{report}", channel="#security")
        reply = EmailMessage()
        reply["To"], reply["Subject"] = h.get("From"), "Re: " + h.get("Subject", "")
        reply["In-Reply-To"] = reply["References"] = h.get("Message-ID", "")
        reply.set_content(f"Thanks for reporting this. VirusTotal results:\n\n{report}")
        gmail.users().messages().send(userId="me", body={"raw": base64.urlsafe_b64encode(reply.as_bytes()).decode(),
                                                         "threadId": msg["threadId"]}).execute()
    state.set("seen", [m["id"] for m in msgs])
    return {"reports": len(new)}

FAQ

Common questions

Which reputation service does it use?
You choose the reputation API and provide its key, which is stored as a secret. Services such as URL scanners and IP reputation databases work, and the verdict shown depends on what that service returns.
Does it open the links itself?
The lookup asks the reputation service about the URL, domain or IP. It does not browse to the link from your network, which avoids exposing your systems to the content being checked. That keeps the check safe for your network.
What does the reply to the reporter say?
A short note thanking them and stating the verdict, such as malicious, suspicious or no known threat. Wording is yours to set, and many teams add a reminder not to click until told it is safe.
What permissions does it need?
Gmail gmail.modify; Slack 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 checks. Checks that find nothing new 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 suspicious links people forward to you” from your assistant

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