Skip to content

Daily

Get yesterday's SendGrid delivery numbers each morning

You see delivered, bounced and spam counts every day, with a warning when the bounce rate climbs.

Runs
Daily
Apps
SendGrid
AI
Not needed
Access
Stats read

Send this to your assistant

Create a ClickRuntime automation: every morning at 8, email me SendGrid's delivered, bounced and spam report numbers for yesterday, and flag it if the bounce rate is over 2%.

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

If you send email through SendGrid, the numbers that decide whether your messages reach people are in the Stats dashboard: delivered, bounced, spam reports, blocks. Hardly anyone opens it daily. A rise in the bounce rate from 1 percent to 4 percent over a week creeps up unnoticed, and a transactional sender like a SaaS app can lose password-reset emails to a reputation problem without any error appearing in its own logs.

Each morning the automation pulls SendGrid's global stats for yesterday, calculates the delivery, bounce and spam report rates from the raw counts, and emails the summary to you. You read the numbers in under a minute with your coffee. Product teams, marketers and developers who rely on SendGrid for customer email use it as a daily health check.

What you get out of it

  • Deliverability drift is noticed early

    A gradual rise in bounces is easiest to fix in its first days. A daily figure makes a creeping trend visible long before customers say they are not getting your emails.

  • Rates, not just counts

    Raw counts mean little without volume. Calculated percentages show whether 90 bounces is normal for a day of 50,000 sends or alarming for a day of 800. Ninety bounces on 50,000 sends is routine, but the same ninety on 800 sends means something is badly wrong.

  • Transactional mail stays reliable

    Password resets and receipts are critical messages. Spotting a worrying day immediately lets you investigate before users are locked out or wonder whether their order was received. A password reset that lands in spam at 4 pm becomes a locked-out customer by 4:05.

  • Campaign results are easy to compare

    The morning after a big send, the figures for that day are in your inbox. You see how delivery and spam rates compared with earlier campaigns without opening SendGrid. The morning after a launch email you can compare its spam rate with the last three sends.

  • A history in your inbox

    Each daily email dates the numbers. Months later, when reviewing a change in domain or provider, you can search for the days when rates changed and see what else happened then.

How it works

What happens, step by step

  1. Every morning ClickRuntime asks SendGrid for yesterday's sending numbers.

  2. It works out how many emails were sent, delivered, bounced and reported as spam.

  3. It calculates the bounce rate and adds a warning if it is over 2%.

  4. You get one short email with the numbers, so you can spot list problems early.

Before it runs live

  • Connect SendGrid

What you get

RunsDaily
Get yesterday's SendGrid delivery numbers each morningtoday, 9:00Succeeded
Email · SendGrid statsDelivered: 48,210 · Bounced: 1,130 (2.3%) <- over 2%, check your lists · Spam reports: 14

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 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.
daily_sending_stats_email.pyexample
from datetime import date, timedelta
from clickruntime import on_trigger, credentials, http, notify

@on_trigger
def run(event):
    day = (date.today() - timedelta(days=1)).isoformat()
    key = credentials.secret("SENDGRID_API_KEY")
    resp = http.get("https://api.sendgrid.com/v3/stats",
                    params={"start_date": day, "end_date": day},
                    headers={"Authorization": f"Bearer {key}"})
    resp.raise_for_status()
    m = resp.json()[0]["stats"][0]["metrics"]
    requests = m["requests"] or 1
    bounce_rate = m["bounces"] / requests * 100
    flag = "  <- over 2%, check your lists" if bounce_rate > 2 else ""
    notify.email_me(f"SendGrid stats for {day}",
        f"Requests: {m['requests']}\nDelivered: {m['delivered']}\n"
        f"Bounced: {m['bounces']} ({bounce_rate:.1f}%){flag}\nSpam reports: {m['spam_reports']}")
    return {"day": day, "bounce_rate": round(bounce_rate, 2)}

FAQ

Common questions

Which numbers does the daily email include?
It lists requests, delivered, bounces, blocks and spam reports for the day, plus delivery, bounce and spam rates worked out from those raw counts. Opens and clicks can be added if tracking is switched on, though they matter less than delivery for transactional mail.
Are these totals for the whole account or one subuser?
The global stats endpoint covers the whole account. If you use subusers for different products or clients, the automation can be pointed at each subuser's stats instead, and sent as separate emails or one combined message.
What time zone is 'yesterday' in?
SendGrid reports stats by calendar date, normally in UTC. If your business works in another time zone, the day boundaries will not match your local day exactly, which is worth remembering when you compare to other tools.
What permissions does it need?
Stats read. 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 “Get yesterday's SendGrid delivery numbers each morning” from your assistant

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