What this workflow does
Every night at 22:00 (Asia/Ho_Chi_Minh), the workflow fetches the latest posts from multiple competitor WordPress RSS feeds, upserts them into Google Sheets, captures a dashboard screenshot (via ApiFlash), has Gemini Vision analyze the chart, and sends a concise insight report to Telegram.
Details
- Schedule (22:00) → runs daily.
- Fetch RSS → HTTP Request (or RSS Read) pulls each competitor’s /feed/ (standard WordPress RSS).
- Normalize & limit → parse XML → JSON, keep the most recent 5 per site for the digest (you can raise/lower this).
- Upsert to Google Sheets → match on link to avoid duplicates; store fields like guid, site, link, title, excerpt/description, content (if available), pubDate, updated.
- Screenshot the dashboard → ApiFlash captures the Google Sheets dashboard (specific gid) with your line chart of monthly post counts.
- Vision analysis → Gemini 1.5-Flash analyzes the chart image and returns a short executive summary, a Markdown table of values (≈ when estimated), insights, and recommended next steps.
- Telegram push → posts the AI summary (and optionally the screenshot) to your channel/group.
Who it’s for
- SEO/Content/Marketing teams tracking competitor publishing cadence.
- Founders/PMs who want a nightly snapshot.
- Competitive intelligence and analytics roles.
Requirements
- n8n (cloud or self-hosted).
- Google Sheets OAuth2, Telegram Bot, ApiFlash (access key), Google Gemini access.
- A Google Sheet with columns similar to: id/guid, site, link, title, excerpt, content, pubDate, updated.
- Setup
- Import the workflow JSON into n8n.
- Switch to RSS:
- Option A (simple): replace HTTP nodes with RSS Read and paste each competitor’s https://{domain}/feed/.
- Option B (keep HTTP): keep HTTP Request nodes, set Response: XML, then parse with XML node.
- Mapping to Sheets: point to your documentId and sheetName; set matching column = link for upsert.
- ApiFlash: add access_key and the Sheet URL with the correct gid that shows your chart; set scale_factor=2 (or higher for clarity).
- Gemini Vision: use model gemini-1.5-flash-latest with the included prompt (English output; Markdown table + insights + recommendations).
- Telegram: set bot credentials and chatId.
- Schedule: confirm 22:00 Asia/Ho_Chi_Minh (adjust as needed).
- Test: run once → verify rows append/update → see dashboard render → receive AI summary in Telegram.
Extending to more competitors
- Clone an HTTP/RSS node for each additional competitor, update the /feed/ URL, and connect it to the Merge node.
- No other changes are required—new data will be normalized, upserted, included in charts and in the AI summary automatically.
- Tips & gotchas
- WordPress RSS typically includes title, link, pubDate, guid, description, and sometimes content:encoded. If content:encoded is absent, fall back to description.
- Keep the Sheet chart source range dynamic (e.g., open-ended ranges) so new rows are reflected automatically.
- If a site’s RSS limits items, you can run multiple feeds (e.g., category feeds) or capture more history on the first run.
💡 About Margin AI
Margin Ai is an AI-services agency that acts as your AI Service Companion. We design intelligent, human-centric automation solutions—turning your team’s best practices into scalable workflows and tools. Industries like marketing, sales, and operations benefit from our tailored AI consulting, automation tools, and chatbot development.