An n8n workflow that automatically reads this week's Mint finance articles, ranks them using Gemini AI, and emails 3 ready-to-use Instagram video scripts every Monday morning.
Built for Indian personal finance content creators and finfluencers.
Every Monday at 8am IST, the workflow:
- Pulls articles from 4 Mint RSS feeds (markets, money, economy, companies)
- Filters to the last 7 days and matches finance keywords
- Scores each article 1-10 using Gemini AI based on virality potential for the creator's audience
- Generates 3 Instagram video scripts in the creator's exact writing style
- Emails all 3 scripts with article links and scores for easy selection
The email also includes a ranked table of every article evaluated that week so the creator can see the AI's reasoning.
Articles are scored based on topic fit for an Indian personal finance audience:
| Topic | Base Score |
|---|---|
| Macro (RBI, inflation, GDP, geopolitics) | 7 |
| Investment principles (behavioural finance, allocation) | 6 |
| Mutual funds (SIP, fund selection, MF tax) | 5 |
| Off-topic | 1 |
Bonus points for: surprising angle (+1), concrete data (+1), broad relatability (+1) Penalty for: stock-specific content (-3), too niche (-1), generic advice (-1)
| Component | Tool |
|---|---|
| Workflow orchestration | n8n (self-hosted) |
| Hosting | Railway (free plan) |
| AI model | Gemini 2.5 Flash-Lite |
| RSS parsing | n8n native RSS Feed Read node |
| Email delivery | Gmail via OAuth |
- n8n instance running (Railway, self-hosted, or n8n cloud)
- Gemini API key from aistudio.google.com (free)
- Gmail account connected via OAuth in n8n credentials
-
Import
workflow.jsoninto your n8n instance- New workflow > three-dot menu > Import from file
-
In the Filter & Rank node, replace:
YOUR_GEMINI_API_KEY_HEREwith your actual Gemini API key
-
In the Generate Script node, replace:
YOUR_GEMINI_API_KEY_HEREwith your actual Gemini API key
-
In the Generate Script node, replace the placeholder style examples in the prompt with real posts from your creator. The more examples you add, the better the style matching.
-
In the Send Email node, replace:
YOUR_RECIPIENT_EMAIL@gmail.comwith the destination email address
-
Connect your Gmail account in n8n Credentials (Gmail OAuth2)
-
Set the Generate Script node mode to Run Once for Each Item
-
Click Execute Workflow to test
Change the send time:
Edit the cron expression in the Schedule Trigger node.
Format: MM HH * * 1 where HH is UTC hour.
IST is UTC+5:30, so 8am IST = 2:30am UTC = 30 2 * * 1
Add or remove RSS feeds:
Edit the feeds array in the Build Feed URLs node.
Add or remove keywords:
Edit the KEYWORDS array at the top of the Filter & Rank node.
Change number of scripts:
Edit the top3 slice in Filter & Rank (ranked.slice(0, 3)) and update the Format Email node accordingly.
Add more recipients: Comma-separate email addresses in the Send Email node's sendTo field.
These are hard-won lessons from building this workflow:
fetchis not available in n8n code node sandbox. Usethis.helpers.httpRequest()instead.$envis blocked on n8n community plan. Use$vars(paid) or hardcode values directly.- Use the native RSS Feed Read node, not HTTP Request + manual XML parsing. The native node handles all XML edge cases reliably.
- Generate Script node must be set to "Run Once for Each Item" mode, not the default "Run Once for All Items".
- Generate Script returns a single object
return { json: {...} }not an arrayreturn [{ json: {...} }]when in per-item mode. - Gemini thinking mode must be OFF: set
thinkingConfig: { thinkingBudget: 0 }in every Gemini API call. Without this,parts[0]contains internal reasoning instead of the answer, producing blank or broken output.
Schedule Trigger (Monday 8am IST)
↓
Build Feed URLs (4 Mint RSS feeds)
↓
Read RSS Feeds (native n8n RSS node, runs 4x)
↓
Filter & Rank (keyword filter + Gemini scoring, returns top 3)
↓
Generate Script (Gemini script generation, runs 3x)
↓
Combine Scripts (Aggregate node, merges 3 items)
↓
Format Email (builds HTML email)
↓
Send Email (Gmail OAuth)
Jatin Dinesh linkedin.com/in/jatindinesh