Skip to content

The moment it happens

Get told when emails bounce or are marked as spam

Bounces, dropped emails and spam complaints are posted with the address and reason, grouped so one bad batch doesn't flood the channel.

Runs
The moment it happens
Apps
SendGrid
AI
Not needed
Access
Mail Settings / Event Webhook setup (full access to configure)

Send this to your assistant

Create a ClickRuntime automation: when SendGrid reports a bounce, drop or spam complaint, post it to #email-health in Slack with the address and reason.

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

A marketing manager sends a campaign to 20,000 contacts through SendGrid. Within an hour, 300 addresses bounce and a handful of recipients mark the message as spam. Nobody notices, because SendGrid's activity feed is a place you visit, not one that taps you on the shoulder. The following week the same campaign goes out again, the complaints continue, and mailbox providers start sending your mail to spam folders. By the time open rates fall, your sender reputation is already damaged.

SendGrid's Event Webhook delivers an array of events as they happen. The automation reads that array, keeps only bounce, dropped and spam report events, groups them, and posts a single Slack alert. It runs the moment the batch arrives, so you hear about a bad send while the campaign is still going. Email marketers and developers who send transactional mail use it to protect deliverability.

What you get out of it

  • Stop a bad send in progress

    Seeing a spike of bounces during a campaign gives you the chance to pause it. Halting after 2,000 sends is much cheaper than discovering the problem after all 20,000 have gone out.

  • Spam complaints are treated seriously

    Each spam report is a recipient telling mailbox providers you are unwanted. Learning about them immediately lets you remove those contacts and review how they got on your list. Even five complaints on a 10,000-recipient send deserve attention, because providers weigh complaint rates heavily.

  • List quality problems surface early

    A cluster of bounces from one import or signup form points to bad data at its source. Fixing the form or the list is more effective than cleaning addresses after every campaign.

  • Grouped alerts avoid noise

    Events are bundled into one message with counts rather than one post per bounce. A channel with a single clear alert is read, while one with five hundred separate pings gets muted.

  • Evidence for deliverability reviews

    A history of alerts shows when and which campaigns caused trouble. If a provider or SendGrid support asks about a reputation dip, you can point to specific dates. If SendGrid support asks which send caused the dip, you can answer with a date and a count.

How it works

What happens, step by step

  1. Whenever SendGrid reports delivery events, it sends them to ClickRuntime straight away.

  2. The automation keeps only bounces, dropped emails and spam complaints and ignores everything else.

  3. It groups the problems by type and reason, so one bad batch becomes a single line instead of dozens of messages.

  4. A summary goes to the #email-alerts Slack channel with each reason, the count and the first few addresses affected.

Before it runs live

  • Connect SendGrid
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Get told when emails bounce or are marked as spamjust nowSucceeded
Slack · #email-alertsSendGrid delivery problems bounce (12): 550 5.1.1 The email account does not exist sam@old-acme.com, info@northwind.co and 10 more

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 Slack
  • Combine it with other SendGrid 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.
bounce_and_spam_report_alerts.pyexample
from collections import defaultdict
from clickruntime import on_event, notify

TYPES = {"bounce", "dropped", "spamreport"}

@on_event
def handle(event):
    groups = defaultdict(list)
    for e in event.json:  # SendGrid posts an array of events
        if e["event"] in TYPES:
            groups[(e["event"], e.get("reason") or e.get("type") or "")].append(e["email"])
    if not groups:
        return {"alerts": 0}
    lines = []
    for (kind, reason), emails in groups.items():
        shown = ", ".join(emails[:5]) + (f" and {len(emails) - 5} more" if len(emails) > 5 else "")
        lines.append(f"{kind} ({len(emails)}): {reason[:120]}\n    {shown}")
    notify.slack("SendGrid delivery problems\n" + "\n".join(lines), channel="#email-alerts")
    return {"alerts": sum(len(v) for v in groups.values())}

FAQ

Common questions

What is the difference between a bounce and a dropped email?
A bounce means the receiving server rejected the message, for example an unknown mailbox. A dropped event means SendGrid chose not to send it, usually because the address is on a suppression list. Both can be included in alerts.
How do I connect SendGrid's Event Webhook to this?
Open Settings, then Mail Settings, then Event Webhook in SendGrid, paste the link, and tick bounce, dropped and spam report. After saving, send a test event from SendGrid's webhook page to confirm the alert reaches your channel before the next campaign.
Can it alert only when counts pass a number?
Yes. Rather than posting every batch, the automation can alert only when bounces or spam reports in a batch exceed a number you choose, which suits high-volume senders who expect a few failures every day.
What permissions does it need?
Mail Settings / Event Webhook setup (full access to configure). 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 for each event the app sends.
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 “Get told when emails bounce or are marked as spam” from your assistant

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