Gmail + Gemini, cybersecurity digests without repeats
Your cyber “news” stream is usually the same story five times, rewritten with slightly different headlines. You skim, you flag, you forget, and the one item that matters gets buried.
This is where Gmail Gemini digests really help. Threat intel analysts feel the overload first, but security leads and consultants sending client updates get stuck in the same loop: collect, dedupe, summarize, format, send.
This workflow turns that daily grind into two clean emails: one digest with deduped summaries, plus a weekly-style “viral topics” recap based on the last seven days. You’ll see how it works, what you need, and what to watch out for.
How This Automation Works
The full n8n workflow, from trigger to final output:
n8n Workflow Template: Gmail + Gemini, cybersecurity digests without repeats
flowchart LR
subgraph sg0["Daily Flow"]
direction LR
n0@{ icon: "mdi:robot", form: "rounded", label: "Structured Output Parser", pos: "b", h: 48 }
n1["<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/>Process output into HTML"]
n2["<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/baserow.svg' width='40' height='40' /></div><br/>Baserow Push Data"]
n3@{ icon: "mdi:swap-vertical", form: "rounded", label: "Filter summaries and created..", pos: "b", h: 48 }
n4["<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/baserow.svg' width='40' height='40' /></div><br/>Get data of previous days"]
n5@{ icon: "mdi:brain", form: "rounded", label: "Google Gemini Chat Model", 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/>Flatten"]
n7["<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/>Process output into HTML1"]
n8["<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/baserow.svg' width='40' height='40' /></div><br/>Baserow Push Data1"]
n9@{ icon: "mdi:play-circle", form: "rounded", label: "Daily trigger", pos: "b", h: 48 }
n10@{ icon: "mdi:robot", form: "rounded", label: "Write basic digest for today", pos: "b", h: 48 }
n11@{ icon: "mdi:message-outline", form: "rounded", label: "Send daily digest email", pos: "b", h: 48 }
n12@{ icon: "mdi:message-outline", form: "rounded", label: "Send viral topics email", pos: "b", h: 48 }
n13@{ icon: "mdi:robot", form: "rounded", label: "Structured Output Parser1", pos: "b", h: 48 }
n14@{ icon: "mdi:robot", form: "rounded", label: "Identify viral topics and wr..", pos: "b", h: 48 }
n15["<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/>7 days ago date"]
n16@{ icon: "mdi:swap-vertical", form: "rounded", label: "Loop Over Items", pos: "b", h: 48 }
n17@{ icon: "mdi:cog", form: "rounded", label: "RSS Read", pos: "b", h: 48 }
n18@{ icon: "mdi:cog", form: "rounded", label: "Aggregate", pos: "b", h: 48 }
n19["<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/>RSS feeds"]
n20["<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/>Precook data"]
n6 --> n14
n17 --> n16
n18 --> n20
n19 --> n16
n20 --> n10
n9 --> n19
n15 --> n4
n16 --> n18
n16 --> n17
n2 --> n15
n5 -.-> n14
n5 -.-> n10
n1 --> n11
n0 -.-> n10
n4 --> n3
n7 --> n12
n13 -.-> n14
n10 --> n1
n10 --> n2
n3 --> n6
n14 --> n7
n14 --> n8
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 n9 trigger
class n0,n10,n13,n14 ai
class n5 aiModel
class n1,n6,n7,n15,n19,n20 code
classDef customIcon fill:none,stroke:none
class n1,n2,n4,n6,n7,n8,n15,n19,n20 customIcon
The Problem: Cybersecurity digests are noisy and repetitive
Most teams don’t lack sources. They have too many. A handful of RSS feeds becomes dozens, and soon you’re staring at 40+ items that collapse into 10 real stories, plus a few important updates hiding in the long tail. Then comes the manual work: stripping fluff, comparing duplicates, grouping by topic, writing “exec-safe” summaries, and turning it into an email that doesn’t look like a messy forward. Do that daily and you’re spending your best thinking time on copy-paste and formatting.
The friction compounds. Here’s where it usually breaks down.
- Two different feeds report the same incident, so you waste time re-reading it to confirm it’s not new.
- Important items get missed because the “scroll tax” is real, especially on busy mornings.
- Digests drift in quality when whoever is “on” that day has a different writing style.
- There’s no memory across days, which means you can’t easily spot recurring themes or rising campaigns.
The Solution: RSS-to-Gmail briefings written by Gemini
This n8n workflow runs every morning at 7am and behaves like a lightweight intel desk. It pulls fresh items from your chosen RSS feeds, merges everything into a single stream, and prepares the article text in a format an LLM can reliably work with. Then Gemini writes a structured intelligence briefing that summarizes what happened, removes repeats, and organizes items into sensible topic buckets instead of a raw link dump. n8n renders that briefing into clean HTML and emails it via Gmail (or any SMTP account). After that, it looks back across the last seven daily digests, identifies recurring “viral” themes, and sends a second email that reads more like a trend recap than daily news.
The workflow starts with scheduled collection from RSS and batching through feed items. Gemini produces two outputs: a daily digest and a seven-day viral topics report. Finally, both are saved (so you have history) and sent out through email automatically.
What You Get: Automation vs. Results
| What This Workflow Automates | Results You’ll Get |
|---|---|
|
|
Example: What This Looks Like
Say you monitor 12 RSS sources and you typically scan 30 items each morning. If you spend maybe 3 minutes per item to open, skim, compare duplicates, and write a usable summary, that’s about 90 minutes before you even format the email. With this workflow, the “work” becomes a quick source check and a read-through: about 5 minutes to sanity-check the digest, plus LLM processing time in the background. You still stay in control, but you’re not doing the assembly by hand.
What You’ll Need
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- Google Gemini to generate the digest and trends.
- Gmail or SMTP email account to send the emails automatically.
- Baserow API key (get it from your Baserow account settings).
Skill level: Intermediate. You’ll connect a few accounts, edit prompts, and verify data fields, but you won’t be writing an app.
Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).
How It Works
Scheduled morning trigger. At 7am, n8n kicks off the run and generates the list of RSS sources you want to monitor.
Feed collection and cleanup. The workflow reads RSS entries, iterates through items in batches, aggregates results, and prepares article text so the AI sees consistent input instead of random snippets and broken formatting.
Two AI writing passes. Gemini writes the daily briefing first (summarize, dedupe, organize). After the digest is stored, n8n retrieves the prior seven days, selects the right fields, flattens the data, and prompts Gemini again to synthesize the week’s recurring topics.
Email output plus storage. Both reports are rendered into HTML, stored in Baserow for history, then sent via email so leaders and clients get a readable digest without logging into anything.
You can easily modify the RSS source list to monitor different feeds based on your needs. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the Scheduled Trigger
Set the workflow to run every morning so the digest and viral topics are generated automatically.
- Add the Scheduled Morning Trigger node as your trigger.
- Set the Interval rule to run at
7in triggerAtHour. - Connect Scheduled Morning Trigger to Generate RSS Sources to start the feed collection pipeline.
Step 2: Generate and Fetch RSS Sources
Define the list of RSS feeds and iterate through them to pull the latest entries.
- In Generate RSS Sources, keep the default JavaScript list of feed URLs as provided.
- Connect Generate RSS Sources to Iterate Feed Items to batch through the feed list.
- In Fetch RSS Entries, set URL to
{{ $json.url }}and keep Ignore SSL enabled. - Wire Iterate Feed Items to Fetch RSS Entries, and then back to Iterate Feed Items to loop through all feeds.
- Connect Iterate Feed Items to Aggregate Feed Results to combine entries from all sources.
Step 3: Prepare Article Text for the Daily Brief
Aggregate and filter the RSS entries so only the last 24 hours of articles are summarized.
- Connect Aggregate Feed Results to Prepare Article Text.
- In Prepare Article Text, keep the JavaScript that filters to the last 24 hours and builds
articlesText. - Connect Prepare Article Text to Compose Daily Brief.
Step 4: Set Up AI Summarization and Structured Parsing
Use Gemini to generate a structured daily brief, then parse it into the required JSON schema.
- In Compose Daily Brief, set Text to
{{ $json.articlesText }}and keep Has Output Parser enabled. - Ensure Structured Schema Parser is connected as the ai_outputParser for Compose Daily Brief.
- Connect Gemini Chat Engine as the ai_languageModel for both Compose Daily Brief and Synthesize Viral Topics.
- Credential Required: Connect your googlePalmApi credentials in Gemini Chat Engine.
Step 5: Store the Digest and Build Viral Topic Inputs
Persist daily digest output, then fetch recent records to prepare the viral topic synthesis.
- Note the parallel execution: Compose Daily Brief outputs to both Render Digest HTML and Store Digest Record in parallel.
- In Store Digest Record, set Operation to
create, Database ID to236879, and Table ID to562928. Use{{ JSON.stringify($json.output) }}for the field value. - Credential Required: Connect your baserowApi credentials in Store Digest Record and Retrieve Prior Days Data.
- In Compute 7-Day Date, keep the JavaScript that sets
previous_daysto 7 days ago. - In Retrieve Prior Days Data, keep Database ID as
236879and Table ID as562928, with the filter value{{ $json.previous_days }}. - In Select Summary Fields, map daily_report to
{{ $json.Description }}and created_on to{{ $json["Created on"] }}. - Connect Select Summary Fields to Flatten Reports Array to build
merged_reportsfor the viral analysis.
Step 6: Synthesize Viral Topics and Store Results
Use the recent digest history to identify recurring topics and render a separate viral topics digest.
- Connect Flatten Reports Array to Synthesize Viral Topics with Text set to
{{ $json }}. - Ensure Viral Schema Parser is connected as the ai_outputParser to Synthesize Viral Topics.
- Note the parallel execution: Synthesize Viral Topics outputs to both Render Viral HTML and Store Viral Record in parallel.
- In Store Viral Record, set Operation to
create, Database ID to236879, and Table ID to628338with{{ JSON.stringify($json.output) }}. - Credential Required: Connect your baserowApi credentials in Store Viral Record.
Step 7: Configure Email Outputs
Render HTML for the daily digest and viral topics, then email each output.
- In Render Digest HTML, keep the provided JavaScript that builds
htmlOutputfrom the structured output. - In Email Daily Digest, set HTML to
{{ $json.htmlOutput }}and Subject toCTI Digest - {{ $now.format('yyyy-MM-dd') }}. - In Render Viral HTML, keep the JavaScript that filters by reference count and builds
html. - In Email Viral Topics, set HTML to
{{ $json.html }}and Subject toCTI Digest (Viral Topics) - {{ $now.format('yyyy-MM-dd') }}. - Credential Required: Connect your smtp credentials in both Email Daily Digest and Email Viral Topics.
- Replace From Email with your sender address in both email nodes, e.g.,
Threat Intelligence Digest <[email protected]>.
Step 8: Test & Activate Your Workflow
Run a manual test to verify each branch produces the expected outputs before turning on the schedule.
- Click Execute Workflow to run the workflow from Scheduled Morning Trigger manually.
- Confirm that Render Digest HTML produces
htmlOutputand Email Daily Digest sends a message. - Verify that Render Viral HTML produces
htmland Email Viral Topics sends a message. - Check Baserow to ensure Store Digest Record and Store Viral Record created new rows.
- Once validated, toggle the workflow to Active so Scheduled Morning Trigger runs daily.
Common Gotchas
- Gmail (or your SMTP provider) credentials can expire or require extra permissions. If things break, check the n8n Credentials screen and your Google account security settings 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.
- Gemini prompts that stay generic will produce generic digests. Add your preferred sections (threat actor, affected products, IOCs, “so what”) early, honestly, or you’ll be polishing every email by hand.
Frequently Asked Questions
About an hour if your RSS feeds and accounts are ready.
No. You’ll mainly connect credentials and edit the prompts. There’s optional light tweaking in “code” nodes if you want custom formatting.
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 Gemini usage (the workflow uses free tier for some generation, and Gemini Pro for the heavier 7-day viral topics task).
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 one of the best uses of this template. Swap the RSS list in the “Generate RSS Sources” step, then adjust the prompt in the “Compose Daily Brief” chain to match your desired sections (for example: product updates, competitor moves, regulatory changes). You can also tighten or loosen deduping by changing what the structured parser expects, which helps if your topic area has lots of near-duplicate press releases. For the 7-day recap, tweak the “Compute 7-Day Date” logic or the “Synthesize Viral Topics” prompt to consider fewer days or stricter “viral” requirements.
Usually it’s expired or revoked credentials in n8n. Reconnect your Gmail/SMTP credential, then confirm the sending account is allowed to send via SMTP and hasn’t triggered a security prompt. If it works once and fails later, rate limits or account security settings are often the culprit.
Dozens per day is normal, and you can push higher if you batch and keep prompts under token limits.
Often, yes, because this workflow isn’t a simple “RSS in, email out.” You’re merging feeds, batching items, generating structured outputs, storing history, then doing a second pass across seven days, which is the kind of multi-stage logic that gets expensive or awkward in Zapier. n8n also lets you self-host, so you’re not paying more just because you run a morning digest every day. The other difference is control: prompts, parsing, and HTML rendering are all in your hands. Zapier or Make can still be fine for a tiny digest with one feed and no trend analysis. If you’re unsure, Talk to an automation expert and you’ll get a straight recommendation.
Once this is running, your morning briefing shows up already deduped, organized, and readable. The workflow handles the repetitive stuff, so you can spend your attention on what changed and what to do next.
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.