This workflow corresponds to n8n.io template #11880 — we link there as the canonical source.
This workflow follows the Agent → Gmail recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"meta": {
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "3615d7d1-d6dd-4f29-adfd-ce6a73805794",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
9248,
6688
],
"parameters": {
"color": 6,
"width": 368,
"height": 632,
"content": "## Author\n\n## Digimetalab\nAutomation consultant from Bali, with 3+ years helping Sales & Marketing streamline processes. We offer custom n8n solutions to boost efficiency. Book an initial consultation via our link for tailored automation.\n\nFor business inquiries, email we at digimetalab@gmail.com\nOr message me on [Telegram](https://t.me/digimetalab) for a faster response.\n\n### Check out my other templates\n### \ud83d\udc49 https://n8n.io/creators/digimetalab/\n"
},
"typeVersion": 1
},
{
"id": "621345d7-4f6d-4d95-92df-cbeb48a6313f",
"name": "Daily 8 AM Trigger1",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
9344,
7792
],
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 8
}
]
}
},
"typeVersion": 1.3
},
{
"id": "7dd756a3-2c39-49fa-850a-826ce613a5de",
"name": "Workflow Configuration1",
"type": "n8n-nodes-base.set",
"position": [
9536,
7792
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "id-1",
"name": "activeCampaignsSheet",
"type": "string",
"value": "Active Campaigns"
},
{
"id": "id-2",
"name": "dailyContentPlanSheet",
"type": "string",
"value": "Daily Content Plan"
},
{
"id": "id-3",
"name": "newsRssFeedUrl",
"type": "string",
"value": "<__PLACEHOLDER_VALUE__News RSS Feed URL (e.g., https://news.google.com/rss)__>"
},
{
"id": "id-4",
"name": "redditSubreddit",
"type": "string",
"value": "popular"
},
{
"id": "id-5",
"name": "gmailRecipient",
"type": "string",
"value": "<__PLACEHOLDER_VALUE__Email recipient address__>"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "e027b7a4-ce86-427b-96eb-aceb833e7054",
"name": "Fetch News RSS1",
"type": "n8n-nodes-base.rssFeedRead",
"position": [
9776,
7664
],
"parameters": {
"url": "={{ $('Workflow Configuration1').first().json.newsRssFeedUrl }}",
"options": {}
},
"typeVersion": 1.2
},
{
"id": "6bb22545-7a0c-4156-aabd-fcee85216f66",
"name": "Fetch Reddit Popular1",
"type": "n8n-nodes-base.reddit",
"position": [
9792,
7824
],
"parameters": {
"limit": 10,
"filters": {},
"operation": "getAll",
"subreddit": "={{ $('Workflow Configuration1').first().json.redditSubreddit }}"
},
"typeVersion": 1
},
{
"id": "0df0031c-ac3c-47bb-839f-46ca0bf313e2",
"name": "Merge Trends1",
"type": "n8n-nodes-base.merge",
"position": [
10048,
7760
],
"parameters": {
"mode": "combine",
"options": {},
"combineBy": "combineAll"
},
"typeVersion": 3.2
},
{
"id": "129f4374-d800-4d69-9010-e6557128086c",
"name": "Format Trending Topics1",
"type": "n8n-nodes-base.code",
"position": [
10224,
7760
],
"parameters": {
"jsCode": "// Extract and format trending topics from RSS and Reddit\nconst items = $input.all();\n\nconst trends = [];\n\nitems.forEach(item => {\n const data = item.json;\n \n // Handle RSS feed items\n if (data.title && data.link) {\n trends.push({\n source: 'News',\n title: data.title,\n url: data.link || data.url\n });\n }\n // Handle Reddit posts\n else if (data.data?.title) {\n trends.push({\n source: 'Reddit',\n title: data.data.title,\n url: 'https://reddit.com' + data.data.permalink\n });\n }\n});\n\n// Create summary\nconst trendingSummary = trends.map((t, i) => `${i+1}. [${t.source}] ${t.title}`).join('\\n');\n\nreturn [{\n json: {\n trends: trends,\n trendingSummary: trendingSummary,\n totalTrends: trends.length\n }\n}];"
},
"typeVersion": 2
},
{
"id": "aaf2d679-2f7a-492d-a5ea-b79ba9193ab3",
"name": "Read Active Campaigns1",
"type": "n8n-nodes-base.googleSheets",
"position": [
9984,
8176
],
"parameters": {
"options": {
"returnFirstMatch": false
},
"sheetName": {
"__rl": true,
"mode": "name",
"value": "={{ $('Workflow Configuration1').first().json.activeCampaignsSheet }}"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "<__PLACEHOLDER_VALUE__Google Sheets Document ID__>"
}
},
"typeVersion": 4.7
},
{
"id": "3735cc20-e43f-4dae-9aef-fd9106019175",
"name": "Check Campaign Status1",
"type": "n8n-nodes-base.if",
"position": [
10176,
8176
],
"parameters": {
"options": {},
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": false,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "id-1",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.status }}",
"rightValue": "active"
}
]
}
},
"typeVersion": 2.3
},
{
"id": "c258e5d4-63b3-4374-8e7e-12babd61a283",
"name": "Enrich with Trends1",
"type": "n8n-nodes-base.set",
"position": [
10400,
7760
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "id-1",
"name": "trendingTopics",
"type": "string",
"value": "={{ $('Format Trending Topics1').first().json.trendingSummary || 'No trends available' }}"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "4e3da8ac-6c4a-4efa-a9cc-aff932107b2a",
"name": "Groq Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatGroq",
"position": [
10656,
8032
],
"parameters": {
"model": "llama-3.3-70b-versatile",
"options": {}
},
"typeVersion": 1
},
{
"id": "514a1908-4070-4612-b441-db32e825fb56",
"name": "Generate Content Ideas1",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
10672,
7760
],
"parameters": {
"text": "={{ $json }}",
"options": {
"systemMessage": "You are a social media content strategist. Generate daily content ideas for social media campaigns.\n\nFor each campaign provided, create:\n1. An engaging post caption tailored to the platform and target audience\n2. Creative direction with visual suggestions\n3. Relevant hashtags (5-10 hashtags)\n4. Best posting time recommendation for the platform\n\nConsider the project name, theme, target audience, and platform when generating ideas. Make the content authentic, engaging, and platform-appropriate.\n\nIMPORTANT: If trending topics are available in the input data, incorporate them naturally into your content suggestions to maximize engagement and relevance."
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 3
},
{
"id": "8f50103c-f5f6-4f9b-845a-02a20f443d97",
"name": "Structured Output Parser1",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
10832,
8032
],
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"postCaption\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"description\": \"Engaging post caption for the campaign\"\n\t\t},\n\t\t\"creativeDirection\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"description\": \"Creative direction and visual suggestions\"\n\t\t},\n\t\t\"hashtags\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"description\": \"Relevant hashtags for the post\"\n\t\t},\n\t\t\"bestPostingTime\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"description\": \"Recommended posting time for the platform\"\n\t\t}\n\t}\n}"
},
"typeVersion": 1.3
},
{
"id": "190d7825-4c93-47aa-b1ec-c8741f3e3591",
"name": "Format for Sheets1",
"type": "n8n-nodes-base.set",
"position": [
11376,
7760
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "id-1",
"name": "date",
"type": "string",
"value": "={{ $now.format('yyyy-MM-dd') }}"
},
{
"id": "id-2",
"name": "postCaption",
"type": "string",
"value": "={{ $json.output.postCaption }}"
},
{
"id": "id-3",
"name": "creativeDirection",
"type": "string",
"value": "={{ $json.output.creativeDirection }}"
},
{
"id": "id-4",
"name": "hashtags",
"type": "string",
"value": "={{ $json.output.hashtags }}"
},
{
"id": "id-5",
"name": "bestPostingTime",
"type": "string",
"value": "={{ $json.output.bestPostingTime }}"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "8e8ac742-5aba-44e1-a671-695b7c7a7e34",
"name": "Append to Daily Content Plan1",
"type": "n8n-nodes-base.googleSheets",
"position": [
11840,
7712
],
"parameters": {
"columns": {
"value": {},
"mappingMode": "autoMapInputData"
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "name",
"value": "={{ $('Workflow Configuration1').first().json.dailyContentPlanSheet }}"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "<__PLACEHOLDER_VALUE__Google Sheets Document ID__>"
}
},
"typeVersion": 4.7
},
{
"id": "26d13667-c480-4dc5-95de-2e4a4944f48f",
"name": "Format for Calendar1",
"type": "n8n-nodes-base.set",
"position": [
11840,
7904
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "id-1",
"name": "summary",
"type": "string",
"value": "={{ $json.projectName + ' - ' + $json.platform }}"
},
{
"id": "id-2",
"name": "description",
"type": "string",
"value": "={{ 'Post Caption: ' + $json.postCaption + '\\n\\nCreative Direction: ' + $json.creativeDirection + '\\n\\nHashtags: ' + $json.hashtags }}"
},
{
"id": "id-3",
"name": "start",
"type": "string",
"value": "={{ $json.date + 'T' + $json.bestPostingTime }}"
},
{
"id": "id-4",
"name": "end",
"type": "string",
"value": "={{ $json.date + 'T' + $json.bestPostingTime }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "9fca612e-c65d-492d-9e86-812eb3b79e12",
"name": "Create Calendar Event1",
"type": "n8n-nodes-base.googleCalendar",
"position": [
12064,
7904
],
"parameters": {
"end": "={{ $json.end }}",
"start": "={{ $json.start }}",
"calendar": {
"__rl": true,
"mode": "id",
"value": "<__PLACEHOLDER_VALUE__Google Calendar ID (e.g., primary)__>"
},
"additionalFields": {
"summary": "={{ $json.summary }}",
"description": "={{ $json.description }}"
}
},
"typeVersion": 1.3
},
{
"id": "3d63030b-c8cf-47e8-9516-927d6ebd6ea1",
"name": "Calculate Performance Metrics1",
"type": "n8n-nodes-base.code",
"position": [
11840,
8096
],
"parameters": {
"jsCode": "// Calculate performance metrics for each campaign\nconst items = $input.all();\n\nconst metrics = items.map(item => {\n const data = item.json;\n \n // Calculate content quality score (1-10)\n const captionLength = data.postCaption?.length || 0;\n const hashtagCount = (data.hashtags?.match(/#/g) || []).length;\n const hasCreativeDirection = data.creativeDirection?.length > 50;\n \n let qualityScore = 5; // Base score\n if (captionLength > 100 && captionLength < 300) qualityScore += 2;\n if (hashtagCount >= 5 && hashtagCount <= 10) qualityScore += 2;\n if (hasCreativeDirection) qualityScore += 1;\n \n return {\n ...data,\n qualityScore,\n captionLength,\n hashtagCount,\n generatedAt: new Date().toISOString()\n };\n});\n\nreturn metrics;"
},
"typeVersion": 2
},
{
"id": "f18f4a15-d857-46f5-8355-96386fc542dc",
"name": "Aggregate Daily Summary1",
"type": "n8n-nodes-base.aggregate",
"position": [
12064,
8096
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData"
},
"typeVersion": 1
},
{
"id": "464be06b-4ba9-43bf-b794-01b93cf9ebb3",
"name": "Format Email Content1",
"type": "n8n-nodes-base.set",
"position": [
12288,
8096
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "id-1",
"name": "emailSubject",
"type": "string",
"value": "={{ '\ud83d\udcca Daily Content Plan Summary - ' + $now.format('MMMM dd, yyyy') }}"
},
{
"id": "id-2",
"name": "emailBody",
"type": "string",
"value": "=<html>\n<body style=\"font-family: Arial, sans-serif; line-height: 1.6; color: #333;\">\n <h2 style=\"color: #4CAF50;\">\ud83d\ude80 Daily Content Plan Generated</h2>\n \n <p><strong>Date:</strong> {{ $now.format('MMMM dd, yyyy') }}</p>\n \n <div style=\"background-color: #f5f5f5; padding: 15px; border-radius: 5px; margin: 20px 0;\">\n <h3 style=\"margin-top: 0;\">\ud83d\udcc8 Summary Statistics</h3>\n <ul>\n <li><strong>Total Campaigns:</strong> {{ $json.campaigns.length }}</li>\n <li><strong>Average Quality Score:</strong> {{ ($json.qualityScores.reduce((a,b) => a+b, 0) / $json.qualityScores.length).toFixed(1) }}/10</li>\n </ul>\n </div>\n \n <h3>\ud83d\udcf1 Platforms</h3>\n <ul>\n {{ $json.platforms.map(p => `<li>${p}</li>`).join('') }}\n </ul>\n \n <h3>\ud83d\udcdd Campaigns Processed</h3>\n <ul>\n {{ $json.campaigns.map(c => `<li>${c}</li>`).join('') }}\n </ul>\n \n <div style=\"background-color: #e8f5e9; padding: 15px; border-radius: 5px; margin: 20px 0;\">\n <p style=\"margin: 0;\">\u2705 All content ideas have been saved to Google Sheets and scheduled in Google Calendar!</p>\n </div>\n \n <p style=\"color: #666; font-size: 12px; margin-top: 30px;\">This is an automated message from your Daily Content Planner workflow.</p>\n</body>\n</html>"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "42a4d0d1-2b39-43ce-8d65-97495812ea4d",
"name": "Send Gmail Summary1",
"type": "n8n-nodes-base.gmail",
"position": [
12512,
8096
],
"parameters": {
"sendTo": "={{ $('Workflow Configuration1').first().json.gmailRecipient }}",
"message": "={{ $json.emailBody }}",
"options": {},
"subject": "={{ $json.emailSubject }}"
},
"typeVersion": 2.2
},
{
"id": "099e9fb1-2009-4187-96f8-702faae072dc",
"name": "Main Overview1",
"type": "n8n-nodes-base.stickyNote",
"position": [
9648,
6688
],
"parameters": {
"width": 996,
"height": 624,
"content": "## Daily Content Planner for social media campaigns\n\n### How it works\n\n1. **Schedule Trigger:** runs daily at 8 AM to start the workflow.\n2. **Trend Collection:** fetches trending topics from RSS feeds and Reddit for content inspiration.\n3. **Campaign Reader:** reads active campaigns from your Google Sheets with project details.\n4. **AI Agent (Groq + Llama 3.3):** generates captions, hashtags, creative direction, and best posting times.\n5. **Save & Schedule:** writes content to Sheets and creates Google Calendar events.\n6. **Email Summary:** sends a quality-scored daily report via Gmail.\n\n### Setup\n\n\u2610 Connect **Google Sheets** OAuth on Read and Append nodes\n\u2610 Connect **Google Calendar** OAuth on Calendar node\n\u2610 Connect **Gmail** OAuth on Send Summary node\n\u2610 Add **Groq API** key\n\u2610 Set RSS feed URL in Workflow Configuration\n\u2610 Turn on **Run daily** (schedule)\n\n### Customize\n\n\u2022 **Sheets:** change sheet names in Workflow Configuration node\n\u2022 **Trends:** swap RSS feed URL or Reddit subreddit for different sources\n\u2022 **AI Prompt:** modify system message in Generate Content Ideas node"
},
"typeVersion": 1
},
{
"id": "e1e78fde-843f-46d8-a37a-d1d94bf71a6d",
"name": "Section ",
"type": "n8n-nodes-base.stickyNote",
"position": [
9248,
7360
],
"parameters": {
"color": 2,
"width": 1292,
"height": 664,
"content": "## 1. Trigger & Trend Collection\nFetches trending topics from RSS feeds and Reddit, then formats them for AI context."
},
"typeVersion": 1
},
{
"id": "a5257a71-c2d7-4359-a0ff-5283d048427f",
"name": "Section 5",
"type": "n8n-nodes-base.stickyNote",
"position": [
9632,
8048
],
"parameters": {
"color": 3,
"width": 904,
"height": 360,
"content": "## 2. Campaign Processing\nReads active campaigns from Google Sheets and enriches with trending topics."
},
"typeVersion": 1
},
{
"id": "c233878b-fd07-49b4-9105-ce9654ca95ef",
"name": "Section 6",
"type": "n8n-nodes-base.stickyNote",
"position": [
10576,
7360
],
"parameters": {
"color": 7,
"width": 664,
"height": 1052,
"content": "## 3. AI Content Generation\nGroq AI creates captions, hashtags, creative direction, and posting times."
},
"typeVersion": 1
},
{
"id": "b8ba1f34-7ef0-4d4a-a8a6-161215975fde",
"name": "Section 7",
"type": "n8n-nodes-base.stickyNote",
"position": [
11264,
7360
],
"parameters": {
"color": 4,
"width": 1448,
"height": 1044,
"content": "## 4. Save & Report\nSaves to Sheets, creates Calendar events, and sends email summary."
},
"typeVersion": 1
}
],
"connections": {
"Merge Trends1": {
"main": [
[
{
"node": "Format Trending Topics1",
"type": "main",
"index": 0
}
]
]
},
"Fetch News RSS1": {
"main": [
[
{
"node": "Merge Trends1",
"type": "main",
"index": 0
}
]
]
},
"Groq Chat Model1": {
"ai_languageModel": [
[
{
"node": "Generate Content Ideas1",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Format for Sheets1": {
"main": [
[
{
"node": "Append to Daily Content Plan1",
"type": "main",
"index": 0
},
{
"node": "Format for Calendar1",
"type": "main",
"index": 0
},
{
"node": "Calculate Performance Metrics1",
"type": "main",
"index": 0
}
]
]
},
"Daily 8 AM Trigger1": {
"main": [
[
{
"node": "Workflow Configuration1",
"type": "main",
"index": 0
}
]
]
},
"Enrich with Trends1": {
"main": [
[
{
"node": "Generate Content Ideas1",
"type": "main",
"index": 0
}
]
]
},
"Format for Calendar1": {
"main": [
[
{
"node": "Create Calendar Event1",
"type": "main",
"index": 0
}
]
]
},
"Fetch Reddit Popular1": {
"main": [
[
{
"node": "Merge Trends1",
"type": "main",
"index": 1
}
]
]
},
"Format Email Content1": {
"main": [
[
{
"node": "Send Gmail Summary1",
"type": "main",
"index": 0
}
]
]
},
"Check Campaign Status1": {
"main": [
[
{
"node": "Enrich with Trends1",
"type": "main",
"index": 0
}
]
]
},
"Read Active Campaigns1": {
"main": [
[
{
"node": "Check Campaign Status1",
"type": "main",
"index": 0
}
]
]
},
"Format Trending Topics1": {
"main": [
[
{
"node": "Enrich with Trends1",
"type": "main",
"index": 0
}
]
]
},
"Generate Content Ideas1": {
"main": [
[
{
"node": "Format for Sheets1",
"type": "main",
"index": 0
}
]
]
},
"Workflow Configuration1": {
"main": [
[
{
"node": "Fetch News RSS1",
"type": "main",
"index": 0
},
{
"node": "Fetch Reddit Popular1",
"type": "main",
"index": 0
},
{
"node": "Read Active Campaigns1",
"type": "main",
"index": 0
}
]
]
},
"Aggregate Daily Summary1": {
"main": [
[
{
"node": "Format Email Content1",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser1": {
"ai_outputParser": [
[
{
"node": "Generate Content Ideas1",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Calculate Performance Metrics1": {
"main": [
[
{
"node": "Aggregate Daily Summary1",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
How it works: Daily Trigger: Every morning at 8 AM, the workflow is automatically triggered. Fetch Trending Topics: The workflow collects trending topics from external sources, such as news RSS feeds and Reddit popular posts. These trends are merged and summarized to provide…
Source: https://n8n.io/workflows/11880/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
My workflow 14. Uses rssFeedRead, chainLlm, lmChatOpenAi, openWeatherMap. Scheduled trigger; 40 nodes.
This n8n automation workflow is designed for sales teams, client managers, consultants, or anyone who regularly schedules and follows up on meetings — and wants to save time doing it. If you often fin
This workflow automates end-to-end pre-surgery checklist reminders and confirmation tracking for healthcare operations teams. It ensures patients receive timely preparation instructions, can confirm c
This n8n workflow automatically analyzes your stock portfolio every day at 4 PM. It fetches portfolio data from Google Sheets, enriches it with latest market news via RSS, generates AI-powered stock i
This workflow automatically generates 2–3 high-quality Indian stock investment ideas daily by combining trending stock data + latest market news, processing it with AI (Groq/OpenAI), avoiding duplicat