Skip to content

Instantly share code, notes, and snippets.

@saadnvd1
Created December 27, 2025 01:15
Show Gist options
  • Select an option

  • Save saadnvd1/7fd456c47ffb2658af34b41c74b9b771 to your computer and use it in GitHub Desktop.

Select an option

Save saadnvd1/7fd456c47ffb2658af34b41c74b9b771 to your computer and use it in GitHub Desktop.
Create a Custom YouTube Channel Newsletter to Grow Your Audience with n8n
{
"name": "Create a Custom YouTube Channel Newsletter to Grow Your Audience with n8n copy",
"nodes": [
{
"parameters": {
"rule": {
"interval": [
{
"field": "weeks"
}
]
}
},
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
0,
0
],
"id": "5abd78e6-583e-415c-9a93-ac0057c725b7",
"name": "Schedule Trigger"
},
{
"parameters": {
"url": "https://www.youtube.com/feeds/videos.xml?channel_id=UC3cwHk82Cc3nO7RWqCSQRRQ",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
220,
0
],
"id": "c4943fc6-88a0-4cd9-9bf4-73f4e2cd4689",
"name": "Get YouTube RSS Feed"
},
{
"parameters": {
"options": {}
},
"type": "n8n-nodes-base.xml",
"typeVersion": 1,
"position": [
440,
0
],
"id": "86c9a912-c8b1-484d-a854-abc5dd970460",
"name": "Parse XML"
},
{
"parameters": {
"promptType": "define",
"text": "=Your job is to take this data {{ $json.feed.entry.toJsonString() }} and format it in the required output format. Also, summarize the video description at the same time as it'll be used in a newsletter.\n",
"hasOutputParser": true,
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 2,
"position": [
660,
0
],
"id": "58b4f4d1-bb03-4fd7-b0e4-118285fc6c02",
"name": "Summarize via AI"
},
{
"parameters": {
"jsonSchemaExample": "[\n {\n \t\"title\": \"Video Title\",\n \"description\": \"Video Description\",\n \t\"link\": \"https://www.youtube.com/shorts/5Pwe3TYnUrw\",\n \"thumbnail_url\": \"https://i1.ytimg.com/vi/ToW_AezocP0/hqdefault.jpg\"\n },\n {\n \t\"title\": \"Video Title\",\n \"description\": \"Video Description\",\n \t\"link\": \"https://www.youtube.com/shorts/5Pwe3TYnUrw\",\n \"thumbnail_url\": \"https://i1.ytimg.com/vi/ToW_AezocP0/hqdefault.jpg\"\n }\n]"
},
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"typeVersion": 1.3,
"position": [
820,
220
],
"id": "f2e88453-d0ee-43c6-a1ae-e83e68770dec",
"name": "Structured Output Parser"
},
{
"parameters": {
"model": {
"__rl": true,
"value": "gpt-4o-mini",
"mode": "list",
"cachedResultName": "gpt-4o-mini"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": [
620,
240
],
"id": "2027af99-7a90-450b-96aa-f7a4dd8831bd",
"name": "OpenAI Chat Model",
"credentials": {
"openAiApi": {
"id": "sdNuGXJSCdvpaZ5z",
"name": "FastClick OpenAI Account"
}
}
},
{
"parameters": {
"jsCode": "const videos = $input.first().json.output;\n\nlet html = `<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <title>Your YouTube Channel Newsletter</title>\n</head>\n<body style=\"background-color: #f5f7fa; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; color: #333333; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; margin: 0; padding: 0;\">\n <div role=\"main\" aria-label=\"Latest videos newsletter\" style=\"background-color: #ffffff; max-width: 600px; margin: 24px auto; padding: 24px 32px; border-radius: 12px; box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1); text-align: left;\">\n <h1 style=\"color: #ff6d5a; font-size: 30px; font-weight: 700; margin-bottom: 28px; text-align: center; letter-spacing: 1px;\">Latest Videos from My Channel</h1>\n`;\n\nfor (const video of videos) {\n const thumbnail = video.thumbnail_url || '';\n html += `\n <div style=\"border-bottom: 1px solid #e0e0e0; padding-bottom: 20px; margin-bottom: 20px; display: flex; align-items: flex-start; gap: 32px;\">\n <div aria-label=\"Video thumbnail\" style=\"flex-shrink: 0; width: 120px; height: 67px; border-radius: 8px; overflow: hidden; box-shadow: 0 3px 8px rgba(0,0,0,0.15); margin-right: 16px;\">\n <a href=\"${video.link}\" target=\"_blank\" rel=\"noopener noreferrer\">\n <img src=\"${thumbnail}\" alt=\"Thumbnail for ${video.title}\" style=\"width: 100%; height: 100%; object-fit: cover; display: block;\" />\n </a>\n </div>\n <div style=\"flex-grow: 1;\">\n <p style=\"font-size: 18px; font-weight: 600; margin: 0 0 8px 0; color: #222222;\">\n <a href=\"${video.link}\" target=\"_blank\" rel=\"noopener noreferrer\" style=\"color: #ff6d5a; text-decoration: none;\" tabindex=\"0\">${video.title}</a>\n </p>\n <p style=\"font-size: 14px; color: #555555; margin: 0; line-height: 1.5;\">${video.description}</p>\n </div>\n </div>\n `;\n}\n\nhtml += `\n </div>\n</body>\n</html>\n`;\n\n// Return the full HTML for use in the next node\nreturn [{ json: { newsletterHtml: html } }];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
1020,
0
],
"id": "3e1bc959-3ada-4471-a0d5-de31d52a3de5",
"name": "Generate Newsletter HTML"
},
{
"parameters": {
"html": "{{ $json.newsletterHtml }}"
},
"type": "n8n-nodes-base.html",
"typeVersion": 1.2,
"position": [
1240,
0
],
"id": "ced8b297-df76-42c1-a8e1-f89b4a2fc0cd",
"name": "Preview Newsletter HTML"
},
{
"parameters": {
"operation": "appendOrUpdate",
"documentId": {
"__rl": true,
"value": "17w5swDuFlwJrl32UQbj46NjRnprEQzYq0-sbpmxnvW0",
"mode": "list",
"cachedResultName": "Newsletter E-mails",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/17w5swDuFlwJrl32UQbj46NjRnprEQzYq0-sbpmxnvW0/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": 30928042,
"mode": "list",
"cachedResultName": "Newsletters",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/17w5swDuFlwJrl32UQbj46NjRnprEQzYq0-sbpmxnvW0/edit#gid=30928042"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"Newsletter ID": "={{ new Date().toISOString().slice(0,10).replace(/-/g,'') }}",
"Subject": "=Saad's YouTube Channel's Newsletter ({{ new Date().toLocaleDateString('en-US', { year: '2-digit', month: '2-digit', day: '2-digit' }) }})",
"HTML": "={{ $json.html }}"
},
"matchingColumns": [
"Newsletter ID"
],
"schema": [
{
"id": "Newsletter ID",
"displayName": "Newsletter ID",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "Subject",
"displayName": "Subject",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
},
{
"id": "HTML",
"displayName": "HTML",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true,
"removed": false
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.6,
"position": [
1460,
0
],
"id": "249693fe-409c-430d-8ca9-5df767a74513",
"name": "Log Newsletter Data",
"credentials": {
"googleSheetsOAuth2Api": {
"id": "dXuMGuClKAa5REaS",
"name": "Google Sheets account"
}
}
},
{
"parameters": {
"operation": "sendAndWait",
"sendTo": "saad@fastclick.ai",
"subject": "Approval Required for Newsletter",
"message": "=Hi, does this newsletter look good to you?\n\nSubject: {{ $json.Subject }}\nPreview: {{ $json.HTML }}",
"approvalOptions": {
"values": {
"approvalType": "double"
}
},
"options": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.1,
"position": [
1680,
0
],
"id": "1590f90b-7b46-44ce-8b1c-92cd452a3702",
"name": "Send For Approval",
"webhookId": "8a036a9c-0783-462d-a6bb-8944bdb80856",
"credentials": {
"gmailOAuth2": {
"id": "K0Hts5reOs2bgUrz",
"name": "FastClick"
}
}
},
{
"parameters": {
"mode": "combine",
"combineBy": "combineByPosition",
"options": {}
},
"type": "n8n-nodes-base.merge",
"typeVersion": 3.2,
"position": [
1960,
220
],
"id": "3eb8c290-cfef-4fab-b8ca-83e11853500d",
"name": "Merge"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "536502da-4dab-4076-9a7c-e9ea36bc6f7d",
"leftValue": "={{ $json.data.approved }}",
"rightValue": "",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
2180,
220
],
"id": "b0e4879d-3d25-4f34-b200-fafe98115653",
"name": "If"
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "17w5swDuFlwJrl32UQbj46NjRnprEQzYq0-sbpmxnvW0",
"mode": "list",
"cachedResultName": "Newsletter E-mails",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/17w5swDuFlwJrl32UQbj46NjRnprEQzYq0-sbpmxnvW0/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": 931785396,
"mode": "list",
"cachedResultName": "Form Responses 1",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/17w5swDuFlwJrl32UQbj46NjRnprEQzYq0-sbpmxnvW0/edit#gid=931785396"
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.6,
"position": [
2540,
80
],
"id": "73f40c02-cac6-4504-ade0-b802a1074fd0",
"name": "Get Subscribers",
"credentials": {
"googleSheetsOAuth2Api": {
"id": "Cuh60tWenIuXMFmb",
"name": "FastClick (Saad)"
}
}
},
{
"parameters": {
"documentId": {
"__rl": true,
"value": "17w5swDuFlwJrl32UQbj46NjRnprEQzYq0-sbpmxnvW0",
"mode": "list",
"cachedResultName": "Newsletter E-mails",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/17w5swDuFlwJrl32UQbj46NjRnprEQzYq0-sbpmxnvW0/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": 996680195,
"mode": "list",
"cachedResultName": "Get Sent",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/17w5swDuFlwJrl32UQbj46NjRnprEQzYq0-sbpmxnvW0/edit#gid=996680195"
},
"filtersUI": {
"values": [
{
"lookupColumn": "Newsletter ID",
"lookupValue": "={{ $json[\"Newsletter ID\"] }}"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.6,
"position": [
2500,
360
],
"id": "73f94393-a749-4056-b979-611d4cd09c8b",
"name": "Get Sent E-mails",
"credentials": {
"googleSheetsOAuth2Api": {
"id": "dXuMGuClKAa5REaS",
"name": "Google Sheets account"
}
}
},
{
"parameters": {
"mode": "combine",
"fieldsToMatchString": "E-mail Address",
"joinMode": "keepNonMatches",
"options": {}
},
"type": "n8n-nodes-base.merge",
"typeVersion": 3.2,
"position": [
2820,
320
],
"id": "a15ced65-f169-43c3-82d6-993eafe669d2",
"name": "Filter out Already Sent"
},
{
"parameters": {
"batchSize": 10,
"options": {}
},
"type": "n8n-nodes-base.splitInBatches",
"typeVersion": 3,
"position": [
3040,
320
],
"id": "8ddd6eee-36a0-44d3-9f84-f51c59ad7f28",
"name": "Loop Over Items"
},
{
"parameters": {
"sendTo": "={{ $json[\"E-mail Address\"] }}",
"subject": "={{ $('Merge').item.json.Subject }}",
"message": "={{ $('Merge').item.json.HTML }}",
"options": {}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.1,
"position": [
3260,
420
],
"id": "b2ad45f8-99d9-4a8a-91a3-e0221c42301a",
"name": "Send a message",
"webhookId": "10217a05-dfd2-45ca-9e2b-c68dc624f7fe",
"credentials": {
"gmailOAuth2": {
"id": "K0Hts5reOs2bgUrz",
"name": "FastClick"
}
}
},
{
"parameters": {
"operation": "append",
"documentId": {
"__rl": true,
"value": "17w5swDuFlwJrl32UQbj46NjRnprEQzYq0-sbpmxnvW0",
"mode": "list",
"cachedResultName": "Newsletter E-mails",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/17w5swDuFlwJrl32UQbj46NjRnprEQzYq0-sbpmxnvW0/edit?usp=drivesdk"
},
"sheetName": {
"__rl": true,
"value": 996680195,
"mode": "list",
"cachedResultName": "Get Sent",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/17w5swDuFlwJrl32UQbj46NjRnprEQzYq0-sbpmxnvW0/edit#gid=996680195"
},
"columns": {
"mappingMode": "defineBelow",
"value": {
"Newsletter ID": "={{ $('Merge').item.json[\"Newsletter ID\"] }}",
"E-mail Address": "={{ $('Loop Over Items').item.json[\"E-mail Address\"] }}"
},
"matchingColumns": [],
"schema": [
{
"id": "Newsletter ID",
"displayName": "Newsletter ID",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
},
{
"id": "E-mail Address",
"displayName": "E-mail Address",
"required": false,
"defaultMatch": false,
"display": true,
"type": "string",
"canBeUsedToMatch": true
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {}
},
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.6,
"position": [
3500,
560
],
"id": "d3e0fe99-2123-40d3-8911-ba868ed1280f",
"name": "Track Sent",
"credentials": {
"googleSheetsOAuth2Api": {
"id": "dXuMGuClKAa5REaS",
"name": "Google Sheets account"
}
}
},
{
"parameters": {
"amount": 10
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
3340,
840
],
"id": "38f5e0ea-e713-4c16-a46b-98efe426c257",
"name": "Wait",
"webhookId": "8b1f84d3-74e7-4d5d-9726-7fdc8e443d50"
},
{
"parameters": {
"authentication": "oAuth2",
"select": "channel",
"channelId": {
"__rl": true,
"value": "C0986QBQA3S",
"mode": "list",
"cachedResultName": "newsletter-alerts"
},
"text": "=Your latest newsletter, {{ $('Merge').item.json.Subject }}, has finished sending out to all your subscribers! Wooo!",
"otherOptions": {}
},
"type": "n8n-nodes-base.slack",
"typeVersion": 2.3,
"position": [
3260,
220
],
"id": "70963705-d1c9-44e9-96cf-109c66973c91",
"name": "Send a message1",
"webhookId": "3a165ad4-442d-412e-a61a-e6c8879a6d20",
"executeOnce": true,
"credentials": {
"slackOAuth2Api": {
"id": "L7suFIanbt2oJlbM",
"name": "Slack account"
}
}
}
],
"pinData": {
"Summarize via AI": [
{
"json": {
"output": [
{
"title": "Automated Follow-Ups with N8N + OpenAI (Game-Changer!) #shorts",
"description": "Learn to automate your follow-ups using N8N, Gmail, and OpenAI for better sales efficiency.",
"link": "https://www.youtube.com/shorts/5Pwe3TYnUrw",
"thumbnail_url": "https://i2.ytimg.com/vi/5Pwe3TYnUrw/hqdefault.jpg"
},
{
"title": "How I Setup My Own n8n Server in 6 Minutes",
"description": "Stop paying for n8n! Here's how to set it up on your own domain very affordably.",
"link": "https://www.youtube.com/shorts/rvU7kFq0DYI",
"thumbnail_url": "https://i3.ytimg.com/vi/rvU7kFq0DYI/hqdefault.jpg"
},
{
"title": "Stop Paying for n8n — Self‑Host in 5 Minutes for $6/month",
"description": "Self-host n8n easily on your domain for just $6/month with full control and no Docker.",
"link": "https://www.youtube.com/watch?v=ToW_AezocP0",
"thumbnail_url": "https://i1.ytimg.com/vi/ToW_AezocP0/hqdefault.jpg"
},
{
"title": "I Built an AI Sales Rep That Works While I Sleep 🤖📞",
"description": "Discover how AI can automate lead qualification and follow-ups while you sleep.",
"link": "https://www.youtube.com/shorts/DQDUwhAUqV0",
"thumbnail_url": "https://i1.ytimg.com/vi/DQDUwhAUqV0/hqdefault.jpg"
},
{
"title": "AI Calls and Qualifies Your Leads (Vapi + n8n + Google Sheets Tutorial)",
"description": "Automate your sales calls and lead qualification process using AI and no cold calling.",
"link": "https://www.youtube.com/watch?v=0NdRsUvBLFY",
"thumbnail_url": "https://i1.ytimg.com/vi/0NdRsUvBLFY/hqdefault.jpg"
},
{
"title": "Quit All Mac Apps with 1 Click — Meet Appocalypse 🔥",
"description": "Meet Appocalypse, a utility that allows you to quit all macOS apps with one click for enhanced focus.",
"link": "https://www.youtube.com/watch?v=G3zHxsafce4",
"thumbnail_url": "https://i4.ytimg.com/vi/G3zHxsafce4/hqdefault.jpg"
},
{
"title": "This Automation Follows Up With Leads FOR You (n8n + Tally + Gmail)",
"description": "Implement an automation that sends follow-up emails using AI with no delay.",
"link": "https://www.youtube.com/watch?v=vc0Ux1CNLsU",
"thumbnail_url": "https://i3.ytimg.com/vi/vc0Ux1CNLsU/hqdefault.jpg"
}
]
}
}
]
},
"connections": {
"Schedule Trigger": {
"main": [
[
{
"node": "Get YouTube RSS Feed",
"type": "main",
"index": 0
}
]
]
},
"Get YouTube RSS Feed": {
"main": [
[
{
"node": "Parse XML",
"type": "main",
"index": 0
}
]
]
},
"Parse XML": {
"main": [
[
{
"node": "Summarize via AI",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Summarize via AI",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Summarize via AI",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Summarize via AI": {
"main": [
[
{
"node": "Generate Newsletter HTML",
"type": "main",
"index": 0
}
]
]
},
"Generate Newsletter HTML": {
"main": [
[
{
"node": "Preview Newsletter HTML",
"type": "main",
"index": 0
}
]
]
},
"Preview Newsletter HTML": {
"main": [
[
{
"node": "Log Newsletter Data",
"type": "main",
"index": 0
}
]
]
},
"Log Newsletter Data": {
"main": [
[
{
"node": "Send For Approval",
"type": "main",
"index": 0
},
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Send For Approval": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Merge": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
]
]
},
"If": {
"main": [
[
{
"node": "Get Subscribers",
"type": "main",
"index": 0
},
{
"node": "Get Sent E-mails",
"type": "main",
"index": 0
}
]
]
},
"Get Subscribers": {
"main": [
[
{
"node": "Filter out Already Sent",
"type": "main",
"index": 0
}
]
]
},
"Get Sent E-mails": {
"main": [
[
{
"node": "Filter out Already Sent",
"type": "main",
"index": 1
}
]
]
},
"Filter out Already Sent": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
},
"Loop Over Items": {
"main": [
[
{
"node": "Send a message1",
"type": "main",
"index": 0
}
],
[
{
"node": "Send a message",
"type": "main",
"index": 0
}
]
]
},
"Send a message": {
"main": [
[
{
"node": "Track Sent",
"type": "main",
"index": 0
}
]
]
},
"Track Sent": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "Loop Over Items",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "7b94fd22-0a9e-4a05-a046-cd856b787e18",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "8468b85de8e4b6887414b85fb6c068bf3d098a516fd4b9a620cd9b625cbfa809"
},
"id": "Bubo48ttrwPF767M",
"tags": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment