Gmail + OpenAI: one daily digest, less inbox noise
Your inbox doesn’t feel “busy.” It feels loud. Newsletter after newsletter, all technically useful, but spread across dozens of separate emails you will never open in time.
Marketing managers chasing industry updates get hit hardest, but founders and consultants feel the same pain. This Gmail digest automation turns a day of labeled newsletters into one readable email you can finish with coffee.
You’ll see how this n8n workflow pulls emails from a Gmail label, summarizes them with OpenAI, then sends a single, clean daily digest back to you.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Gmail + OpenAI: one daily digest, less inbox noise
flowchart LR
subgraph sg0["Schedule Flow"]
direction LR
n0@{ icon: "mdi:swap-horizontal", form: "rounded", label: "If", pos: "b", h: 48 }
n1@{ icon: "mdi:brain", form: "rounded", label: "OpenAI Chat Model", pos: "b", h: 48 }
n2@{ icon: "mdi:robot", form: "rounded", label: "Default Data Loader", pos: "b", h: 48 }
n3@{ icon: "mdi:robot", form: "rounded", label: "Recursive Character Text Spl..", pos: "b", h: 48 }
n4@{ icon: "mdi:cog", form: "rounded", label: "No Operation, do nothing", pos: "b", h: 48 }
n5@{ icon: "mdi:swap-vertical", form: "rounded", label: "Edit Fields", pos: "b", h: 48 }
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/code.svg' width='40' height='40' /></div><br/>Combine Subject and Body"]
n7@{ icon: "mdi:robot", form: "rounded", label: "Summarization Mails", pos: "b", h: 48 }
n8@{ icon: "mdi:message-outline", form: "rounded", label: "Send Digested mail", pos: "b", h: 48 }
n9@{ icon: "mdi:message-outline", form: "rounded", label: "Get mails (last 24h)", pos: "b", h: 48 }
n10@{ icon: "mdi:play-circle", form: "rounded", label: "Schedule Trigger", pos: "b", h: 48 }
n0 --> n7
n0 --> n4
n5 --> n6
n10 --> n9
n1 -.-> n7
n2 -.-> n7
n7 --> n5
n9 --> n0
n6 --> n8
n3 -.-> 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 n10 trigger
class n2,n3,n7 ai
class n1 aiModel
class n0 decision
class n6 code
classDef customIcon fill:none,stroke:none
class n6 customIcon
The Problem: Newsletter overload turns into “never read”
You subscribe with good intentions. Competitive intel, creator tips, product news, partner updates. Then Monday hits, and you’ve got 20 emails that each require a small decision: read, skim, save, click, archive. Multiply that by a week and it’s honestly exhausting. Even worse, the “important” link you needed is buried in message #14, so you either miss it or waste time searching later. Manual skimming isn’t just slow. It breaks your attention every time.
The friction compounds. Here’s where it breaks down.
- You spend about 2–5 minutes per newsletter just to figure out if it matters.
- Links you want to save get lost because you don’t have one place to review them.
- Important updates arrive, but you see them days late after the pile-up starts.
- Trying to “catch up” turns into a 45-minute cleanup session you didn’t plan for.
The Solution: One daily digest email, summarized with OpenAI
This workflow runs every morning at 9 AM and checks a single Gmail label you choose (like “Industry Updates” or “Tech News”). It pulls emails that arrived in the last 24 hours, then uses an OpenAI-powered summarization chain (via LangChain nodes in n8n) to produce concise summaries that keep the important links. After each email is summarized, the workflow maps the output into a consistent structure, combines subject lines with summary text, and merges everything into one well-formatted digest. Finally, it sends that digest email to your inbox, so you review one message instead of twenty.
The workflow starts on a schedule trigger. Gmail fetches labeled emails, an “If” gate decides whether there’s anything to process, then the AI summarizer produces clean bullet-style takeaways. The final Gmail step sends one combined digest back to you, ready to skim.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say your “Industry Updates” label collects 15 newsletters a day. If you spend only 3 minutes skimming each one, that’s about 45 minutes, and that’s on a “good” day. With this workflow, the only manual step is labeling (often handled by Gmail filters), then the digest arrives at 9 AM. You skim one email for about 10 minutes, click the 2–3 links that matter, and you’re done.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Gmail to fetch labeled emails and send digest
- OpenAI for newsletter summarization and formatting
- OpenAI API key (get it from your OpenAI dashboard)
Skill level: Intermediate. You will connect Gmail OAuth, add an API key, and change a label ID plus a destination email address.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
A scheduled morning trigger. The workflow fires automatically at 9 AM, so you’re not relying on willpower to “remember to review newsletters.”
Gmail pulls the right emails. It fetches messages that arrived in the last 24 hours from one Gmail label you control. If nothing matches, an “If” condition routes to a no-op node, which means no pointless API calls.
OpenAI creates readable summaries. A document loader and text splitter prepare each email’s content, then the summarization chain produces a concise summary that keeps useful links and context.
One combined digest goes back to your inbox. n8n maps the output fields, merges subject lines with summaries, then sends a single digest email via Gmail.
You can easily modify the Gmail label and the time window to match your routine. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Scheduled Run Trigger
This workflow starts on a scheduled cadence, so configure the trigger to control when the digest runs.
- Add the Scheduled Run Trigger node to your canvas.
- Set the schedule rule to run daily at
9by configuring Rule → Interval → Trigger At Hour to9. - Connect Scheduled Run Trigger to Retrieve Recent Emails.
Step 2: Connect Gmail and Fetch Recent Messages
Retrieve the last 24 hours of labeled emails to build the digest input.
- Add the Retrieve Recent Emails node.
- Credential Required: Connect your Gmail credentials.
- Set Operation to
getAll. - Set Limit to
20and Simple tofalse. - In Filters → Label IDs, set the value to
[YOUR_ID]. - Set Filters → Received After to
{{$now.minus({days: 1}).toISO()}}. - Connect Retrieve Recent Emails to Conditional Gate.
[YOUR_ID] with an actual Gmail label ID, otherwise no emails will be returned.Step 3: Set Up the Conditional Gate and AI Summarization Chain
This step checks for email results and summarizes them using the AI chain with a document loader and text splitter.
- In Conditional Gate, configure the condition with Left Value set to
{{$items().length}}, Operation set togt, and Right Value set to0. - Connect the true output of Conditional Gate to Email Summary Chain, and the false output to No-Op Placeholder.
- In Email Summary Chain, set Operation Mode to
documentLoaderand keep Summarization Method asstuffwith the provided prompt text. - Configure OpenAI Chat Engine with Model set to
o4-miniand connect it as the language model for Email Summary Chain. - Set Recursive Text Divider Chunk Size to
{{ $json.text.length }}and connect it to Standard Document Loader as the text splitter. - In Standard Document Loader, set JSON Data to
{{ $json.text }}, JSON Mode toexpressionData, and Text Splitting Mode tocustom.
Step 4: Map Summary Output and Assemble the Digest
Standardize fields from the AI output and combine all summaries into a single HTML digest.
- In Map Output Fields, add assignments for:
- output.text =
{{ $json.output.text }} - subject =
{{ $('Retrieve Recent Emails').item.json.subject }} - headers.from =
{{ $('Conditional Gate').item.json.headers.from }}
- output.text =
- Connect Email Summary Chain to Map Output Fields, then connect Map Output Fields to Merge Subject and Body.
- In Merge Subject and Body, keep the provided JavaScript that builds
combinedContentand returns a single item.
Step 5: Configure the Digest Email Output
Send the compiled HTML digest to your inbox.
- Add the Dispatch Digest Email node and connect it to Merge Subject and Body.
- Credential Required: Connect your Gmail credentials.
- Set Send To to
[YOUR_EMAIL]. - Set Message to
{{ $json.combinedContent }}. - Set Subject to
Daily Tech-News Digest for {{ $now.toISODate() }}.
Step 6: Test and Activate Your Workflow
Run a manual test to confirm each stage works before turning on the schedule.
- Click Execute Workflow to run Scheduled Run Trigger manually.
- Verify that Retrieve Recent Emails returns items and that Conditional Gate routes to Email Summary Chain (not No-Op Placeholder).
- Check that Merge Subject and Body outputs a single item with combinedContent.
- Confirm the email arrives from Dispatch Digest Email with the expected subject and HTML digest body.
- Toggle the workflow to Active to enable the daily schedule.
Common Gotchas
- Gmail OAuth credentials can expire or need specific permissions. If things break, check the Gmail node credentials screen in n8n 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 30 minutes if your Gmail and OpenAI accounts are ready.
No. You’ll mostly connect accounts and paste in a label ID and an email address.
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 OpenAI API costs, which are usually a few cents per digest depending on email volume and length.
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, but it takes a small tweak. Duplicate the “Retrieve Recent Emails” section for each label, then merge the outputs before the “Merge Subject and Body” step. People usually add categories like “Competitors,” “Product,” and “Creators,” then adjust the prompt inside the Email Summary Chain so each section is clearly labeled in the final digest.
Most of the time it’s expired OAuth consent or the wrong Google account connected in n8n. Reconnect Gmail in the credentials used by “Retrieve Recent Emails” and “Dispatch Digest Email,” then re-run a test execution. Also check the label ID you pasted, because a valid-looking but incorrect ID will return zero results and make it feel like the workflow is “broken.” If you’re processing a lot of long emails, you can also run into rate limits or timeouts, so spacing runs out or narrowing the 24-hour window helps.
Dozens per day is normal, and more is fine if your n8n plan and OpenAI usage limits support it.
Often, yes, because this is a “real workflow,” not a two-step zap. n8n handles branching logic (like skipping the whole run when there are no labeled emails), and the LangChain-style nodes make AI summarization much easier to control. Self-hosting also matters here: if you summarize a lot of emails, tool pricing can get annoying fast. Zapier or Make can still work if you keep it simple, but you’ll usually have less control over prompt structure and formatting. Talk to an automation expert if you want help choosing.
One inbox check. One digest. The workflow handles the repetitive reading so you can focus on the decisions and links that actually matter.
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.