An automated n8n pipeline that wakes up every morning, scrapes the latest GenAI & Agentic AI news from two live sources, deduplicates them using stateful memory, lets Google Gemini extract a structured JSON briefing, and delivers a beautiful HTML email digest directly to your Gmail inbox β zero clicks required.
The workflow runs automatically every day via a cron schedule. Here's what happens under the hood:
| Step | Node | What It Does |
|---|---|---|
| 1 | Daily Trigger (Cron) |
Fires at 8:00 AM daily. Two parallel triggers kick off the Google News and Hacker News branches simultaneously. |
| 2 | Fetch Google News RSS |
Hits Google News RSS with a targeted query: "agentic AI" OR "generative AI" OR "AI agent" OR "AI tool" OR "AI regulation" |
| 2 | Fetch Hacker News |
Calls the Hacker News Algolia API (search_by_date?query=AI agent) to pull the 20 most recent stories. |
| 3 | Combine β Dedupe & Filter |
Merges both feeds. A custom JavaScript node checks workflow static data to skip already-seen URLs, filters to the last 24 hours, sorts by recency, and keeps the top 15 freshest articles. |
| 4 | Has New Items? |
A gatekeeping filter node. If count == 0, the workflow stops immediately β no blank emails sent. |
| 5 | Build Career Briefing (Gemini) |
Feeds the 15 headlines into gemini-3.1-flash-lite with a strict structured JSON prompt. Extracts: Market Sentiment, Top News + Impact, Models & Tools, Skills to Learn, Industry Impact. |
| 6 | Format HTML Email |
A JavaScript Code Node parses the JSON and compiles a clean, fully-styled HTML email template. |
| 7 | Send Email Digest |
Dispatches the HTML email via Gmail OAuth SMTP to your inbox. |
This project demonstrates production-grade AI engineering patterns beyond simple prompting:
Instead of relying on fragile free-text generation, Gemini is constrained via a strict JSON schema prompt. The output schema is enforced at the prompt level:
{
"sentiment": { "score": "Bullish | Bearish | Neutral", "reason": "..." },
"top_news": [{ "headline": "...", "impact": "..." }],
"models_tools": ["tool1", "tool2"],
"skills": [{ "skill": "...", "reason": "..." }],
"industry_impact": "..."
}A downstream JavaScript node strips any leaked markdown fences and JSON.parse()s safely.
The deduplication node uses $getWorkflowStaticData('global') β n8n's built-in stateful storage β to maintain a rolling list of up to 500 sent article URLs across runs. This means you never receive the same article twice, even across multiple days.
AI processing is strictly separated from presentation logic:
- π€ LLM β handles only data extraction
- π₯οΈ JS Code Node β handles all HTML templating
Before invoking Gemini, the workflow checks count > 0. If there are no fresh articles (e.g., a weekend with low news volume), execution stops and no API calls are made.
The AI is used as an analytical engine to grade the overall tone of today's AI news as Bullish, Bearish, or Neutral, with a one-sentence rationale.
[Daily Trigger - News] βββ [Fetch Google News RSS] βββ
ββββ [Combine News Sources]
[Daily Trigger - HN] βββ [Fetch Hacker News] βββ β
[Split HN Hits] βββββββ
β
[Dedupe, Filter & Build Digest]
β
[Has New Items? (Filter)]
β YES
[Build Career Briefing] βββ [Gemini Model]
β
[Format HTML Email (JS)]
β
[Send Email Digest (Gmail)]
The delivered HTML email contains 5 structured sections:
| Section | Content |
|---|---|
| Market Sentiment | Bullish / Bearish / Neutral + one-line rationale |
| π₯ Top News Today | Up to 5 headlines with impact summary per article |
| π€ New Models & Tools | Extracted tool names mentioned in today's news |
| π οΈ Skills to Improve | Recommended skills with context on why they're trending |
| πΌ Industry Impact | 2-3 sentence analysis of what this means for engineering roles |
Option A β Docker (Recommended)
# Copy environment template
cp .env.example .env
# Fill in your values in .env, then:
docker compose up -d
# Open: http://localhost:5678Option B β n8n Cloud Sign up at n8n.io and use the cloud editor directly.
- Download
genai-daily-career-briefing.json - In n8n, click
+(top-left) β Import from File - Upload the
.jsonfile
You need to configure 2 credentials inside n8n:
Gemini API Key
- Go to Google AI Studio β Create API Key
- In n8n: open the
Gemini Modelnode β paste your key
Gmail OAuth
- Set up a Google Cloud project and OAuth 2.0 credentials
- Guide: n8n Google OAuth docs
- In n8n: open
Send Email Digestnode β connect your Gmail account
- Open the
Send Email Digestnode - Change
YOUR_EMAIL@gmail.comin thesendTofield to your actual email
- Toggle the workflow to Active (top-right switch)
- (Optional) Click Execute Workflow to trigger an immediate test run
# 1. Copy the template
cp .env.example .env
# 2. Fill in your values
GEMINI_API_KEY=your_gemini_api_key_here
RECIPIENT_EMAIL=your_email@gmail.com
GMAIL_CLIENT_ID=your_google_client_id_here
GMAIL_CLIENT_SECRET=your_google_client_secret_here
β οΈ The.envfile is excluded from Git via.gitignore. Never commit real credentials.
genai-n8n/
βββ genai-daily-career-briefing.json # β Complete n8n workflow (import this)
βββ docker-compose.yml # Self-hosted n8n via Docker
βββ .env.example # Environment variable template
βββ .gitignore # Ignores .env and sensitive files
βββ README.md # This file
βββ assets/
βββ how_it_works_sketch.png # Pipeline overview (pencil sketch)
βββ architecture_sketch.png # System architecture (pencil sketch)
βββ setup_steps.png # Quick start visual (pencil sketch)
βββ future_roadmap.png # Roadmap diagram (pencil sketch)
βββ email_preview.png # Sample email output screenshot
βββ hero_banner.png # Project banner image
| Improvement | Description |
|---|---|
| ποΈ Vector Database (RAG) | Connect to Pinecone or Qdrant to store historical article embeddings. The LLM can then reference past context to detect long-term industry trends and avoid repeating insights from previous briefings. |
| π·οΈ Full Article Scraping | Replace RSS summary text with a Puppeteer / HTTP Request node that fetches the full article body before passing it to Gemini β enabling much deeper, nuanced analysis instead of headline-only summaries. |
| π° More News Sources | Add Dev.to, Towards Data Science, ArXiv AI abstracts, or LinkedIn Pulse as additional RSS/API sources to broaden coverage. |
| Improvement | Description |
|---|---|
| π Researcher Agent | Use n8n's LangChain agent nodes to deploy a dedicated Researcher Agent that autonomously decides which sources to query, ranks articles by relevance, and summarizes findings for the Writer. |
| βοΈ Writer Agent | A separate Writer Agent receives the ranked research and drafts a personalized briefing with a consistent editorial voice β using memory of your past preferences. |
| β Editor / Fact-Check Agent | A final verification agent that cross-references claims in the briefing against a trusted knowledge base before the email is dispatched. |
| Improvement | Description |
|---|---|
| π¬ Slack / Discord Bot | Add a Webhook output node to push the briefing as a formatted message to your team's Slack or Discord channel every morning. |
| ποΈ Audio Podcast Digest | Pipe the briefing text through a Text-to-Speech node (ElevenLabs or Google TTS) to generate a short audio podcast you can listen to on your commute. |
| π Web Dashboard | Build a lightweight Next.js frontend that reads briefing history from a database and visualizes sentiment trends, trending tools, and skill frequency over time. |
| π Multi-Language Support | Add a translation step after the AI parser to deliver the briefing in the user's preferred language using Gemini's translation capabilities. |
| π Weekly Summary | Add a separate Saturday workflow that aggregates the week's 5 briefings into a single executive summary email with trend highlights. |
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-improvement - Commit your changes:
git commit -m "feat: add Slack delivery channel" - Push and open a Pull Request
Feedback and workflow forks are welcome! If you add a new source or delivery channel, please share the .json workflow export.



