Gmail + OpenRouter: daily inbox digest on autopilot
Your inbox can look “fine” and still quietly wreck your morning. You scan, you flag, you swear you’ll reply later, and somehow the important threads get buried under newsletters, CC storms, and half-finished conversations.
This is exactly where Gmail digest automation pays off. A project manager trying to brief leadership feels it first, but a customer success lead and a small agency owner get hit too. Same chaos, different consequences.
This workflow turns the last 24 hours of targeted Gmail messages into one clean, shareable morning brief using OpenRouter. You’ll see what it does, the outcomes you can expect, and what you need to run it.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Gmail + OpenRouter: daily inbox digest on autopilot
flowchart LR
subgraph sg0["Daily 8AM Flow"]
direction LR
n0@{ icon: "mdi:message-outline", form: "rounded", label: "Fetch Emails - Past 24 Hours", pos: "b", h: 48 }
n1@{ icon: "mdi:cog", form: "rounded", label: "Organize Email Data - Morning", pos: "b", h: 48 }
n2@{ icon: "mdi:message-outline", form: "rounded", label: "Send Summary - Morning", pos: "b", h: 48 }
n3@{ icon: "mdi:play-circle", form: "rounded", label: "Daily 8AM Trigger", pos: "b", h: 48 }
n4@{ icon: "mdi:brain", form: "rounded", label: "OpenRouter Chat Model", pos: "b", h: 48 }
n5@{ icon: "mdi:memory", form: "rounded", label: "Simple Memory", pos: "b", h: 48 }
n6@{ icon: "mdi:robot", form: "rounded", label: "Email Summarizer", pos: "b", h: 48 }
n5 -.-> n6
n6 --> n2
n3 --> n0
n4 -.-> n6
n0 --> n1
n1 --> n6
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 n3 trigger
class n6 ai
class n4 aiModel
class n5 ai
The Problem: Daily inbox review turns into unpaid project work
The worst part about “checking email” is that it’s not one task. It’s twenty micro-decisions: what matters, what can wait, who owns the follow-up, and which thread hides the real risk. If you’re scanning multiple stakeholders (or specific senders like clients, vendors, leadership), you can lose about an hour a day just reconstructing context. And because it’s manual, it’s inconsistent. One day you capture action items. The next day you miss the one sentence that changes the plan.
It adds up fast. Here’s where it breaks down.
- You reread the same long threads because yesterday’s context isn’t stored anywhere useful.
- Important issues get trapped in “FYI” emails, so they surface late, usually in a meeting.
- Action items live in someone’s head, which means handoffs are shaky and follow-through is hit-or-miss.
- Sharing a daily status means copying snippets into Slack or docs, and small errors creep in.
The Solution: A scheduled AI digest that summarizes, flags issues, and assigns next steps
This n8n workflow creates a morning mail summary automatically, every day, so you start with clarity instead of cleanup. At 8 AM (configured in the schedule trigger), it pulls the last 24 hours of Gmail messages from the senders you care about, using dynamic date filtering so you’re not stuck adjusting queries. It then aggregates key fields like sender, recipients, and snippet into one structured bundle. That bundle goes into an AI Agent powered by OpenRouter (via LangChain in n8n), which generates a consistent report: a plain-language summary, highlighted issues, and specific action items. Finally, the workflow sends a styled HTML email digest to you or your team, with CC support so everyone sees the same “source of truth.”
The workflow starts on a daily schedule, then retrieves emails for the last day from targeted senders. After it aggregates the details, the AI agent produces a structured brief using memory to keep continuity across days. The final output is a clean HTML email you can forward, archive, or use as your daily standup prep.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you track 3 key senders (a client, a vendor, and internal leadership) and you usually spend about 15 minutes per sender to piece together updates. That’s roughly 45 minutes every weekday, plus the time to write a clean recap. With this workflow, the “work” is basically zero: the schedule fires at 8 AM, the AI generates the brief in a couple minutes, and the email lands in your inbox ready to forward. Over a week, that’s about 4 hours back for higher-value work.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Gmail for reading emails and sending the digest.
- OpenRouter to run the AI summarization model.
- OpenRouter API key (get it from your OpenRouter dashboard).
Skill level: Beginner. You’ll connect Gmail, paste an API key, and edit a few text fields (senders, recipients, and the prompt).
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
A scheduled trigger starts the day. The workflow runs automatically at your chosen time (8 AM IST by default), so the digest is waiting when you sit down.
Gmail messages are pulled with a “last 24 hours” filter. Instead of scanning your whole inbox, it retrieves emails from the senders you define and collects the useful bits like who sent it, who was included, and a snippet.
An AI agent turns raw threads into a structured brief. OpenRouter generates a consistent output (summary, issues, actions, follow-ups). A memory buffer keeps continuity so yesterday’s open loops can carry into today’s digest, which is honestly where these systems go from “nice” to “dependable.”
The digest is delivered as a styled HTML email. It sends to your recipient list with optional CC, which makes it easy to share with a team without reformatting anything.
You can easily modify the sender filter to include more stakeholders based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Schedule Trigger
Set the daily morning schedule that initiates the email digest workflow.
- Add and open Scheduled Morning Trigger.
- Set the schedule rule to trigger at hour
7(as configured in rule → interval → triggerAtHour). - Verify the connection flow from Scheduled Morning Trigger to Retrieve Emails - Last Day.
Step 2: Connect Gmail and Retrieve Recent Emails
Pull the previous day’s emails from Gmail using a date-based search query.
- Open Retrieve Emails - Last Day and set Operation to
getAll. - Enable Return All by setting it to
true. - Set Filters → q to
{{ (() => { const yesterday = new Date(); yesterday.setDate(yesterday.getDate() - 1); return `[YOUR_EMAIL] after:${yesterday.getFullYear()}/${(yesterday.getMonth() + 1).toString().padStart(2, '0')}/${yesterday.getDate().toString().padStart(2, '0')}`; })() }}so the search is time-bounded. - Credential Required: Connect your Gmail credentials (no credentials are pre-configured for Retrieve Emails - Last Day).
[YOUR_EMAIL] in the search query with your real email address; otherwise, the search will return empty results.Step 3: Aggregate Email Data and Configure the AI Agent
Aggregate key email fields, then pass them to the AI agent with memory and language model connections.
- Open Aggregate Email Details AM and set Include to
specifiedFields. - Set Aggregate to
aggregateAllItemData. - Set Fields To Include to
id, From, To, CC, snippet. - Open Email Digest Agent and confirm Prompt Type is set to
defineand the System Message contains the provided email summarization instructions. - Ensure OpenRouter Chat Engine is connected as the language model for Email Digest Agent. Credential Required: Connect your
openRouterApicredentials in OpenRouter Chat Engine. - Ensure Basic Memory Buffer is connected as memory for Email Digest Agent. Add any required credentials to the parent node (Email Digest Agent), not the memory sub-node.
Step 4: Configure the Email Summary Output
Send the AI-generated digest as a formatted HTML email.
- Open Dispatch Morning Summary and set Send To to
[YOUR_EMAIL]. - Set Message to the provided HTML template, including the dynamic sections:
{{ $json.message.content.summary_of_emails.map(email => `<li>${email}</li>`).join('') }}and{{ $json.message.content.actions.map(action => ` <li> <span class="action-item">${action.name}:</span> <span class="action-detail">${action.action}</span> </li> `).join('') }}. - Set Subject to
Email Digest - {{ new Date(new Date().setDate(new Date().getDate() - 1)).toLocaleDateString('en-GB', { day: '2-digit', month: 'short', year: 'numeric' }) }}-00:00 to {{ new Date(new Date().setDate(new Date().getDate())).toLocaleDateString('en-GB', { day: '2-digit', month: 'short', year: 'numeric' }) }}-07:00AM. - Under Options, set CC List to
[YOUR_EMAIL]and Append Attribution tofalse. - Credential Required: Connect your Gmail credentials (no credentials are pre-configured for Dispatch Morning Summary).
summary_of_emails or actions, the HTML will render blank sections. Verify the agent output schema before production.Step 5: Test and Activate Your Workflow
Run a manual test to confirm email retrieval, AI summarization, and delivery.
- Click Execute Workflow to run the workflow manually from Scheduled Morning Trigger.
- Confirm Retrieve Emails - Last Day returns items and Aggregate Email Details AM aggregates the fields correctly.
- Verify Email Digest Agent produces a structured output with summaries and actions.
- Check your inbox for the formatted digest sent by Dispatch Morning Summary.
- When satisfied, toggle the workflow to Active so it runs at 7:00 AM automatically.
Common Gotchas
- Gmail credentials can expire or need specific permissions. If things break, check the n8n Credentials screen and confirm the Gmail scope/connection first.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.
Frequently Asked Questions
About 20–40 minutes if your Gmail and OpenRouter accounts are ready.
No. You’ll mostly connect accounts and edit a few fields like sender filters, recipients, and the summarization prompt.
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 model costs (usually pennies per digest, depending on length and model).
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.
Yes, and it’s a common tweak. Change the Gmail retrieval step (“Retrieve Emails – Last Day”) to add or remove senders, labels, or search queries, then adjust the “Dispatch Morning Summary” email to send different digests to different groups. You can also tailor the “Email Digest Agent” prompt so one team gets action items while another gets risks and deadlines. If you want continuity, keep the memory buffer; if you want a “clean slate” digest every day, reduce or remove the memory window.
Usually it’s expired OAuth access or the wrong Gmail account connected. Reconnect Gmail in n8n Credentials, then confirm the workflow is allowed to read messages and send email. Also check that your Gmail search query still matches real mail (filters that are too strict can look like a “failure” because zero emails are returned). If you’re running this in a company Google Workspace, admin restrictions can block access until the app is approved.
A few hundred emails per day is realistic for most setups.
It depends on how “smart” you need the digest to be. Zapier and Make can absolutely send scheduled emails, but once you want structured summarization, memory across days, and more complex branching without paying per step, n8n is often the better fit. The OpenRouter/LangChain agent setup is also easier to control in n8n because you can tune prompts, inputs, and formatting in one place. If you only want a simple “top 5 emails” list, Zapier may feel faster to set up. If you’re unsure, Talk to an automation expert and we’ll point you to the simplest option.
Once this is running, your inbox stops being the place you “figure things out.” It becomes an input, and your daily brief becomes the decision point.
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.