Daily email deliverability digest in Slack
Catch sender reputation problems before they snowball. Every weekday at 9am, post a green, yellow, or red status check on yesterday's email performance.
Build me a code workflow that posts a daily email deliverability digest from Postmark into a Slack channel, Monday through Friday at 9am local time.
Trigger: cron, weekdays at 09:00 in the user's timezone.
Inputs the user should configure at the top of the workflow: the Postmark server to monitor (default to their production server), the Slack channel to post to (default #email-ops), the timezone, and the green/yellow/red thresholds. Defaults: red when hard-bounce rate is above 2 percent OR there are any spam complaints in the window; yellow when the soft-bounce rate is more than 50 percent above its 7-day average; green otherwise.
Steps:
1. Sanity check the Postmark server. Call Postmark's Get Server endpoint and confirm DeliveryType is "Live" (not "Sandbox"). If it is a sandbox server, post a single-line warning to Slack and exit, so we never silently report on test traffic.
2. Pull yesterday's stats from Postmark, for the 24-hour window ending at midnight local time. Use these three operations in parallel, each scoped to the configured server and to the [fromdate, todate] range that covers yesterday:
- Postmark Get Outbound Overview (sends, bounce rate, opens, unique opens, spam complaints, total clicks).
- Postmark Get Bounce Counts (daily and total counts by type: HardBounce, SoftBounce, Transient, SMTPApiError). Bounce rate is (HardBounce + SoftBounce) / Sent.
- Postmark Get Spam Complaints (per-day and total spam complaints).
All three endpoints return the whole window in one call; no pagination needed.
3. Pull the previous day's stats (the day before yesterday) using the same three operations, so we can compute day-over-day deltas.
4. Pull the prior 7 days of stats using the same three operations with a 7-day window ending the day before yesterday, and compute 7-day averages for: total sends, hard bounces, soft bounces, bounce rate, spam complaints, unique opens. This is the baseline.
5. Decide the status. Apply the threshold rules in order: red first, then yellow, then green. Capture the reason string for the status (e.g. "hard-bounce rate 2.4% > 2% threshold") so we can show it in the message.
6. Format a compact Slack message. Use Slack mrkdwn, not standard Markdown. It should have: a one-line headline with a colored circle emoji matching the status (🟢/🟡/🔴), the date the digest covers, and the reason if not green. Below that, a small fixed-width table inside a code block with columns Metric | Yesterday | Δ vs prior day | 7-day avg, with rows for Total Sends, Hard Bounces, Soft Bounces, Bounce Rate, Spam Complaints, Unique Opens. Format percentages to one decimal place. End with a single line linking to the Postmark server activity page for that server, formatted as <https://account.postmarkapp.com/servers/{serverId}/streams/outbound/activity|Open in Postmark>.
7. Post the message to the configured Slack channel using Slack Send a Message.
Edge cases to handle:
- If yesterday had zero sends, skip the threshold logic and post a single calm line: "No sends in the last 24 hours on {serverName}." Do not flag this as red.
- If any of the Postmark calls fails, post a short failure notice to Slack with the error code/message and the server name, so the team notices the digest didn't run cleanly.
- Round all rates to one decimal place. Show counts as integers with thousands separators.
This is deterministic arithmetic and formatting on structured stats data, so build it as a code workflow with discrete nodes, not an agent.
What does this prompt do?
- Posts a short summary of yesterday's email performance to a Slack channel of your choice every weekday at 9am.
- Calls out bounce rate, hard bounces, spam complaints, total sends, and unique opens, with day-over-day changes and a 7-day running average for context.
- Tags the digest green, yellow, or red so the team knows at a glance whether to investigate.
- Includes a deep link to your Postmark server activity page so anyone can click in and dig further.
What do I need to use this?
- A Postmark account, and the server you want to monitor (usually your production server).
- A Slack workspace and permission to post in the channel you want the digest to land in, like #email-ops.
How can I customize it?
- Change the time it runs, or the days of the week it covers (you might want weekends too).
- Point it at a different Slack channel, or post to a private one only the on-call sees.
- Adjust the thresholds that flip the status to yellow or red, like the hard-bounce rate or the spam complaint count.
- Swap in a different Postmark server if you run separate production and marketing servers.
FAQs
Will this catch a sender reputation problem before it actually hurts deliverability?
Can I monitor more than one Postmark server?
How do I change the thresholds that flip the status to yellow or red?
What if there were no sends yesterday?
Can I send the digest somewhere other than Slack?
Related templates
Every weekday at 10am, an AI voice agent phones your most overdue Xero accounts, logs what each customer promised, and reports back to finance in Slack.
Every couple of hours we find the chats your team never answered, email those visitors a real reply, and hand the sensitive ones to a support lead.
Score last week's finished live chats against one rubric, let an AI grader draft the notes with quotes, and send coaching straight to the agent.
Every weekday morning, every appointment that fell through yesterday gets a personal text or email inviting them to rebook, plus a task for the right rep.
Pick any date range up to 120 days and see return volume, refund versus exchange mix, and the products behind every number, recalculated each time you open it.
Every newsletter gets read, checked and signed off in one place, so nothing goes out with a broken link or a half-filled greeting.
Stop hearing about deliverability problems from your customers.
Connect Postmark and Slack once, and Geni posts a clean status check every weekday morning before standup.