Automated weekly content generation using GPT-4.1 + Gemini 2.5 Flash — optimized for AI answer engines (ChatGPT, Google AI Overviews, Perplexity).
n8n Workflow GPT-4.1 Gemini 2.5 Flash AEO SEO Content Automation
A fully automated n8n workflow that generates AEO-optimized content every week — articles, newsletters, and video scripts — using a two-model AI pipeline. Built for agencies and content teams who want to rank in both traditional search AND AI answer engines.
AEO (Answer Engine Optimization) is the practice of optimizing content so AI systems like ChatGPT, Google AI Overviews, and Perplexity cite your content as a source. This workflow bakes AEO best practices directly into the content generation pipeline.
┌─────────────┐ ┌──────────────────┐ ┌─────────────────┐ ┌──────────────────┐
│ PHASE 1 │ │ PHASE 2 │ │ PHASE 3 │ │ PHASE 4 │
│ Keywords │────▶│ Deep Research │────▶│ Content Gen │────▶│ Email Delivery │
│ │ │ │ │ │ │ │
│ Autocomplete│ │ 8 RSS Feeds │ │ GPT-4.1 Article │ │ 📧 AEO Article │
│ Serper SERP │ │ Gemini 2.5 Flash │ │ GPT-4.1 AEO Edit│ │ 📧 Newsletter │
│ GPT-4.1 │ │ Trend Analysis │ │ GPT-4.1 News │ │ 📧 Video Scripts │
│ Strategy │ │ Story Ranking │ │ GPT-4.1 Scripts │ │ 📧 Instructions │
└─────────────┘ └──────────────────┘ └─────────────────┘ └──────────────────┘
- Google Autocomplete — real trending searches (no API key needed)
- Serper.dev — SERP data + People Also Ask questions (2,500 free searches)
- GPT-4.1 — analyzes data → outputs keyword strategy with AEO angles
- Fetches 8+ RSS feeds from industry sources
- Gemini 2.5 Flash analyzes all stories, ranks by relevance, extracts data points
- Only includes stories with specific facts (company names, dollar amounts, dates)
- AEO Article (800-1000 words) — direct-answer opening, question-format headings, FAQ section
- AEO Editor Pass — scores article on 5 criteria, makes targeted optimizations
- Newsletter Digest — 8-12 categorized stories with branded HTML
- Video Scripts — short-form (60s for Reels/TikTok) + long-form (5min for YouTube)
- AEO Article — full article +
.htmland.docattachments for easy CMS upload - Newsletter Digest — categorized stories with inline styling
- Video Scripts — ready-to-record scripts with visual cues
- Instructions — step-by-step publishing guide (record videos → upload article → send newsletter)
| Feature | Description |
|---|---|
| Two-Model Pipeline | GPT-4.1 for strategy + writing, Gemini 2.5 Flash for research |
| AEO Optimization | Direct-answer openings, PAA-based headings, FAQ sections |
| AEO Scoring | 5-criteria scoring (0-100) with specific optimization notes |
| Content Deduplication | Tracks 52 weeks of history — never repeats topics, keywords, or stories |
| Article Structure Rotation | 3 formats cycle automatically (deep-dive, problem-solution, case-study) |
| Buzzword Quality Gate | Flags corporate jargon (leverage, synergy, cutting-edge, etc.) |
| Date Enforcement | Rejects outdated 2024/2025 content — current year only |
| CMS-Ready Attachments | .html file for copy/paste into any CMS, .doc for Word editing |
| Client Instructions Email | Step-by-step guide so clients know exactly what to do each week |
| Branded Email Templates | Customizable colors, logos, fonts — professional email output |
| FREE Keyword Research | Google Autocomplete + Serper.dev free tier = $0/month for keywords |
- Open your n8n instance
- Go to Workflows → Import from File
- Select
AEO-Content-Engine-v7.0.json
| Credential | Where to Get | Cost |
|---|---|---|
| Serper.dev API Key | serper.dev → Sign up (no credit card) | FREE (2,500 searches) |
| OpenAI API Key | platform.openai.com → API Keys | Pay-per-use (~$0.50-1/run) |
| Google Gemini API Key | ai.google.dev → Get API Key | FREE tier available |
| SMTP (Gmail) | Google Account → Security → App Passwords | FREE |
📋 Detailed Credential Setup
- Go to serper.dev → Sign up (no credit card needed)
- Copy your API key from the dashboard
- In n8n: Credentials → New → Header Auth
- Name:
X-API-KEY| Value: paste your key - Save as "Serper.dev API Key"
- Assign to the
Serper - SERP + PAAnode
- Go to platform.openai.com → API Keys
- Create a new API key
- In n8n: Credentials → New → OpenAI API
- Paste your API key → Save
- Assign to all 5 GPT nodes
- Go to ai.google.dev → Get API Key
- Create key in Google Cloud project
- In n8n: Credentials → New → Google PaLM API
- Paste your API key → Save
- Assign to both Gemini nodes
- Enable 2FA on your Google Account
- Google Account → Security → App Passwords
- Generate an App Password for 'Mail'
- In n8n: Credentials → New → SMTP
- Host:
smtp.gmail.com| Port:465| SSL: Yes - User: your Gmail | Pass: app password
Open the Client Configuration node and update:
{
"industry": "Your Industry",
"targetAudience": "Your Target Audience",
"brandName": "Your Brand Weekly Digest",
"tone": "Your writing tone description",
"keywords": "keyword1, keyword2, keyword3",
"recipientEmail": "client@example.com",
"senderEmail": "sender@example.com",
"logoUrl": "https://your-logo.com/logo.png",
"brandColor": "#6366f1",
"websiteUrl": "https://your-website.com/",
"articleBaseUrl": "https://your-website.com/blog/"
}Then update the RSS Feed Sources node with your industry's RSS feeds.
- Click Test Workflow to run once
- Check your email for 4 branded emails
- If everything looks good → toggle Active
Full article optimized for AI answer engines. Includes AEO score, optimization notes, and both .html + .doc file attachments for easy CMS upload.
8-12 curated industry stories grouped by category with branded styling. Ready to paste into any email CRM.
Two scripts ready to record:
- Short-form (under 60 seconds) for Reels, TikTok, YouTube Shorts
- Long-form (~5 minutes) for YouTube with timestamps and B-roll suggestions
Step-by-step publishing guide:
- Record videos using Teleprompter App
- Upload article to CMS (copy/paste from .html file)
- Add article link to newsletter
- Send newsletter via CRM
The workflow uses free APIs by default. When ready to scale:
| Upgrade | Replaces | Cost | Benefit |
|---|---|---|---|
| DataForSEO | Autocomplete + Serper | ~$0.002/query | Exact search volume, keyword difficulty, CPC |
| SerpAPI | Serper | $75/mo | Google Trends data |
| SEMrush | All keyword nodes | $500/mo | Industry-leading keyword database |
| Google Search Console | Add alongside (don't replace) | FREE | Real clicks, impressions, CTR tracking |
Weekly Trigger (Monday 9 AM)
│
▼
Client Configuration ──▶ Prepare Keywords (rotation + dedup)
│
▼
Google Autocomplete ──▶ Autocomplete Questions ──▶ Serper SERP+PAA
│
▼
Merge Keyword Data ──▶ GPT-4.1 Keyword Strategy ──▶ Parse Strategy
│
├──▶ RSS Feed Sources ──▶ Loop Feeds ──▶ CSV ──▶ Gemini Upload
│ │
│ ▼
│ Gemini 2.5 Flash Deep Research ──▶ Parse Research
│
▼
GPT-4.1 Write Article ──▶ GPT-4.1 AEO Editor ──▶ Finalize Article
│
├──▶ GPT-4.1 Newsletter ──▶ Clean Newsletter
│
├──▶ GPT-4.1 Video Scripts ──▶ Clean Scripts
│
▼
Build 4 Branded Emails ──▶ Send Emails (SMTP) ──▶ Save Content History
The workflow automatically prevents content repetition:
- Keyword rotation — avoids last 8 used primary keywords
- Story filtering — removes recently featured URLs and titles (4-week window)
- Angle exclusion — GPT is instructed to avoid previously covered angles
- Title tracking — never repeats an article title
- History retention — keeps 52 weeks (1 year) of content history
- Storage — n8n Workflow Static Data (built-in, no external DB needed)
To reset history: run the RESET History (Manual) node by itself.
| Service | Cost |
|---|---|
| Google Autocomplete | FREE |
| Serper.dev | FREE (2,500/mo) |
| GPT-4.1 (5 calls) | ~$0.30-0.80 |
| Gemini 2.5 Flash | ~$0.01-0.05 |
| Gmail SMTP | FREE |
| Total per week | ~$0.30-0.85 |
The base engine (v7.0) is just the starting point. We built a full upsell framework with 4 pricing tiers so you can turn this into a recurring revenue service for clients.
| Tier | Price | Margin | What It Adds |
|---|---|---|---|
| Growth | $1,500/mo | ~95% | DataForSEO keywords, Search Console, performance reports, 2x articles, A/B subject lines |
| Accelerate | $3,000/mo | ~95% | Auto-publish to WordPress/LinkedIn/Twitter, AI images, 4 articles/mo, content calendar |
| Dominate | $5,000/mo | ~82% | SEMrush/Ahrefs, AEO citation monitoring, whitepapers, lead scoring, live dashboard |
| Enterprise | $8-10K/mo | ~75% | 8 articles/mo, strategy calls, SEO audits, backlink outreach, content repurposing, QBRs |
The ROI pitch: Your client's average deal is $60-120K/year. At $3K/month, they need less than ONE new client from content to break even. Two clients = 233-567% ROI.
Full proposal with market research, competitor pricing, pitch scripts, and implementation timeline:
Skynet Labs — AI Automation Agency
Built for agency clients who need automated, high-quality content that ranks in both traditional search and AI answer engines.
MIT — use it, modify it, build on it.
Need an automated content engine for your agency or brand?
I'm Waseem Nasir — founder of Skynet Labs / SkynetJoe, an AI Automation Agency. n8n + GPT-4.1 + Gemini content pipelines, AEO/SEO automation, weekly automated articles.
50+ live projects across: Healthcare · Legal · Real Estate · E-Commerce · Logistics · HVAC · SaaS · Consulting
AI automation · n8n · GoHighLevel · Claude Code · Next.js · React · Python · freelance · hire me · agency