Gmail to Slack, a daily digest your team trusts
Your day starts in Slack, but the real work is buried in Gmail. So you bounce between tabs, skim threads twice, miss one important follow-up, and then spend the rest of the morning playing catch-up.
This Gmail Slack digest problem hits ops leads first, honestly. But PMs and founders feel it too, because everyone ends up re-reading the same emails and forwarding “FYI” messages that nobody asked for.
This workflow turns yesterday’s emails into one structured Slack post every morning. You’ll see what it does, how the logic works, and what you can tweak to match your team’s tone.
How This Automation Works
See how this solves the problem:
n8n Workflow Template: Gmail to Slack, a daily digest your team trusts
flowchart LR
subgraph sg0["Timed Automation Start Flow"]
direction LR
n0@{ icon: "mdi:play-circle", form: "rounded", label: "Timed Automation Start", pos: "b", h: 48 }
n1@{ icon: "mdi:message-outline", form: "rounded", label: "Fetch Prior Day Emails", pos: "b", h: 48 }
n2@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Validate Email Count", pos: "b", h: 48 }
n3@{ icon: "mdi:cog", form: "rounded", label: "Aggregate Message Items", pos: "b", h: 48 }
n4@{ icon: "mdi:robot", form: "rounded", label: "Email Insight Agent", pos: "b", h: 48 }
n5["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/code.svg' width='40' height='40' /></div><br/>Compose Slack Digest"]
n6["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/slack.svg' width='40' height='40' /></div><br/>Post Digest to Slack"]
n7@{ icon: "mdi:brain", form: "rounded", label: "OpenRouter Chat Engine", pos: "b", h: 48 }
n8@{ icon: "mdi:robot", form: "rounded", label: "Structured Result Parser", pos: "b", h: 48 }
n9["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/slack.svg' width='40' height='40' /></div><br/>Notify Empty Inbox"]
n2 --> n3
n2 --> n9
n3 --> n4
n5 --> n6
n0 --> n1
n7 -.-> n4
n8 -.-> n4
n4 --> n5
n1 --> n2
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n0 trigger
class n4,n8 ai
class n7 aiModel
class n2 decision
class n5 code
classDef customIcon fill:none,stroke:none
class n5,n6,n9 customIcon
The Challenge: Turning Email Noise into Team Clarity
Most teams don’t have an “email problem.” They have a visibility problem. The important messages arrive in one person’s inbox, get read in a rush between meetings, and then turn into a half-remembered Slack ping like “we should probably follow up on this.” Meanwhile, everyone else is blind, so they ask for updates, duplicate work, or wait too long to respond. And when you try to fix it manually with a daily forward or copy-paste summary, it either becomes another task you forget or it turns into a wall of text nobody reads.
It adds up fast. Here’s where it breaks down.
- You end up scanning the same inbox multiple times a day because there’s no single “yesterday recap” to rely on.
- Forwarding or summarizing by hand is easy to skip when mornings get hectic, so the habit never sticks.
- Slack channels fill with vague context (“see email”) instead of clear next steps, which means follow-ups slip.
- When there were no meaningful emails, you still waste time checking, just to confirm there’s nothing to act on.
The Fix: A Daily Gmail-to-Slack Digest That’s Actually Readable
This workflow runs automatically every morning at 08:00 and pulls all emails received “yesterday” in Gmail. If there’s nothing to report, it posts a simple “no emails” message to your Slack channel so people stop wondering what they missed. If emails do exist, it groups them into a single list, then passes that list to an AI agent that creates a structured digest (not a rambling paragraph). Finally, a formatter step turns the AI’s structured output into a clean Slack message and posts it to the channel you choose. The end result is one post your team can trust as the daily inbox pulse, without someone babysitting it.
The workflow starts on a schedule. Gmail provides the raw “yesterday” messages, the AI agent produces sections like highlights and follow-ups, and Slack becomes the delivery point where work already happens. No forwarding chains. No morning scramble.
What Changes: Before vs. After
| What This Eliminates | Impact You’ll See |
|---|---|
|
|
Real-World Impact
Say your team gets around 25 meaningful emails a day across customer threads, vendor updates, and internal requests. A quick “scan and summarize” usually takes about 2 minutes per email once you include context switching, so you’re at roughly 50 minutes each morning. With this workflow, you spend maybe 5 minutes skimming the Slack digest (or less), then jump straight to replying where needed. That’s about 45 minutes back per day, and you stop relying on memory.
Requirements
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Gmail to fetch yesterday’s inbound emails.
- Slack to post the digest to a channel.
- OpenRouter API key (get it from your OpenRouter dashboard)
Skill level: Beginner. You’ll connect OAuth accounts, paste credentials, and pick a Slack channel.
Need help implementing this? Talk to an automation expert (free 15-minute consultation).
The Workflow Flow
A daily morning trigger. The schedule fires at 08:00, so the digest lands right when people start checking Slack.
Gmail pulls “yesterday.” The Gmail step fetches emails received in the previous day’s window (yesterday through today at 00:00), which keeps the recap consistent and avoids duplicates.
A quick reality check. An “if” condition looks at the email count. No messages means the workflow takes a simple branch and posts a friendly “no emails” notice to Slack.
AI turns raw messages into a digest. When emails exist, they’re aggregated into one list, sent to an AI agent using an OpenRouter chat model, and parsed into structured sections. Then a small formatting step turns that structure into a readable Slack post and publishes it.
You can easily modify Gmail filters to focus on certain labels or senders based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the scheduleTrigger Trigger
This workflow begins on a daily schedule to fetch yesterday’s emails and build a digest.
- Add the Timed Automation Start node as your trigger.
- Set the Rule to use a cron expression and enter
0 0 8 * * *to run daily at 08:00. - Connect Timed Automation Start to Fetch Prior Day Emails.
Step 2: Connect Gmail
Pull all emails received yesterday for analysis.
- Add the Fetch Prior Day Emails node.
- Set the Operation to
getAll. - Set Filters → Received After to
{{ $now.minus({days: 1}).startOf('day').toISO() }}. - Set Filters → Received Before to
{{ $now.startOf('day').toISO() }}. - Credential Required: Connect your Gmail credentials.
- Connect Fetch Prior Day Emails to Validate Email Count.
Step 3: Set Up Processing Logic
Check if any emails exist, aggregate them, and prepare them for analysis.
- Configure Validate Email Count with a condition: set Left Value to
{{ $items().length }}, operator gt, and Right Value to0. - Connect the true branch of Validate Email Count to Aggregate Message Items.
- Connect the false branch of Validate Email Count to Notify Empty Inbox.
- In Aggregate Message Items, set Aggregate to
aggregateAllItemData. - Connect Aggregate Message Items to Email Insight Agent.
Step 4: Set Up AI Analysis
Analyze aggregated emails using an AI model and parse the structured output.
- In Email Insight Agent, set Text to the provided prompt and keep Has Output Parser enabled.
- Ensure OpenRouter Chat Engine is connected as the language model for Email Insight Agent and set Model to
openai/gpt-4o-mini. - Credential Required: Connect your OpenRouter credentials in OpenRouter Chat Engine.
- Confirm Structured Result Parser is attached as the output parser for Email Insight Agent with the provided schema.
- For the AI parser, add credentials to Email Insight Agent (the parent), not Structured Result Parser.
{{ JSON.stringify($json) }} to pass all aggregated emails into the AI model—keep this intact to preserve context.Step 5: Configure Output/Action Nodes
Format the AI response and send it to Slack. If there are no emails, send a separate Slack notification.
- In Compose Slack Digest, keep the provided JavaScript to build the Slack message from
$input.first().json.output. - Connect Email Insight Agent to Compose Slack Digest, then to Post Digest to Slack.
- In Post Digest to Slack, set Text to
{{ $json.message }}and choose your Channel. - Credential Required: Connect your Slack OAuth2 credentials for Post Digest to Slack.
- In Notify Empty Inbox, keep Text set to
*:email: Daily Email Digest — No emails*.
Target date (JST): {{$now.setZone('Asia/Tokyo').minus({days:1}).toFormat('yyyy-LL-dd (ccc)')}}
No emails were found for yesterday. The next digest will run as scheduled. - Credential Required: Connect your Slack OAuth2 credentials for Notify Empty Inbox.
Step 6: Test and Activate Your Workflow
Verify that emails are fetched, summarized, and delivered to Slack before enabling the schedule.
- Click Execute Workflow to run Timed Automation Start manually.
- Confirm that Fetch Prior Day Emails returns items and that Validate Email Count routes to the correct branch.
- When emails exist, verify Compose Slack Digest outputs a formatted message and Post Digest to Slack posts it to the chosen channel.
- When no emails exist, confirm Notify Empty Inbox posts the fallback message.
- Toggle the workflow to Active to enable the daily schedule.
Watch Out For
- Gmail OAuth scopes matter. If the workflow suddenly stops finding emails, check the Gmail credential in n8n and confirm it still has permission to read messages.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- OpenRouter credentials can be valid but still fail due to model access or rate limits. Check the OpenRouter node settings and the n8n execution log first, then swap to a smaller model if you’re hitting limits.
Common Questions
About 30 minutes if your Gmail and Slack logins are ready.
Yes. No coding required, you’ll just connect accounts and choose a Slack channel.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in OpenRouter API usage (usually a few dollars a month for most small teams).
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Change the Gmail search to narrow results (labels, from:, subject:), and adjust the AI Agent system prompt to match your tone and the sections you want. If your team only cares about follow-ups, tell the agent to prioritize “needs reply” and “blocking items.” For different cost or quality, swap the OpenRouter chat model and tweak temperature/max tokens. You can also branch the final output to Google Docs for archiving, or post to multiple Slack channels based on sender/label.
Usually it’s expired OAuth access or the wrong Gmail scopes. Reconnect the Gmail credential in n8n, then re-run one execution and check the error details on the Gmail node. Also confirm your “yesterday” window and timezone, because a mismatch can look like “no emails found” when emails actually exist.
On most n8n Cloud plans, this is effectively one execution per day per inbox, so capacity is a non-issue for typical teams.
Often, yes, because the “AI agent + structured parsing + custom Slack formatting” combo is where Zapier/Make scenarios can get awkward or expensive. n8n also gives you more control over branching, so you can post a “no emails” message cleanly without hacks. If you self-host, you’re not worrying about per-task pricing when you later add more routes (extra channels, Google Docs archiving, filters by label). That said, if all you need is a basic “new email → post to Slack,” Zapier or Make can be quicker. Talk to an automation expert if you want a fast recommendation for your setup.
Once this is running, your inbox stops being a private to-do list and becomes shared team context. The workflow handles the daily recap so you can spend the morning doing the work, not hunting for it.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.