{"workflow":{"id":10383,"name":"Send GPT-4 Telegram polls to multiple groups with Google Sheets analytics","views":21,"recentViews":0,"totalViews":21,"createdAt":"2025-10-31T11:48:04.656Z","description":"An enterprise-grade n8n workflow that leverages OpenAI GPT-4 to generate contextually relevant poll questions and automatically distributes them across multiple Telegram groups and channels. Includes comprehensive analytics tracking, smart error handling, real-time admin notifications, and priority-based topic scheduling.\n\nPerfect for community managers, HR teams, educators, marketing departments, and organizations running multiple Telegram communities who want to maintain consistent engagement without manual effort.\n\n### How it works\n\n1. **Schedule Trigger** - Fires on a configurable cron (default: 9 AM & 5 PM weekdays)\n2. **Load Topic Queue** - Reads priority-ranked topics from Google Sheets topic registry\n3. **Select Best Topic** - Picks the highest-priority, freshest topic with 24-hour dedup guard\n4. **GPT-4 Poll Generation** - Creates engaging, on-brand poll questions with emoji options\n5. **Validate Poll** - Enforces Telegram API limits and content safety before sending\n6. **Multi-Group Deploy** - Distributes poll + context message to every enabled Telegram group\n7. **Analytics Logging** - Writes per-poll deployment stats to Google Sheets\n8. **Admin Telegram Alert** - Sends real-time deploy summary to admin chat\n9. **Topic Queue Update** - Marks topic used, updates next-scheduled date\n\n### Google Sheets Setup\n**Sheet 1 — Topic Queue:** `topic | category | priority | language | tone | targetAudience | lastUsed | usageCount | enabled`\n**Sheet 2 — Group Registry:** `groupId | groupName | groupType | language | enabled`\n**Sheet 3 — Analytics Log:** `pollId | topic | question | totalGroups | successfulGroups | successRate | completedAt`\n\n### Credentials Needed\n- **OpenAI API** — GPT-4o poll generation\n- **Telegram Bot API** — Sending polls and messages\n- **Google Sheets** — Topic queue, group registry, analytics\n- **SMTP** — Error alert emails\n\n### Key Features\n- Priority-based topic scheduling with staleness detection\n- Telegram API constraint enforcement (255 char question, 100 char options)\n- Per-group error isolation — one failed group never blocks others\n- Real-time admin Telegram notification with success/fail breakdown\n- Full SOC-ready audit log for every poll deployment\n\n\n**Explore More Automation:**\n[Contact us](https://www.oneclickitsolution.com/contact-us/) to design AI-powered lead nurturing, content engagement, and multi-platform reply workflows tailored to your growth strategy.","workflow":{"id":"W3mFlFpV1gzKnEa3","meta":{"instanceId":"dd69efaf8212c74ad206700d104739d3329588a6f3f8381a46a481f34c9cc281","templateCredsSetupCompleted":true},"name":"AI-Powered Telegram Poll Automation with Analytics and Multi-Group Deploy","tags":[],"nodes":[{"id":"fa145afe-a1a4-434d-8f5a-b1c7d4f20611","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-1952,96],"parameters":{"width":780,"height":1068,"content":"## AI-Powered Telegram Poll Automation with Analytics & Multi-Group Deploy\n\nAn enterprise-grade n8n workflow that leverages OpenAI GPT-4 to generate contextually relevant poll questions and automatically distributes them across multiple Telegram groups and channels. Includes comprehensive analytics tracking, smart error handling, real-time admin notifications, and priority-based topic scheduling.\n\nPerfect for community managers, HR teams, educators, marketing departments, and organizations running multiple Telegram communities who want to maintain consistent engagement without manual effort.\n\n### How it works\n\n1. **Schedule Trigger** - Fires on a configurable cron (default: 9 AM & 5 PM weekdays)\n2. **Load Topic Queue** - Reads priority-ranked topics from Google Sheets topic registry\n3. **Select Best Topic** - Picks the highest-priority, freshest topic with 24-hour dedup guard\n4. **GPT-4 Poll Generation** - Creates engaging, on-brand poll questions with emoji options\n5. **Validate Poll** - Enforces Telegram API limits and content safety before sending\n6. **Multi-Group Deploy** - Distributes poll + context message to every enabled Telegram group\n7. **Analytics Logging** - Writes per-poll deployment stats to Google Sheets\n8. **Admin Telegram Alert** - Sends real-time deploy summary to admin chat\n9. **Topic Queue Update** - Marks topic used, updates next-scheduled date\n\n### Google Sheets Setup\n**Sheet 1 — Topic Queue:** `topic | category | priority | language | tone | targetAudience | lastUsed | usageCount | enabled`\n**Sheet 2 — Group Registry:** `groupId | groupName | groupType | language | enabled`\n**Sheet 3 — Analytics Log:** `pollId | topic | question | totalGroups | successfulGroups | successRate | completedAt`\n\n### Credentials Needed\n- **OpenAI API** — GPT-4o poll generation\n- **Telegram Bot API** — Sending polls and messages\n- **Google Sheets** — Topic queue, group registry, analytics\n- **SMTP** — Error alert emails\n\n### Key Features\n- Priority-based topic scheduling with staleness detection\n- Telegram API constraint enforcement (255 char question, 100 char options)\n- Per-group error isolation — one failed group never blocks others\n- Real-time admin Telegram notification with success/fail breakdown\n- Full SOC-ready audit log for every poll deployment\n\n---\n\n**Explore More Automation:**\n[Contact us](https://www.oneclickitsolution.com/contact-us/) to design AI-powered lead nurturing, content engagement, and multi-platform reply workflows tailored to your growth strategy."},"typeVersion":1},{"id":"aa0ff31a-4f92-4d56-87bb-76540c5068e9","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-1072,464],"parameters":{"color":4,"width":616,"height":328,"content":"## 1. Schedule & Topic Selection"},"typeVersion":1},{"id":"ad144a6e-38fe-4324-98c7-11123bcef653","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-400,288],"parameters":{"color":4,"width":508,"height":684,"content":"## 2. GPT-4 Generation & Validation"},"typeVersion":1},{"id":"67b5ec41-9e25-43cb-9f3c-da19f39f5f12","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[160,256],"parameters":{"color":4,"width":608,"height":732,"content":"## 3. Multi-Group Telegram Deploy"},"typeVersion":1},{"id":"1d51d614-e5d9-4c25-a645-30a500a35196","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[848,256],"parameters":{"color":4,"width":1260,"height":844,"content":"## 4. Analytics, Admin Alert, Error Handling & Queue Update"},"typeVersion":1},{"id":"6484390c-3bcd-4add-b054-5d90b6d605f2","name":"Poll Schedule Trigger","type":"n8n-nodes-base.scheduleTrigger","position":[-1040,624],"parameters":{"rule":{"interval":[{"field":"cronExpression","expression":"0 9,17 * * 1-5"}]}},"typeVersion":1.2},{"id":"63567ee5-4e7e-4084-9fb5-b9b3023ee45b","name":"Load Topic Queue from Sheets","type":"n8n-nodes-base.googleSheets","position":[-816,624],"parameters":{"options":{},"sheetName":{"__rl":true,"mode":"id","value":"="},"documentId":{"__rl":true,"mode":"id","value":"="},"authentication":"serviceAccount"},"credentials":{"googleApi":{"id":"ScSS2KxGQULuPtdy","name":"Google Sheets- test"}},"typeVersion":4.5,"continueOnFail":true},{"id":"cf38c882-0451-4ca0-9d2d-1e782e387e5d","name":"Select Highest Priority Topic","type":"n8n-nodes-base.code","position":[-592,624],"parameters":{"jsCode":"// Collect all topic rows\nconst topics = $input.all().map(i => i.json);\n\nif (!topics || topics.length === 0) {\n  throw new Error('Topic queue is empty. Please add topics to your Google Sheets topic registry.');\n}\n\n// Filter enabled topics only\nconst enabled = topics.filter(t => String(t.enabled).toLowerCase() === 'true');\nif (enabled.length === 0) {\n  throw new Error('No enabled topics found. Set enabled=true for at least one topic.');\n}\n\n// 24-hour dedup: skip recently used topics\nconst yesterday = new Date(Date.now() - 24 * 60 * 60 * 1000);\nconst fresh = enabled.filter(t => !t.lastUsed || new Date(t.lastUsed) < yesterday);\n\n// Sort by priority desc, then by lastUsed asc (least recently used first)\nconst pool = (fresh.length > 0 ? fresh : enabled).sort((a, b) => {\n  const pd = (parseInt(b.priority) || 5) - (parseInt(a.priority) || 5);\n  if (pd !== 0) return pd;\n  const au = a.lastUsed ? new Date(a.lastUsed).getTime() : 0;\n  const bu = b.lastUsed ? new Date(b.lastUsed).getTime() : 0;\n  return au - bu;\n});\n\nconst selected = pool[0];\n\nconst pollSession = {\n  pollId: `POLL-${Date.now()}-${Math.random().toString(36).substr(2,7).toUpperCase()}`,\n  topic: (selected.topic || 'General Community').trim(),\n  category: (selected.category || 'General').trim(),\n  priority: parseInt(selected.priority) || 5,\n  language: selected.language || 'en',\n  tone: selected.tone || 'professional',\n  targetAudience: selected.targetAudience || 'community members',\n  usageCount: parseInt(selected.usageCount || 0) + 1,\n  totalTopics: enabled.length,\n  freshTopics: fresh.length,\n  scheduledAt: new Date().toISOString()\n};\n\nreturn [{ json: { pollSession } }];"},"typeVersion":2},{"id":"38a3ef73-cf36-4dd3-bf06-fb365f0483b7","name":"Load Telegram Group Registry","type":"n8n-nodes-base.googleSheets","position":[-304,480],"parameters":{"options":{},"sheetName":{"__rl":true,"mode":"id","value":"="},"documentId":{"__rl":true,"mode":"id","value":"="}},"credentials":{"googleSheetsOAuth2Api":{"id":"sldw2qK7iVusK0rY","name":"Google Sheets account"}},"typeVersion":4.5,"continueOnFail":true},{"id":"b8393df3-941e-4f14-9916-8f1b7e051f3b","name":"GPT-4 Poll Question Generation","type":"@n8n/n8n-nodes-langchain.agent","position":[-368,784],"parameters":{"text":"=You are an expert community engagement specialist and poll designer for Telegram communities.\n\nGenerate a highly engaging, on-brand Telegram poll for the topic below.\n\n**Context:**\n- Topic: {{ $json.pollSession.topic }}\n- Category: {{ $json.pollSession.category }}\n- Language: {{ $json.pollSession.language }}\n- Tone: {{ $json.pollSession.tone }}\n- Target Audience: {{ $json.pollSession.targetAudience }}\n- Poll ID: {{ $json.pollSession.pollId }}\n\n**Hard Rules (Telegram API constraints):**\n1. Question MUST be under 255 characters\n2. Generate EXACTLY 4 answer options\n3. Each option MUST be under 100 characters\n4. Options must be mutually exclusive and non-overlapping\n5. Zero offensive, political, or divisive content\n6. Start each option with a distinct emoji for visual appeal\n7. Make the question feel natural and conversational\n8. Never generate generic Yes/No/Maybe options\n\n**Tone Guide:**\n- professional: Clear, respectful, business-appropriate\n- casual: Friendly, conversational, light humour OK\n- educational: Informative angle, learning-oriented\n- fun: Creative, emoji-rich, playful\n\n**Respond in strict JSON only — no markdown, no explanation outside the JSON:**\n{\n  \"question\": \"Your poll question here (max 255 chars)?\",\n  \"options\": [\n    \"🚀 Option one here\",\n    \"⚡ Option two here\",\n    \"🎯 Option three here\",\n    \"💡 Option four here\"\n  ],\n  \"isAnonymous\": true,\n  \"allowsMultipleAnswers\": false,\n  \"openPeriod\": 86400,\n  \"hashtags\": [\"#Hashtag1\", \"#Hashtag2\", \"#Hashtag3\"],\n  \"contentRating\": \"safe\",\n  \"engagementScore\": 85,\n  \"explanation\": \"One sentence on why this poll will resonate with the audience.\"\n}","options":{"systemMessage":"You are a Telegram community engagement expert. Generate poll content that maximises participation and discussion. Output valid JSON only — no markdown fences, no preamble, no trailing text. All content must be safe, inclusive, and brand-appropriate."},"promptType":"define"},"typeVersion":1.6},{"id":"f3cd5065-b0c3-401e-b876-02338da5648c","name":"GPT-4o Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[-288,1008],"parameters":{"model":"gpt-4o","options":{"maxTokens":800,"temperature":0.75}},"credentials":{"openAiApi":{"id":"1vLQlwKIezvFH8UB","name":"OpenAi David"}},"typeVersion":1},{"id":"8bf39649-2878-4623-8084-8638f5f50e2f","name":"Validate Poll Quality and Safety","type":"n8n-nodes-base.code","position":[-16,624],"parameters":{"mode":"runOnceForEachItem","jsCode":"// Parse GPT-4 output\nconst aiResponse = $input.item.json;\nlet aiText = aiResponse.response || aiResponse.output || aiResponse.text || '';\nif (aiResponse.content && Array.isArray(aiResponse.content)) {\n  aiText = aiResponse.content[0]?.text || aiResponse.content[0]?.message?.content || '';\n}\nconst clean = aiText.replace(/```json\\s*/g,'').replace(/```\\s*/g,'').trim();\n\nlet poll;\ntry { poll = JSON.parse(clean); }\ncatch(e) { throw new Error(`GPT-4 JSON parse failed: ${e.message}. Raw: ${clean.substring(0,200)}`); }\n\n// Validation errors array\nconst errors = [];\n\n// Question checks\nif (!poll.question || !poll.question.trim()) errors.push('Question is empty');\nelse if (poll.question.length > 255) errors.push(`Question ${poll.question.length} chars — max 255`);\n\n// Options checks\nif (!Array.isArray(poll.options)) errors.push('Options must be an array');\nelse if (poll.options.length < 2) errors.push('Need at least 2 options');\nelse if (poll.options.length > 10) errors.push(`Too many options: ${poll.options.length} — max 10`);\nelse poll.options.forEach((o,i) => {\n  if (!o || !o.trim()) errors.push(`Option ${i+1} is empty`);\n  else if (o.length > 100) errors.push(`Option ${i+1}: ${o.length} chars — max 100`);\n});\n\n// Content safety\nconst blocked = ['hate','violence','explicit','illegal','discrimination'];\nconst allText = ((poll.question||'') + ' ' + (poll.options||[]).join(' ')).toLowerCase();\nconst hits = blocked.filter(w => allText.includes(w));\nif (hits.length) errors.push(`Blocked keywords: ${hits.join(', ')}`);\nif (poll.contentRating && poll.contentRating !== 'safe') errors.push(`Content flagged: ${poll.contentRating}`);\n\nif (errors.length > 0) throw new Error(`Poll validation failed: ${errors.join(' | ')}`);\n\n// Load groups from upstream\nconst pollSession = $('Select Highest Priority Topic').first().json.pollSession;\nconst groupRegistry = $('Load Telegram Group Registry').all().map(i => i.json);\nconst enabledGroups = groupRegistry.filter(g => String(g.enabled).toLowerCase() === 'true');\n\nif (enabledGroups.length === 0) {\n  throw new Error('No enabled groups in registry. Add groups to the Google Sheets group registry.');\n}\n\n// Safe-trim options\nconst safeOptions = poll.options.map(o => o.substring(0,100).trim());\n\nreturn {\n  json: {\n    pollSession,\n    pollContent: {\n      question: poll.question.trim(),\n      options: safeOptions,\n      isAnonymous: poll.isAnonymous !== false,\n      allowsMultipleAnswers: poll.allowsMultipleAnswers === true,\n      openPeriod: Math.min(parseInt(poll.openPeriod) || 86400, 604800),\n      hashtags: poll.hashtags || [],\n      engagementScore: poll.engagementScore || 0,\n      explanation: poll.explanation || ''\n    },\n    targetGroups: enabledGroups,\n    groupCount: enabledGroups.length,\n    validatedAt: new Date().toISOString()\n  }\n};"},"typeVersion":2},{"id":"67e59347-0de0-4d99-85c8-f100b0d27b75","name":"Split Groups for Parallel Deploy","type":"n8n-nodes-base.splitInBatches","position":[208,624],"parameters":{"options":{"reset":false}},"typeVersion":3},{"id":"3702e66e-2a9e-43e4-bb16-4f57a8ffe6ad","name":"Send Poll to Telegram Group","type":"n8n-nodes-base.telegram","position":[432,528],"webhookId":"6276774d-5b06-486b-8c7f-90270f909f5c","parameters":{"text":"=","chatId":"=","additionalFields":{}},"credentials":{"telegramApi":{"id":"3ubbGgZx2YzylQZu","name":"Telegram account - test"}},"typeVersion":1.2,"continueOnFail":true},{"id":"57b627c6-f71e-48da-8e03-118534bd898b","name":"Send Context Message with Hashtags","type":"n8n-nodes-base.telegram","position":[432,720],"webhookId":"95dee636-a382-4cab-a30a-5fa0ecfeb9fe","parameters":{"text":"={{ '🗳️ <b>Poll of the Day</b> — ' + $json.pollSession.category + '\\n\\n' + ($json.pollContent.hashtags || []).join(' ') + '\\n\\n📊 Tap your answer above and see how the community thinks! 👆' }}","chatId":"={{ $json.targetGroups[$runIndex % $json.groupCount]?.groupId || $json.targetGroups[0].groupId }}","additionalFields":{"parse_mode":"HTML","disable_notification":false}},"credentials":{"telegramApi":{"id":"3ubbGgZx2YzylQZu","name":"Telegram account - test"}},"typeVersion":1.2,"continueOnFail":true},{"id":"4f5bc2dd-2792-4db9-94f0-c6401468060e","name":"Collect Deploy Result Per Group","type":"n8n-nodes-base.code","position":[656,624],"parameters":{"mode":"runOnceForEachItem","jsCode":"const pollResp = $('Send Poll to Telegram Group').item.json;\nconst msgResp = $('Send Context Message with Hashtags').item.json;\nconst validated = $('Validate Poll Quality and Safety').first().json;\n\nconst idx = $runIndex || 0;\nconst grp = validated.targetGroups[idx] || validated.targetGroups[0];\n\nconst pollOk = pollResp?.ok === true || pollResp?.result?.message_id != null;\nconst pollErr = !pollOk ? (pollResp?.description || pollResp?.error || 'Unknown Telegram error') : null;\nconst msgOk = msgResp?.ok === true || msgResp?.result?.message_id != null;\n\nreturn {\n  json: {\n    pollSession: validated.pollSession,\n    pollContent: validated.pollContent,\n    groupResult: {\n      groupId: grp?.groupId || 'UNKNOWN',\n      groupName: grp?.groupName || 'Unknown Group',\n      groupType: grp?.groupType || 'group',\n      pollSent: pollOk,\n      contextMsgSent: msgOk,\n      pollMessageId: pollResp?.result?.message_id || null,\n      errorMessage: pollErr,\n      deployedAt: new Date().toISOString()\n    }\n  }\n};"},"typeVersion":2},{"id":"e8d6bc92-30e5-4add-a1ca-f11d7d209212","name":"Merge All Group Results","type":"n8n-nodes-base.merge","position":[880,624],"parameters":{"mode":"mergeByPosition"},"typeVersion":3},{"id":"ac913e0b-4054-4e08-97f6-6b3b49ae8b91","name":"Build Analytics Summary","type":"n8n-nodes-base.code","position":[1104,624],"parameters":{"jsCode":"const all = $input.all().map(i => i.json);\nif (!all.length) throw new Error('No deploy results to summarise.');\n\nconst first = all[0];\nconst pollSession = first.pollSession;\nconst pollContent = first.pollContent;\nconst groupResults = all.map(r => r.groupResult);\n\nconst ok = groupResults.filter(g => g.pollSent);\nconst fail = groupResults.filter(g => !g.pollSent);\nconst successRate = groupResults.length > 0 ? Math.round((ok.length / groupResults.length) * 100) : 0;\n\n// Telegram admin message (MarkdownV2-safe)\nconst adminLines = [\n  `📊 *Poll Deployed*`,\n  ``,\n  `🆔 \\`${pollSession.pollId}\\``,\n  `📌 *${pollSession.topic}*`,\n  `🏷️ Category: ${pollSession.category}`,\n  `❓ _${pollContent.question}_`,\n  ``,\n  `📤 Groups targeted: *${groupResults.length}*`,\n  `✅ Successful: *${ok.length}*`,\n  `❌ Failed: *${fail.length}*`,\n  `📈 Success rate: *${successRate}%*`,\n  `🎯 Engagement score: *${pollContent.engagementScore}/100*`,\n  ``\n];\nif (fail.length > 0) {\n  adminLines.push(`⚠️ *Failed groups:*`);\n  fail.forEach(g => adminLines.push(`• ${g.groupName}: ${g.errorMessage || 'error'}`) );\n}\nadminLines.push(`\\n⏱️ ${new Date().toISOString()}`);\n\nreturn [{\n  json: {\n    pollSession,\n    pollContent,\n    groupResults,\n    deploymentSummary: {\n      totalGroups: groupResults.length,\n      successfulGroups: ok.length,\n      failedGroups: fail.length,\n      successRate,\n      failedGroupDetails: fail.map(g => ({ groupId: g.groupId, groupName: g.groupName, error: g.errorMessage })),\n      completedAt: new Date().toISOString()\n    },\n    adminSummaryText: adminLines.join('\\n')\n  }\n}];"},"typeVersion":2},{"id":"b334e64f-dadc-4bd8-8761-7b3377ecca35","name":"Log Analytics to Google Sheets","type":"n8n-nodes-base.googleSheets","position":[1328,336],"parameters":{"columns":{"value":{},"schema":[],"mappingMode":"autoMapInputData","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"append","sheetName":{"__rl":true,"mode":"id","value":"="},"documentId":{"__rl":true,"mode":"id","value":"="},"authentication":"serviceAccount"},"credentials":{"googleApi":{"id":"ScSS2KxGQULuPtdy","name":"Google Sheets- test"}},"typeVersion":4.5,"continueOnFail":true},{"id":"8f589c91-05f1-4806-8e59-3d8fb3b88700","name":"Send Admin Telegram Notification","type":"n8n-nodes-base.telegram","position":[1328,528],"webhookId":"aaf871c0-e4aa-4f80-a0a7-9066f2701e07","parameters":{"text":"={{ $json.adminSummaryText }}","chatId":"YOUR_ADMIN_TELEGRAM_CHAT_ID","additionalFields":{"parse_mode":"Markdown","disable_notification":false}},"credentials":{"telegramApi":{"id":"3ubbGgZx2YzylQZu","name":"Telegram account - test"}},"typeVersion":1.2,"continueOnFail":true},{"id":"596f8666-0e28-492b-b776-d69a1d7b7798","name":"Send Error Alert Email on Failures","type":"n8n-nodes-base.emailSend","position":[1328,720],"webhookId":"3b065e6e-c453-4951-8f58-c19d1ed80c17","parameters":{"options":{},"subject":"=[Telegram Poll] {{ $json.deploymentSummary.failedGroups }} Group(s) Failed — {{ $json.pollSession.pollId }}","toEmail":"=","fromEmail":"="},"credentials":{"smtp":{"id":"G1kyF8cSWTZ4vouN","name":"SMTP -test"}},"typeVersion":2.1,"continueOnFail":true},{"id":"f5275907-79c8-4012-94c8-295a5917d6fd","name":"Update Topic Queue — Mark Used","type":"n8n-nodes-base.googleSheets","position":[1328,912],"parameters":{"columns":{"value":{},"schema":[],"mappingMode":"autoMapInputData","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"update","sheetName":{"__rl":true,"mode":"id","value":"="},"documentId":{"__rl":true,"mode":"id","value":"="},"authentication":"serviceAccount"},"credentials":{"googleApi":{"id":"ScSS2KxGQULuPtdy","name":"Google Sheets- test"}},"typeVersion":4.5,"continueOnFail":true},{"id":"42fb3d31-c6c5-4e09-8f0b-41c57e34579f","name":"Build Final Deployment Report","type":"n8n-nodes-base.code","position":[1552,624],"parameters":{"mode":"runOnceForEachItem","jsCode":"const d = $input.item.json;\nreturn {\n  json: {\n    success: true,\n    pollId: d.pollSession.pollId,\n    topic: d.pollSession.topic,\n    category: d.pollSession.category,\n    question: d.pollContent.question,\n    options: d.pollContent.options,\n    engagementScore: d.pollContent.engagementScore,\n    deployment: d.deploymentSummary,\n    scheduledAt: d.pollSession.scheduledAt,\n    completedAt: d.deploymentSummary.completedAt,\n    credit: {\n      poweredBy: 'GPT-4o via n8n OpenAI integration',\n      moreAutomation: 'https://www.oneclickitsolution.com/contact-us/'\n    }\n  }\n};"},"typeVersion":2}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"3b08e829-cac2-4c89-b251-f5f8c4c92744","connections":{"GPT-4o Model":{"ai_languageModel":[[{"node":"GPT-4 Poll Question Generation","type":"ai_languageModel","index":0}]]},"Poll Schedule Trigger":{"main":[[{"node":"Load Topic Queue from Sheets","type":"main","index":0}]]},"Build Analytics Summary":{"main":[[{"node":"Log Analytics to Google Sheets","type":"main","index":0},{"node":"Send Admin Telegram Notification","type":"main","index":0},{"node":"Send Error Alert Email on Failures","type":"main","index":0},{"node":"Update Topic Queue — Mark Used","type":"main","index":0}]]},"Merge All Group Results":{"main":[[{"node":"Build Analytics Summary","type":"main","index":0}]]},"Send Poll to Telegram Group":{"main":[[{"node":"Collect Deploy Result Per Group","type":"main","index":0}]]},"Load Telegram Group Registry":{"main":[[{"node":"Validate Poll Quality and Safety","type":"main","index":0}]]},"Load Topic Queue from Sheets":{"main":[[{"node":"Select Highest Priority Topic","type":"main","index":0}]]},"Select Highest Priority Topic":{"main":[[{"node":"Load Telegram Group Registry","type":"main","index":0},{"node":"GPT-4 Poll Question Generation","type":"main","index":0}]]},"GPT-4 Poll Question Generation":{"main":[[{"node":"Validate Poll Quality and Safety","type":"main","index":0}]]},"Log Analytics to Google Sheets":{"main":[[{"node":"Build Final Deployment Report","type":"main","index":0}]]},"Collect Deploy Result Per Group":{"main":[[{"node":"Merge All Group Results","type":"main","index":0}]]},"Send Admin Telegram Notification":{"main":[[{"node":"Build Final Deployment Report","type":"main","index":0}]]},"Split Groups for Parallel Deploy":{"main":[[{"node":"Send Poll to Telegram Group","type":"main","index":0},{"node":"Send Context Message with Hashtags","type":"main","index":0}]]},"Update Topic Queue — Mark Used":{"main":[[{"node":"Build Final Deployment Report","type":"main","index":0}]]},"Validate Poll Quality and Safety":{"main":[[{"node":"Split Groups for Parallel Deploy","type":"main","index":0}]]},"Send Context Message with Hashtags":{"main":[[{"node":"Collect Deploy Result Per Group","type":"main","index":0}]]},"Send Error Alert Email on Failures":{"main":[[{"node":"Build Final Deployment Report","type":"main","index":0}]]}}},"lastUpdatedBy":1,"workflowInfo":{"nodeCount":23,"nodeTypes":{"n8n-nodes-base.code":{"count":5},"n8n-nodes-base.merge":{"count":1},"n8n-nodes-base.telegram":{"count":3},"n8n-nodes-base.emailSend":{"count":1},"n8n-nodes-base.stickyNote":{"count":5},"n8n-nodes-base.googleSheets":{"count":4},"n8n-nodes-base.splitInBatches":{"count":1},"@n8n/n8n-nodes-langchain.agent":{"count":1},"n8n-nodes-base.scheduleTrigger":{"count":1},"@n8n/n8n-nodes-langchain.lmChatOpenAi":{"count":1}}},"status":"published","readyToDemo":null,"user":{"name":"Oneclick AI Squad","username":"oneclick-ai","bio":"The AI Squad Initiative is a pioneering effort to build, automate and scale AI-powered workflows using n8n.io. Our mission is to help individuals and businesses integrate AI agents seamlessly into their daily operations  from automating tasks and enhancing productivity to creating innovative, intelligent solutions. We design modular, reusable AI workflow templates that empower creators, developers and teams to supercharge their automation with minimal effort and maximum impact.","verified":true,"links":["https://www.oneclickitsolution.com/"],"avatar":"https://gravatar.com/avatar/848fca91367142f65f9e5c55d64e5c9952b160d7b060d103b52aa343c6bc7b3d?r=pg&d=retro&size=200"},"nodes":[{"id":11,"icon":"fa:envelope","name":"n8n-nodes-base.emailSend","codex":{"data":{"alias":["SMTP","email","human","form","wait","hitl","approval"],"resources":{"generic":[{"url":"https://n8n.io/blog/2021-the-year-to-automate-the-new-you-with-n8n/","icon":"☀️","label":"2021: The Year to Automate the New You with n8n"},{"url":"https://n8n.io/blog/build-your-own-virtual-assistant-with-n8n-a-step-by-step-guide/","icon":"👦","label":"Build your own virtual assistant with n8n: A step by step guide"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.sendemail/"}],"credentialDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/credentials/sendemail/"}]},"categories":["Communication","HITL","Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"HITL":["Human in the Loop"]}}},"group":"[\"output\"]","defaults":{"name":"Send Email","color":"#00bb88"},"iconData":{"icon":"envelope","type":"icon"},"displayName":"Send Email","typeVersion":2,"nodeCategories":[{"id":6,"name":"Communication"},{"id":9,"name":"Core Nodes"},{"id":28,"name":"HITL"}]},{"id":18,"icon":"file:googleSheets.svg","name":"n8n-nodes-base.googleSheets","codex":{"data":{"alias":["CSV","Sheet","Spreadsheet","GS"],"resources":{"generic":[{"url":"https://n8n.io/blog/love-at-first-sight-ricardos-n8n-journey/","icon":"❤️","label":"Love at first sight: Ricardo’s n8n journey"},{"url":"https://n8n.io/blog/why-business-process-automation-with-n8n-can-change-your-daily-life/","icon":"🧬","label":"Why business process automation with n8n can change your daily life"},{"url":"https://n8n.io/blog/automatically-adding-expense-receipts-to-google-sheets-with-telegram-mindee-twilio-and-n8n/","icon":"🧾","label":"Automatically Adding Expense Receipts to Google Sheets with Telegram, Mindee, Twilio, and n8n"},{"url":"https://n8n.io/blog/supercharging-your-conference-registration-process-with-n8n/","icon":"🎫","label":"Supercharging your conference registration process with n8n"},{"url":"https://n8n.io/blog/creating-triggers-for-n8n-workflows-using-polling/","icon":"⏲","label":"Creating triggers for n8n workflows using polling"},{"url":"https://n8n.io/blog/no-code-ecommerce-workflow-automations/","icon":"store","label":"6 e-commerce workflows to power up your Shopify s"},{"url":"https://n8n.io/blog/migrating-community-metrics-to-orbit-using-n8n/","icon":"📈","label":"Migrating Community Metrics to Orbit using n8n"},{"url":"https://n8n.io/blog/automate-google-apps-for-productivity/","icon":"💡","label":"15 Google apps you can combine and automate to increase productivity"},{"url":"https://n8n.io/blog/your-business-doesnt-need-you-to-operate/","icon":" 🖥️","label":"Hey founders! Your business doesn't need you to operate"},{"url":"https://n8n.io/blog/how-honest-burgers-use-automation-to-save-100k-per-year/","icon":"🍔","label":"How Honest Burgers Use Automation to Save $100k per year"},{"url":"https://n8n.io/blog/how-a-digital-strategist-uses-n8n-for-online-marketing/","icon":"💻","label":"How a digital strategist uses n8n for online marketing"},{"url":"https://n8n.io/blog/why-this-product-manager-loves-workflow-automation-with-n8n/","icon":"🧠","label":"Why this Product Manager loves workflow automation with n8n"},{"url":"https://n8n.io/blog/sending-automated-congratulations-with-google-sheets-twilio-and-n8n/","icon":"🙌","label":"Sending Automated Congratulations with Google Sheets, Twilio, and n8n "},{"url":"https://n8n.io/blog/how-a-membership-development-manager-automates-his-work-and-investments/","icon":"📈","label":"How a Membership Development Manager automates his work and investments"},{"url":"https://n8n.io/blog/aws-workflow-automation/","label":"7 no-code workflow automations for Amazon Web Services"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googlesheets/"}],"credentialDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/credentials/google/oauth-single-service/"}]},"categories":["Data & Storage","Productivity"],"nodeVersion":"1.0","codexVersion":"1.0"}},"group":"[\"input\",\"output\"]","defaults":{"name":"Google Sheets"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxwYXRoIGZpbGw9IiMyOEI0NDYiI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IDMuNyAwIDAgMSA0Ny4yOTMgNTlIMTEuNzA3YTMuNyAzLjcgMCAwIDEtMi42MjMtMS4wNzhBMy42NyAzLjY3IDAgMCAxIDggNTUuMzEyVjMuNjg4YTMuNjcgMy42NyAwIDAgMSAxLjA4NC0yLjYxQTMuNyAzLjcgMCAwIDEgMTEuNzA3IDB6Ii8+PHBhdGggZmlsbD0iIzZBQ0U3QyIgZD0iTTM0LjY5IDAgNTEgMTYuMjI1SDM4LjM5N2MtMi4wNTQgMC0zLjcwNy0xLjgyOS0zLjcwNy0zLjg3MnoiLz48cGF0aCBmaWxsPSIjMjE5QjM4IiBkPSJNMzguMjExIDE2LjIyNSA1MSAyMS40OHYtNS4yNTV6Ii8+PHBhdGggZmlsbD0iI0ZGRiIgZD0iTTE5LjEyIDMwLjk3NWMwLS44MTcuNjYyLTEuNDc1IDEuNDgzLTEuNDc1aDE3Ljc5NGMuODIxIDAgMS40ODIuNjU4IDEuNDgyIDEuNDc1djE1LjQ4N2MwIC44MTgtLjY2MSAxLjQ3NS0xLjQ4MiAxLjQ3NUgyMC42MDNhMS40NzYgMS40NzYgMCAwIDEtMS40ODItMS40NzRWMzAuOTc0em0yLjIyNSAxLjQ3NWg2LjY3MnYyLjIxMmgtNi42NzJ6bTAgNS4xNjJoNi42NzJ2Mi4yMTNoLTYuNjcyem0wIDUuMTYzaDYuNjcydjIuMjEyaC02LjY3MnptOS42MzgtMTAuMzI1aDYuNjcydjIuMjEyaC02LjY3MnptMCA1LjE2Mmg2LjY3MnYyLjIxM2gtNi42NzJ6bTAgNS4xNjNoNi42NzJ2Mi4yMTJoLTYuNjcyeiIvPjwvZz48L3N2Zz4="},"displayName":"Google Sheets","typeVersion":5,"nodeCategories":[{"id":3,"name":"Data & Storage"},{"id":4,"name":"Productivity"}]},{"id":24,"icon":"file:merge.svg","name":"n8n-nodes-base.merge","codex":{"data":{"alias":["Join","Concatenate","Wait"],"resources":{"generic":[{"url":"https://n8n.io/blog/how-to-sync-data-between-two-systems/","icon":"🏬","label":"How to synchronize data between two systems (one-way vs. two-way sync"},{"url":"https://n8n.io/blog/supercharging-your-conference-registration-process-with-n8n/","icon":"🎫","label":"Supercharging your conference registration process with n8n"},{"url":"https://n8n.io/blog/migrating-community-metrics-to-orbit-using-n8n/","icon":"📈","label":"Migrating Community Metrics to Orbit using n8n"},{"url":"https://n8n.io/blog/build-your-own-virtual-assistant-with-n8n-a-step-by-step-guide/","icon":"👦","label":"Build your own virtual assistant with n8n: A step by step guide"},{"url":"https://n8n.io/blog/sending-automated-congratulations-with-google-sheets-twilio-and-n8n/","icon":"🙌","label":"Sending Automated Congratulations with Google Sheets, Twilio, and n8n "},{"url":"https://n8n.io/blog/aws-workflow-automation/","label":"7 no-code workflow automations for Amazon Web Services"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.merge/"}]},"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Flow","Data Transformation"]}}},"group":"[\"transform\"]","defaults":{"name":"Merge"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTEyIiBoZWlnaHQ9IjUxMiIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8xMTc3XzUxOCkiPgo8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTAgNDhDMCAyMS40OTAzIDIxLjQ5MDMgMCA0OCAwSDExMkMxMzguNTEgMCAxNjAgMjEuNDkwMyAxNjAgNDhWNTZIMTk2LjI1MkMyNDAuNDM1IDU2IDI3Ni4yNTIgOTEuODE3MiAyNzYuMjUyIDEzNlYxOTJDMjc2LjI1MiAyMTQuMDkxIDI5NC4xNjEgMjMyIDMxN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0QzQ2MC40MTggMjI0IDQ2NCAyMjcuNTgyIDQ2NCAyMzJWMjgwQzQ2NCAyODQuNDE4IDQ2MC40MTggMjg4IDQ1NiAyODhINDA4QzQwMy41ODIgMjg4IDQwMCAyODQuNDE4IDQwMCAyODBWMjMyQzQwMCAyMjcuNTgyIDQwMy41ODIgMjI0IDQwOCAyMjRINDU2Wk0xMTIgNDA4QzExMiA0MDMuNTgyIDEwOC40MTggNDAwIDEwNCA0MDBINTZDNTEuNTgxNyA0MDAgNDggNDAzLjU4MiA0OCA0MDhWNDU2QzQ4IDQ2MC40MTggNTEuNTgxNyA0NjQgNTYgNDY0SDEwNEMxMDguNDE4IDQ2NCAxMTIgNDYwLjQxOCAxMTIgNDU2VjQwOFoiIGZpbGw9IiM1NEI4QzkiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xMTc3XzUxOCI+CjxyZWN0IHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo="},"displayName":"Merge","typeVersion":3,"nodeCategories":[{"id":9,"name":"Core Nodes"}]},{"id":39,"icon":"fa:sync","name":"n8n-nodes-base.splitInBatches","codex":{"data":{"alias":["Loop","Concatenate","Batch","Split","Split In Batches"],"resources":{"generic":[{"url":"https://n8n.io/blog/how-uproc-scraped-a-multi-page-website-with-a-low-code-workflow/","icon":" 🕸️","label":"How uProc scraped a multi-page website with a low-code workflow"},{"url":"https://n8n.io/blog/benefits-of-automation-and-n8n-an-interview-with-hubspots-hugh-durkin/","icon":"🎖","label":"Benefits of automation and n8n: An interview with HubSpot's Hugh Durkin"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.splitinbatches/"}]},"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Flow"]}}},"group":"[\"organization\"]","defaults":{"name":"Loop Over Items","color":"#007755"},"iconData":{"icon":"sync","type":"icon"},"displayName":"Loop Over Items (Split in Batches)","typeVersion":3,"nodeCategories":[{"id":9,"name":"Core Nodes"}]},{"id":49,"icon":"file:telegram.svg","name":"n8n-nodes-base.telegram","codex":{"data":{"alias":["human","form","wait","hitl","approval"],"resources":{"generic":[{"url":"https://n8n.io/blog/why-business-process-automation-with-n8n-can-change-your-daily-life/","icon":"🧬","label":"Why business process automation with n8n can change your daily life"},{"url":"https://n8n.io/blog/create-a-toxic-language-detector-for-telegram/","icon":"🤬","label":"Create a toxic language detector for Telegram in 4 step"},{"url":"https://n8n.io/blog/automatically-adding-expense-receipts-to-google-sheets-with-telegram-mindee-twilio-and-n8n/","icon":"🧾","label":"Automatically Adding Expense Receipts to Google Sheets with Telegram, Mindee, Twilio, and n8n"},{"url":"https://n8n.io/blog/no-code-ecommerce-workflow-automations/","icon":"store","label":"6 e-commerce workflows to power up your Shopify s"},{"url":"https://n8n.io/blog/world-poetry-day-workflow/","icon":"📜","label":"Celebrating World Poetry Day with a daily poem in Telegram"},{"url":"https://n8n.io/blog/using-automation-to-boost-productivity-in-the-workplace/","icon":"💪","label":"Using Automation to Boost Productivity in the Workplace"},{"url":"https://n8n.io/blog/how-to-set-up-a-ci-cd-pipeline-with-no-code/","icon":"🎡","label":"How to set up a no-code CI/CD pipeline with GitHub and TravisCI"},{"url":"https://n8n.io/blog/creating-scheduled-text-affirmations-with-n8n/","icon":"🤟","label":"Creating scheduled text affirmations with n8n"},{"url":"https://n8n.io/blog/creating-telegram-bots-with-n8n-a-no-code-platform/","icon":"💬","label":"Creating Telegram Bots with n8n, a No-Code Platform"},{"url":"https://n8n.io/blog/aws-workflow-automation/","label":"7 no-code workflow automations for Amazon Web Services"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.telegram/"}],"credentialDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/credentials/telegram/"}]},"categories":["Communication","HITL"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"HITL":["Human in the Loop"]}}},"group":"[\"output\"]","defaults":{"name":"Telegram"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBmaWxsPSIjZmZmIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHN0cm9rZT0iIzAwMCIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIiB2aWV3Qm94PSIwIDAgNjYgNjYiPjx1c2UgeGxpbms6aHJlZj0iI2EiIHg9Ii41IiB5PSIuNSIvPjxzeW1ib2wgaWQ9ImEiIG92ZXJmbG93PSJ2aXNpYmxlIj48ZyBmaWxsLXJ1bGU9Im5vbnplcm8iIHN0cm9rZT0ibm9uZSI+PHBhdGggZmlsbD0iIzM3YWVlMiIgZD0iTTAgMzJjMCAxNy42NzMgMTQuMzI3IDMyIDMyIDMyczMyLTE0LjMyNyAzMi0zMlM0OS42NzMgMCAzMiAwIDAgMTQuMzI3IDAgMzIiLz48cGF0aCBmaWxsPSIjYzhkYWVhIiBkPSJtMjEuNjYxIDM0LjMzOCAzLjc5NyAxMC41MDhzLjQ3NS45ODMuOTgzLjk4MyA4LjA2OC03Ljg2NCA4LjA2OC03Ljg2NGw4LjQwNy0xNi4yMzctMjEuMTE5IDkuODk4eiIvPjxwYXRoIGZpbGw9IiNhOWM2ZDgiIGQ9Im0yNi42OTUgMzcuMDM0LS43MjkgNy43NDZzLS4zMDUgMi4zNzMgMi4wNjggMGw0LjY0NC00LjIwMyIvPjxwYXRoIGQ9Im0yMS43MyAzNC43MTItNy44MDktMi41NDVzLS45MzItLjM3OC0uNjMzLTEuMjM3Yy4wNjItLjE3Ny4xODYtLjMyOC41NTktLjU4OCAxLjczMS0xLjIwNiAzMi4wMjgtMTIuMDk2IDMyLjAyOC0xMi4wOTZzLjg1Ni0uMjg4IDEuMzYxLS4wOTdjLjIzMS4wODguMzc4LjE4Ny41MDMuNTQ4LjA0NS4xMzIuMDcxLjQxMS4wNjguNjg5LS4wMDMuMjAxLS4wMjcuMzg2LS4wNDUuNjc4LS4xODQgMi45NzgtNS43MDYgMjUuMTk4LTUuNzA2IDI1LjE5OHMtLjMzIDEuMy0xLjUxNCAxLjM0NWMtLjQzMi4wMTYtLjk1Ni0uMDcxLTEuNTgyLS42MS0yLjMyMy0xLjk5OC0xMC4zNTItNy4zOTQtMTIuMTI2LTguNThhLjM0LjM0IDAgMCAxLS4xNDYtLjIzOWMtLjAyNS0uMTI1LjEwOC0uMjguMTA4LS4yOHMxMy45OC0xMi40MjcgMTQuMzUyLTEzLjczMWMuMDI5LS4xMDEtLjA3OS0uMTUxLS4yMjYtLjEwNy0uOTI5LjM0Mi0xNy4wMjUgMTAuNTA2LTE4LjgwMSAxMS42MjktLjEwNC4wNjYtLjM5NS4wMjMtLjM5NS4wMjMiLz48L2c+PC9zeW1ib2w+PC9zdmc+"},"displayName":"Telegram","typeVersion":1,"nodeCategories":[{"id":6,"name":"Communication"},{"id":28,"name":"HITL"}]},{"id":565,"icon":"fa:sticky-note","name":"n8n-nodes-base.stickyNote","codex":{"data":{"alias":["Comments","Notes","Sticky"],"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Helpers"]}}},"group":"[\"input\"]","defaults":{"name":"Sticky Note","color":"#FFD233"},"iconData":{"icon":"sticky-note","type":"icon"},"displayName":"Sticky Note","typeVersion":1,"nodeCategories":[{"id":9,"name":"Core Nodes"}]},{"id":834,"icon":"file:code.svg","name":"n8n-nodes-base.code","codex":{"data":{"alias":["cpde","Javascript","JS","Python","Script","Custom Code","Function"],"details":"The Code node allows you to execute JavaScript in your workflow.","resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.code/"}]},"categories":["Development","Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Helpers","Data Transformation"]}}},"group":"[\"transform\"]","defaults":{"name":"Code"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTEyIiBoZWlnaHQ9IjUxMiIgdmlld0JveD0iMCAwIDUxMiA1MTIiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMF8xMTcxXzQ0MSkiPgo8cGF0aCBkPSJNMTcwLjI4MyA0OEgxOTYuNUMyMDMuMTI3IDQ4IDIwOC41IDQyLjYyNzQgMjA4LjUgMzZWMTJDMjA4LjUgNS4zNzI1OCAyMDMuMTI3IDAgMTk2LjUgMEgxNzAuMjgzQzEyNi4xIDAgOTAuMjgzIDM1LjgxNzIgOTAuMjgzIDgwVjE3NkM5MC4yODMgMjA2LjkyOCA2NS4yMTA5IDIzMiAzNC4yODMgMjMySDIzQzE2LjM3MjYgMjMyIDExIDIzNy4zNzIgMTEgMjQ0VjI2OEMxMSAyNzQuNjI3IDE2LjM3MjQgMjgwIDIyLjk5OTYgMjgwTDM0LjI4MyAyODBDNjUuMjEwOSAyODAgOTAuMjgzIDMwNS4wNzIgOTAuMjgzIDMzNlY0NDBDOTAuMjgzIDQ3OS43NjQgMTIyLjUxOCA1MTIgMTYyLjI4MyA1MTJIMTk2LjVDMjAzLjEyNyA1MTIgMjA4LjUgNTA2LjYyNyAyMDguNSA1MDBWNDc2QzIwOC41IDQ2OS4zNzMgMjAzLjEyNyA0NjQgMTk2LjUgNDY0SDE2Mi4yODNDMTQ5LjAyOCA0NjQgMTM4LjI4MyA0NTMuMjU1IDEzOC4yODMgNDQwVjMzNkMxMzguMjgzIDMwOS4wMjIgMTI4LjAxMSAyODQuNDQzIDExMS4xNjQgMjY1Ljk2MUMxMDYuMTA5I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DMwNSAxMlYzNloiIGZpbGw9IiNGRjk5MjIiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF8xMTcxXzQ0MSI+CjxyZWN0IHdpZHRoPSI1MTIiIGhlaWdodD0iNTEyIiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo="},"displayName":"Code","typeVersion":2,"nodeCategories":[{"id":5,"name":"Development"},{"id":9,"name":"Core Nodes"}]},{"id":839,"icon":"fa:clock","name":"n8n-nodes-base.scheduleTrigger","codex":{"data":{"alias":["Time","Scheduler","Polling","Cron","Interval"],"resources":{"generic":[],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.scheduletrigger/"}]},"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0"}},"group":"[\"trigger\",\"schedule\"]","defaults":{"name":"Schedule Trigger","color":"#31C49F"},"iconData":{"icon":"clock","type":"icon"},"displayName":"Schedule Trigger","typeVersion":1,"nodeCategories":[{"id":9,"name":"Core Nodes"}]},{"id":1119,"icon":"fa:robot","name":"@n8n/n8n-nodes-langchain.agent","codex":{"data":{"alias":["LangChain","Chat","Conversational","Plan and Execute","ReAct","Tools"],"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/"}]},"categories":["AI","Langchain"],"subcategories":{"AI":["Agents","Root Nodes"]}}},"group":"[\"transform\"]","defaults":{"name":"AI Agent","color":"#404040"},"iconData":{"icon":"robot","type":"icon"},"displayName":"AI Agent","typeVersion":3,"nodeCategories":[{"id":25,"name":"AI"},{"id":26,"name":"Langchain"}]},{"id":1153,"icon":"file:openAiLight.svg","name":"@n8n/n8n-nodes-langchain.lmChatOpenAi","codex":{"data":{"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatopenai/"}]},"categories":["AI","Langchain"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]}}},"group":"[\"transform\"]","defaults":{"name":"OpenAI Chat Model"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTM2Ljg2NzEgMTYuMzcxOEMzNy43NzQ2IDEzLjY0OCAzNy40NjIxIDEwLjY2NDIgMzYuMDEwOCA4LjE4NjYxQzMzLjgyODIgNC4zODY1MyAyOS40NDA3IDIuNDMxNDkgMjUuMTU1NiAzLjM1MTUxQzIzLjI0OTMgMS4yMDM5NiAyMC41MTA1IC0wLjAxNzMxNDggMTcuNjM5MiAwLjAwMDE4NTUzM0MxMy4yNTkxIC0wLjAwOTgxNDY4IDkuMzcyNzMgMi44MTAyNSA4LjAyNTIgNi45Nzc4M0M1LjIxMTM5IDcuNTU0MSAyLjc4MjU4IDkuMzE1MzggMS4zNjEzIDExLjgxMTdDLTAuODM3NDkzIDE1LjYwMTggLTAuMzM2MjMyIDIwLjM3OTQgMi42MDEzMyAyMy42Mjk0QzEuNjkzODEgMjYuMzUzMiAyLjAwNjMyIDI5LjMzNzEgMy40NTc2IDMxLjgxNDZDNS42NDAxNSAzNS42MTQ3IDEwLjAyNzcgMzcuNTY5NyAxNC4zMTI4IDM2LjY0OTdDMTYuMjE3OSAzOC43OTczIDE4Ljk1NzkgNDAuMDE4NSAyMS44MjkyIDM5Ljk5OThDMjYuMjExOCA0MC4wMTEgMzAuMDk5NCAzNy4xODg1IDMxLjQ0NjkgMzMuMDE3MUMzNC4yNjA4IDMyLjQ0MDkgMzYuNjg5NiAzMC42Nzk2IDM4LjExMDggMjguMTgzM0M0MC4zMDcxIDI0LjM5MzIgMzkuODA0NiAxOS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DQzMUwxMC4yMDY1IDE5LjQ5OTRDMTAuMTcwMiAxOS40ODE5IDEwLjE0NjUgMTkuNDQ2OCAxMC4xNDE1IDE5LjQwNjhWMTAuMTA3OUMxMC4xNDQgNS45Njc4MSAxMy41MDI4IDIuNjEyNzQgMTcuNjQyOSAyLjYxNTI0QzE5LjM5NDIgMi42MTUyNCAyMS4wODkyIDMuMjMwMjUgMjIuNDM1NSA0LjM1MDI4QzIyLjM3NDMgNC4zODI3OCAyMi4yNjkzIDQuNDQxNTMgMjIuMTk5MiA0LjQ4NDAzTDE0LjIzNDEgOS4wODQxM0MxMy44MjY2IDkuMzE1MzggMTMuNTc2NiA5Ljc0Nzg5IDEzLjU3OTEgMTAuMjE2N0wxMy41NzQxIDIxLjQ0MDZWMjEuNDQzMVpNMTUuNDAyOSAxNy41MDA2TDE5LjczNDIgMTQuOTk5M0wyNC4wNjU1IDE3LjQ5OTNWMjIuNTAwN0wxOS43MzQyIDI1LjAwMDdMMTUuNDAyOSAyMi41MDA3VjE3LjUwMDZaIiBmaWxsPSIjN0Q3RDg3Ii8+Cjwvc3ZnPgo="},"displayName":"OpenAI Chat Model","typeVersion":1,"nodeCategories":[{"id":25,"name":"AI"},{"id":26,"name":"Langchain"}]}],"categories":[{"id":33,"name":"Social Media"},{"id":51,"name":"Multimodal AI"}],"image":[]}}