# templates

name: Generate & Auto-Post Social Videos to Multiple Platforms with GPT-4 and Kling AI
author_name: Dr. Firas
author_username: drfiras
categories: []
created_at: 2025-04-09T17:44:59.665Z
updated_at: 2025-04-09T17:44:59.665Z
url: https://n8n.io/workflows/3501
scraped_at: 2025-07-06 21:16:30
description:
  AI-Powered Social Video Generator with Auto-Posting to Instagram, TikTok, YouTube, Facebook, LinkedIn, Threads, Pinterest, Twitter (X), and Bluesky

  Who is this workflow for?

  This workflow is ideal for content creators, marketers, social media managers, and automation enthusiasts who want to generate, customize, and publish short-form videos across multiple platforms without manual editing or posting. If you use tools like ChatGPT, Kling, or Blotato and want to streamline your content creation process, this workflow is made for you.

  What problem does this workflow solve?

  Publishing regular video content on multiple platforms is time-consuming—especially when adding voice-overs, captions, and managing distribution. This workflow solves that by:

  Automating video generation using AI (Kling + GPT-4)
  Adding realistic voice narration
  Styling subtitles for social media
  Creating titles and social captions
  Auto-posting to Instagram, TikTok, YouTube, Facebook, Threads, Twitter (X), LinkedIn, Pinterest, and Bluesky

  All of this is triggered by a simple message sent via Telegram.

  How the workflow works

  This end-to-end automation transforms a short Telegram message into a fully produced and published social video:

  Receives a text prompt from Telegram  
  Transforms it into a detailed video scene using GPT-4  
  Generates a cinematic video with Kling  
  Creates a voice-over script and converts it to audio  
  Merges the video and the audio  
  Adds styled captions  
  Writes a social caption and an SEO-optimized title  
  Saves metadata to Google Sheets  
  Sends a preview via Telegram  
  Publishes the video to 9 social platforms using Blotato

  Setup

  Connect your Telegram bot to the "Telegram Trigger" node  
  Add your OpenAI API key to all GPT-related nodes  
  Configure Kling API access in the "Generate Video" node  
  Link your Cloudinary account for audio upload  
  Connect JSON2Video to handle video merging and captioning  
  Set up Google Sheets with your preferred spreadsheet ID  
  Connect your Blotato API key and fill in the platform IDs (Instagram, TikTok, etc.)  
  Test by sending a Telegram message like:  
     generate video A robot exploring Mars, Why AI will reshape humanity
  &gt; Disclaimer: This workflow uses Community Nodes, which are only available on self-hosted instances of n8n.

  How to customize this workflow to your needs

  Change the visual style**: Adjust the GPT-4 prompt formatting to reflect your brand tone  
  Edit voice style**: Replace the TTS provider or tweak OpenAI's voice settings  
  Revise captions or titles**: Fine-tune the system prompts in the "Create Description" or "Create Title" nodes  
  Target fewer platforms**: Disable or remove nodes for platforms you don’t use  
  Add approval steps**: Insert a Telegram confirmation step before auto-publishing

  📄 Documentation: Notion Guide

  Demo Video

  🎥 Watch the full tutorial here: YouTube Demo

nodes_used:
  ["n8n-nodes-base.googleSheets","n8n-nodes-base.httpRequest","n8n-nodes-base.telegram","n8n-nodes-base.code","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.lmChatOpenAi","@n8n/n8n-nodes-langchain.openAi"]

workflow_json:
  {"id":"SvZQB2gsI57KlfvO","meta":{"instanceId":"a2b23892dd6989fda7c1209b381f5850373a7d2b85609624d7c2b7a092671d44","templateCredsSetupCompleted":true},"name":"💥AI Social Video Generator with GPT-4, Kling & Blotato —Auto-Post to Instagram, Facebook,, TikTok, Twitter & Pinterest - vide","tags":[],"nodes":[{"id":"c8cbe0d7-50d5-44a8-9552-ef2531f324d2","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-880,-280],"parameters":{"width":2640,"height":420,"content":"# 🟫 STEP 1 — Create Video Using AI\n## This step handles the full video creation pipeline using AI.\n### It starts from a Telegram message containing a prompt, \n### refines the prompt with GPT-4 to suit Kling’s video engine, \n### and generates a cinematic video based entirely on text input.\n"},"typeVersion":1},{"id":"127b9d89-c7ef-4dfc-8431-3da68ce098a8","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-880,180],"parameters":{"width":2640,"height":260,"content":"# 🟫 STEP 2 — Add Voice-Over to Video\n## Here, a short-form voice-over script is generated using GPT-4 based on the topic.\n### The script is converted to speech, uploaded, and merged with the AI-generated video — resulting in a fully narrated visual asset.\n"},"typeVersion":1},{"id":"f2406554-ea6c-4664-aa2a-562dc2bc5b39","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[-880,1080],"parameters":{"color":3,"width":2640,"height":540,"content":"# 🟥 STEP 5 — Auto-Publish to 9 Social Platforms\n## The final step automates distribution using Blotato’s API.\n## The video is auto-published to Instagram, YouTube, TikTok, Facebook, \n## LinkedIn, Threads, Twitter (X), Bluesky, and Pinterest \n## — all in one go, with no manual work required.\n"},"typeVersion":1},{"id":"ceb59771-dd83-40f8-bbda-872ca5d81000","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[-880,780],"parameters":{"width":2640,"height":260,"content":"# 🟫 STEP 4 — Save Video & Notify via Telegram\n## This step generates a title and caption for the video, \n## saves the content metadata to a Google Sheet for future tracking, \n### And sends both the final video and its description to a Telegram chat for validation or reuse.\n### The script is converted to speech, uploaded, and merged with the AI-generated video — resulting in a fully narrated visual asset.\n"},"typeVersion":1},{"id":"f837f9d4-e072-44e2-813a-16c18e05ecb8","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-880,480],"parameters":{"width":2640,"height":260,"content":"# 🟫 STEP 3 — Add Captions to Enhance Engagement\n## To increase accessibility and boost social engagement, \n## this step overlays professional-looking subtitles on the video using a styling template.\n### This results in a final video that includes visuals, voice-over, and captions.\n"},"typeVersion":1},{"id":"5f13f1cd-b16b-4427-965e-91e2343213d0","name":"Trigger: Telegram Prompt","type":"n8n-nodes-base.telegramTrigger","position":[-180,-160],"webhookId":"3f5195e9-9837-4ad1-a502-aed61a8931ad","parameters":{"updates":["message"],"additionalFields":{}},"credentials":{"telegramApi":{"id":"PJcx2VBF9ubQIy3y","name":"Telegram account 2"}},"typeVersion":1.1},{"id":"64b2ff19-595e-434f-a71d-70be7c1a9a1d","name":"Extract Prompt & Caption","type":"n8n-nodes-base.code","position":[140,-160],"parameters":{"jsCode":"\n  inputText=$input.first().json.message.text;\n  // Remove \"generate video\" prefix (case-insensitive) and trim whitespace\n  const cleaned = inputText.replace(/^generate video/i, '').trim();\n\n  // Split at the first comma only\n  const [videoPrompt, captionIdea] = cleaned.split(/,(.+)/).map(s => s.trim());\n\n  // Return as a JSON object\n  return {\n    videoPrompt,\n    captionIdea\n  };\n"},"typeVersion":2},{"id":"d52f9138-df37-477b-b86b-7a1dd1cb2e7e","name":"Transform Prompt for Kling (GPT-4)","type":"@n8n/n8n-nodes-langchain.agent","position":[480,-160],"parameters":{"text":"={{ $json.videoPrompt }}","options":{"systemMessage":"=⚙️ System Instructions – AI Agent:\nYou are a prompt optimization assistant for Kling AI, a cutting-edge text-to-video generation platform.\n\n🎯 Mission:\nTransform brief user inputs into cinematic, high-quality video prompts rich in sensory details, spatial context, and dynamic motion—perfectly tuned for Kling AI.\n\n✍️ Instructions:\nExpand short ideas into visually immersive scenes.\n\nUse concrete visual elements: colors, textures, lighting, motion, atmosphere, camera angles.\n\nKeep descriptions concise but vivid, like a scene from a movie script.\n\nOutput only the final prompt—no explanations, no formatting tips.\n\n🌟 Examples:\nUser Input: “Rainy street at night”\nFinal Prompt:\nNeon signs reflect in puddles on a dimly lit city street. Raindrops ripple across a parked motorcycle's chrome. A figure in a trench coat walks past flickering lights as steam rises from a nearby sewer grate. The camera tracks from ground level, capturing water splashing underfoot.\n\nUser Input: “Mountain hike”\nFinal Prompt:\nA hiker climbs a rugged mountain trail at sunrise, golden light hitting snow-capped peaks in the distance. Wind rustles through pine trees as birds soar overhead. The camera pans slowly from behind, revealing a vast valley below bathed in morning mist.\n\nUser Input: “Cozy library”\nFinal Prompt:\nA warm library room with wooden shelves lined with old books. Dust floats in the sunbeams streaming through tall windows. A cat naps on a leather armchair while a hand flips through a weathered novel. The camera gently rotates around the room, revealing small glowing lamps."},"promptType":"define"},"typeVersion":1.8},{"id":"afac6532-4683-4515-9464-faf44bbfc470","name":"OpenAI Model Bridge","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[500,0],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"credentials":{"openAiApi":{"id":"6h3DfVhNPw9I25nO","name":"OpenAi account"}},"typeVersion":1.2},{"id":"388c97e3-6c00-4a35-9ee9-85b7db71d221","name":"Generate Video via Kling API","type":"n8n-nodes-base.httpRequest","position":[940,-160],"parameters":{"url":"https://api.piapi.ai/api/v1/task","method":"POST","options":{},"jsonBody":"={\n\"model\": \"kling\",\n\"task_type\": \"video_generation\",\n\"input\": {\n\"prompt\": \"{{ $('Transform Prompt for Kling (GPT-4)').item.json.output }}\",\n\"negative_prompt\": \"\",\n\"cfg_scale\": 0.5,\n\"duration\": 10,\n\"aspect_ratio\": \"9:16\",\n\"version\": \"1.6\",\n\"camera_control\": {\n\"type\": \"simple\",\n\"config\": {\n\"horizontal\": 0,\n\"vertical\": 0,\n\"pan\": -10,\n\"tilt\": 0,\n\"roll\": 0,\n\"zoom\": 0\n}\n},\n\"mode\": \"std\"\n},\n\"config\": {\n\"service_mode\": \"\",\n\"webhook_config\": {\n\"endpoint\": \"\",\n\"secret\": \"\"\n}\n}\n}","sendBody":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"DB99xYLrmwZl7Sqf","name":"Header Auth account"}},"typeVersion":4.2},{"id":"a6a6c4bf-a382-4a53-bec9-8291f09c9679","name":"Wait for Video Generation","type":"n8n-nodes-base.wait","position":[1240,-160],"webhookId":"1b0f9389-5af5-40de-8522-170c8fcc76ae","parameters":{"unit":"minutes","amount":7},"typeVersion":1.1},{"id":"07c6e882-131d-4547-9bf7-51b6df8b5527","name":"Get Generated Video URL","type":"n8n-nodes-base.httpRequest","position":[1520,-160],"parameters":{"url":"=https://api.piapi.ai/api/v1/task/{{ $json.data.task_id }}","options":{"response":{"response":{"responseFormat":"json"}}},"authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"DB99xYLrmwZl7Sqf","name":"Header Auth account"}},"typeVersion":4.2},{"id":"53c76bb9-eadc-4e9e-886a-acb3f14e9b50","name":"Generate Voice-Over Script","type":"@n8n/n8n-nodes-langchain.openAi","position":[140,200],"parameters":{"modelId":{"__rl":true,"mode":"list","value":"gpt-4o","cachedResultName":"GPT-4O"},"options":{},"messages":{"values":[{"content":"=Task:\nCraft a short-form voice-over script that perfectly fits a 7-second video duration. The script should align with the following topic:\n\n{{ $('Extract Prompt & Caption').item.json.captionIdea }}\n\nRequirements:\n\nMatch the average spoken word count for a 7-second voice-over (approximately 18–22 words, depending on pacing).\n\nThe script must be tight, impactful, and written in a natural spoken tone suitable for narration.\n\nNo intro text or labels — return only the plain voice-over script with no headers or commentary.\n\n✅ Example (For Context Only):\nTopic: \"Why cold showers boost productivity\"\nGenerated Output:\nCold showers shock your system awake, boost focus, and kickstart circulation—training your brain to embrace discomfort."}]}},"credentials":{"openAiApi":{"id":"6h3DfVhNPw9I25nO","name":"OpenAi account"}},"typeVersion":1.8},{"id":"8993c2b5-bf34-4ce3-80e0-9a0b1bdc8569","name":"Convert Script to Audio (TTS)","type":"@n8n/n8n-nodes-langchain.openAi","position":[500,200],"parameters":{"input":"={{ $json.message.content }}","options":{},"resource":"audio"},"credentials":{"openAiApi":{"id":"6h3DfVhNPw9I25nO","name":"OpenAi account"}},"typeVersion":1.8},{"id":"e17a25fd-704a-4c1e-9a43-e3fe84ec2d73","name":"Upload Audio to Cloudinary","type":"n8n-nodes-base.httpRequest","position":[700,200],"parameters":{"url":"https://api.cloudinary.com/v1_1/dc5wapno3/auto/upload","options":{},"sendBody":true,"contentType":"multipart-form-data","authentication":"genericCredentialType","bodyParameters":{"parameters":[{"name":"file","parameterType":"formBinaryData","inputDataFieldName":"data"},{"name":"upload_preset","value":"n8n_video"}]},"genericAuthType":"httpBasicAuth"},"credentials":{"httpBasicAuth":{"id":"K1UGehJnDI8N25UA","name":"Unnamed credential"}},"typeVersion":4.2},{"id":"12c785d5-fab8-41cb-9387-3d5f698448b8","name":"Merge Audio + Video","type":"n8n-nodes-base.httpRequest","position":[940,200],"parameters":{"url":"https://api.json2video.com/v2/movies","method":"POST","options":{},"jsonBody":"={\n\"resolution\": \"custom\",\n\"width\": 720,\n\"height\": 1280,\n\"scenes\": [\n{\n\"elements\": [\n{\n\"type\": \"video\",\n\"src\": \"{{ $('Get Generated Video URL').item.json.data.output.video_url }}\",\n\"resize\": \"cover\"\n},\n{\n\"type\": \"audio\",\n\"src\": \"{{ $json.url }}\"\n}\n]\n}\n]\n}","sendBody":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"credentials":{"httpBasicAuth":{"id":"K1UGehJnDI8N25UA","name":"Unnamed credential"},"httpHeaderAuth":{"id":"S8rqcKkBDLZ3xAso","name":"Header Auth account 2"}},"typeVersion":4.2},{"id":"7fdfd093-3cb4-47cf-a333-c17ebd896295","name":"Wait for Audio/Video Fusion","type":"n8n-nodes-base.wait","position":[1240,200],"webhookId":"36dbee1e-d027-43ab-9ae8-7b3b6d233746","parameters":{"unit":"minutes","amount":1},"typeVersion":1.1},{"id":"bacce3e0-547e-45e5-ae4b-127f1e8c3c0d","name":"Get Video URL with Audio","type":"n8n-nodes-base.httpRequest","position":[1520,200],"parameters":{"url":"=https://api.json2video.com/v2/movies?id={{ $json.project }}","options":{},"authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"S8rqcKkBDLZ3xAso","name":"Header Auth account 2"}},"typeVersion":4.2},{"id":"1bcfd35d-f746-40b6-9caf-0bd86c47b57e","name":"Wait Before Captioning","type":"n8n-nodes-base.wait","position":[700,500],"webhookId":"6ab51bf7-67da-468f-af3d-3270cf0e7c77","parameters":{"amount":30},"typeVersion":1.1},{"id":"7fb36e35-5d96-4fce-9a7d-e3dc5801b838","name":"Add Captions/Subtitles to Video","type":"n8n-nodes-base.httpRequest","position":[940,500],"parameters":{"url":"https://api.json2video.com/v2/movies","method":"POST","options":{},"jsonBody":"={\n\"id\": \"qbaasr7s\",\n\"resolution\": \"custom\",\n\"quality\": \"high\",\n\"scenes\": [\n{\n\"id\": \"qyjh9lwj\",\n\"comment\": \"Scene 1\",\n\"elements\": []\n}\n],\n\"elements\": [\n{\n\"id\": \"q6dznzcv\",\n\"type\": \"video\",\n\"src\": \"{{ $json.movie.url }}\"\n},\n{\n\"id\": \"q41n9kxp\",\n\"type\": \"subtitles\",\n\"settings\": {\n\"style\": \"classic-progressive\",\n\"position\": \"center-center\",\n\"font-family\": \"Oswald\",\n\"font-size\": 140,\n\"word-color\": \"#ffd700\",\n\"shadow-color\": \"#260B1B\",\n\"line-color\": \"#F1E7F4\",\n\"shadow-offset\": 0,\n\"box-color\": \"#260B1B\",\n\"outline-color\": \"#000000\",\n\"outline-width\": 8\n},\n\"language\": \"en\"\n}\n],\n\"width\": 720,\n\"height\": 1280\n}","sendBody":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"S8rqcKkBDLZ3xAso","name":"Header Auth account 2"}},"typeVersion":4.2},{"id":"116ec15c-c611-4fba-ab61-5090d777827e","name":"Wait for Caption Render","type":"n8n-nodes-base.wait","position":[1240,500],"webhookId":"1b1b1f4e-c08b-4b92-adf5-9f8e5f65ce66","parameters":{"unit":"minutes","amount":1},"typeVersion":1.1},{"id":"05ea1d12-50d3-48cf-8b2a-416bcb3dd7a7","name":"Get Final Video URL (Audio + Captions)","type":"n8n-nodes-base.httpRequest","position":[1520,500],"parameters":{"url":"=https://api.json2video.com/v2/movies?id={{ $json.project }}","options":{},"authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"S8rqcKkBDLZ3xAso","name":"Header Auth account 2"}},"typeVersion":4.2},{"id":"466e2c7c-f50b-4fd8-a862-d2cecb255579","name":"Generate Social Caption from Voiceover","type":"@n8n/n8n-nodes-langchain.openAi","position":[160,840],"parameters":{"modelId":{"__rl":true,"mode":"list","value":"gpt-4o","cachedResultName":"GPT-4O"},"options":{},"messages":{"values":[{"content":"=📲 Prompt: Caption Generator for Voiceover-Based Social Posts\nYour Role:\nCreate a concise and engaging social media caption that builds directly on the voiceover script below:\n{{ $('Generate Voice-Over Script').item.json.message.content }}\n\n🧠 Caption Guidelines:\nKeep it short, compelling, and value-driven.\n\nAvoid generic motivational fluff — focus on real, actionable insight or highlight a problem/solution pattern.\n\n\nStructure:\n\nOne sentence per line.\n\nNote: Do not use this character: \" in the result.\nReturn a single short paragraph with no line breaks and no special characters.\nNote: Do not use this character: \" in the result.\n"}]}},"credentials":{"openAiApi":{"id":"6h3DfVhNPw9I25nO","name":"OpenAi account"}},"typeVersion":1.8},{"id":"6591e8e3-db92-4725-ab78-24cbfaf8bebd","name":"Generate YouTube-Style Title","type":"@n8n/n8n-nodes-langchain.openAi","position":[560,840],"parameters":{"modelId":{"__rl":true,"mode":"list","value":"gpt-4o","cachedResultName":"GPT-4O"},"options":{},"messages":{"values":[{"content":"=Act as a YouTube Title Expert.\nBased on the following video description:\n{{ $('Generate Voice-Over Script').item.json.message.content }}\nGenerate a short, punchy, and curiosity-driven YouTube video title that makes people want to click.\nMake it feel urgent, valuable, or surprising — and avoid generic or boring phrases.\nKeep it under 70 characters. Return only the title, no explanations.\nNote: The title must be free of special characters and the character \". Return only a plain text title.\n\n"}]}},"credentials":{"openAiApi":{"id":"6h3DfVhNPw9I25nO","name":"OpenAi account"}},"typeVersion":1.8},{"id":"6b32d227-6d63-409f-ad17-0d24ea5dd2e1","name":"Save Video Metadata to Google Sheets","type":"n8n-nodes-base.googleSheets","position":[940,840],"parameters":{"columns":{"value":{"Titre":"={{ $json.message.content }}","PROMPT":"={{ $('Trigger: Telegram Prompt').item.json.message.text }}","URL VIDEO":"={{ $('Get Final Video URL (Audio + Captions)').item.json.movie.url }}","DESCRIPTION":"={{ $('Generate Social Caption from Voiceover').item.json.message.content }}"},"schema":[{"id":"PROMPT","type":"string","display":true,"required":false,"displayName":"PROMPT","defaultMatch":false,"canBeUsedToMatch":true},{"id":"DESCRIPTION","type":"string","display":true,"required":false,"displayName":"DESCRIPTION","defaultMatch":false,"canBeUsedToMatch":true},{"id":"URL VIDEO","type":"string","display":true,"required":false,"displayName":"URL VIDEO","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Titre","type":"string","display":true,"removed":false,"required":false,"displayName":"Titre","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"append","sheetName":{"__rl":true,"mode":"id","value":"="},"documentId":{"__rl":true,"mode":"id","value":"="}},"credentials":{"googleSheetsOAuth2Api":{"id":"51us92xkOlrvArhV","name":"Google Sheets account"}},"typeVersion":4.5},{"id":"6ff5ebe5-b95d-4977-947e-5fce267dd73d","name":"Send Final Video to Telegram","type":"n8n-nodes-base.telegram","position":[1240,840],"webhookId":"c70c5281-99b5-4eaa-a597-c110fc3e6fab","parameters":{"file":"={{ $json['URL VIDEO'] }}","chatId":"={{ $('Trigger: Telegram Prompt').item.json.message.chat.id }}","operation":"sendVideo","additionalFields":{}},"credentials":{"telegramApi":{"id":"PJcx2VBF9ubQIy3y","name":"Telegram account 2"}},"typeVersion":1.2},{"id":"1886cd48-2486-4507-882e-0b0eb602a78e","name":"Send Caption Link via Telegram","type":"n8n-nodes-base.telegram","position":[1520,840],"webhookId":"d9e210ef-c704-4478-b78c-21662156b700","parameters":{"text":"={{ $('Save Video Metadata to Google Sheets').item.json.DESCRIPTION }}\n\nLink here : {{ $('Save Video Metadata to Google Sheets').item.json['URL VIDEO'] }}","chatId":"={{ $json.result.chat.id }}","additionalFields":{}},"credentials":{"telegramApi":{"id":"PJcx2VBF9ubQIy3y","name":"Telegram account 2"}},"typeVersion":1.2},{"id":"570303c5-190c-450c-8fb7-1a33f3bfaa7a","name":"Assign Social Media IDs","type":"n8n-nodes-base.set","position":[160,1300],"parameters":{"mode":"raw","options":{},"jsonOutput":"{\n  \"instagram_id\": \"1687\",\n  \"youtube_id\": \"873\",\n  \"threads_id\": \"507\",\n  \"tiktok_id\": \"2079\",\n  \"facebook_id\": \"1759\",\n  \"facebook_page_id\": \"101603614680195\",\n  \"twitter_id\": \"1289\",\n  \"linkedin_id\": \"1446\",\n  \"pinterest_id\": \"363\",\n  \"pinterest_board_id\": \"1146658823815436667\",\n  \"bluesky_id\": \"932\"\n}\n"},"typeVersion":3.4},{"id":"5ee6edcf-936d-42ba-bb28-7c02ea28b7ee","name":"Upload Video to Blotato","type":"n8n-nodes-base.httpRequest","position":[380,1300],"parameters":{"url":"https://backend.blotato.com/v2/media","method":"POST","options":{},"sendBody":true,"sendHeaders":true,"bodyParameters":{"parameters":[{"name":"url","value":"={{ $('Save Video Metadata to Google Sheets').item.json['URL VIDEO'] }}"}]},"headerParameters":{"parameters":[{"name":"blotato-api-key"}]}},"typeVersion":4.2},{"id":"b9eb6f28-d2d3-40f7-98aa-e00db4ede869","name":"Post to Instagram","type":"n8n-nodes-base.httpRequest","position":[940,1120],"parameters":{"url":"https://backend.blotato.com/v2/posts","method":"POST","options":{},"jsonBody":"={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Social Media IDs').item.json.instagram_id }}\",\n    \"target\": {\n      \"targetType\": \"instagram\"\n    },\n    \"content\": {\n      \"text\": \"{{ $('Save Video Metadata to Google Sheets').item.json.DESCRIPTION }}\",\n      \"platform\": \"instagram\",\n      \"mediaUrls\": [\n        \"{{ $json.url }}\"\n      ]\n    }\n  }\n}\n","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"blotato-api-key"}]}},"typeVersion":4.2},{"id":"b379365c-832a-422c-b42d-6a6ed5dc90d5","name":"Post to YouTube","type":"n8n-nodes-base.httpRequest","position":[1240,1120],"parameters":{"url":"https://backend.blotato.com/v2/posts","method":"POST","options":{},"jsonBody":"={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Social Media IDs').item.json.youtube_id }}\",\n    \"target\": {\n      \"targetType\": \"youtube\",\n      \"title\": \"{{ $('Save Video Metadata to Google Sheets').item.json.Titre }}\",\n      \"privacyStatus\": \"unlisted\",\n      \"shouldNotifySubscribers\": \"false\"\n    },\n    \"content\": {\n      \"text\": \"{{ $('Save Video Metadata to Google Sheets').item.json.DESCRIPTION }}\",\n      \"platform\": \"youtube\",\n      \"mediaUrls\": [\n        \"{{ $json.url }}\"\n      ]\n    }\n  }\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"blotato-api-key"}]}},"typeVersion":4.2},{"id":"859b0b81-2b92-47b7-8858-e748b92f1091","name":"Post to TikTok","type":"n8n-nodes-base.httpRequest","position":[1520,1120],"parameters":{"url":"https://backend.blotato.com/v2/posts","method":"POST","options":{},"jsonBody":"={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Social Media IDs').item.json.tiktok_id }}\",\n    \"target\": {\n      \"targetType\": \"tiktok\",\n      \"isYourBrand\": \"false\", \n      \"disabledDuet\": \"false\",\n      \"privacyLevel\": \"PUBLIC_TO_EVERYONE\",\n      \"isAiGenerated\": \"true\",\n      \"disabledStitch\": \"false\",\n      \"disabledComments\": \"false\",\n      \"isBrandedContent\": \"false\"\n      \n    },\n    \"content\": {\n      \"text\": \"{{ $('Save Video Metadata to Google Sheets').item.json.DESCRIPTION }}\",\n      \"platform\": \"tiktok\",\n      \"mediaUrls\": [\n        \"{{ $json.url }}\"\n      ]\n    }\n  }\n}\n","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"blotato-api-key"}]}},"typeVersion":4.2},{"id":"bd94c7cb-a9f9-44e2-94e0-e717e8dd2534","name":"Post to Facebook Page","type":"n8n-nodes-base.httpRequest","position":[940,1300],"parameters":{"url":"https://backend.blotato.com/v2/posts","method":"POST","options":{},"jsonBody":"={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Social Media IDs').item.json.facebook_id }}\",\n    \"target\": {\n      \"targetType\": \"facebook\",\n      \"pageId\": \"{{ $('Assign Social Media IDs').item.json.facebook_page_id }}\"\n\n      \n    },\n    \"content\": {\n      \"text\": \"{{ $('Save Video Metadata to Google Sheets').item.json.DESCRIPTION }}\",\n      \"platform\": \"facebook\",\n      \"mediaUrls\": [\n        \"{{ $json.url }}\"\n      ]\n    }\n  }\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"blotato-api-key"}]}},"typeVersion":4.2},{"id":"b13a95eb-998e-445a-a27c-0a474d95bf2b","name":"Post to Threads","type":"n8n-nodes-base.httpRequest","position":[1240,1300],"parameters":{"url":"https://backend.blotato.com/v2/posts","method":"POST","options":{},"jsonBody":"={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Social Media IDs').item.json.threads_id }}\",\n    \"target\": {\n      \"targetType\": \"threads\"\n      \n    },\n    \"content\": {\n      \"text\": \"{{ $('Save Video Metadata to Google Sheets').item.json.DESCRIPTION }}\",\n      \"platform\": \"threads\",\n      \"mediaUrls\": [\n        \"{{ $json.url }}\"\n      ]\n    }\n  }\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"blotato-api-key"}]}},"typeVersion":4.2},{"id":"d8a0f1a1-3938-493e-8178-e86829571502","name":"Post to Twitter (X)","type":"n8n-nodes-base.httpRequest","position":[1520,1300],"parameters":{"url":"https://backend.blotato.com/v2/posts","method":"POST","options":{},"jsonBody":"={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Social Media IDs').item.json.twitter_id }}\",\n    \"target\": {\n      \"targetType\": \"twitter\"\n      \n    },\n    \"content\": {\n      \"text\": \"{{ $('Save Video Metadata to Google Sheets').item.json.DESCRIPTION }}\",\n      \"platform\": \"twitter\",\n      \"mediaUrls\": [\n        \"{{ $json.url }}\"\n      ]\n    }\n  }\n}\n","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"blotato-api-key"}]}},"typeVersion":4.2},{"id":"dd0e8c1d-b4dc-4f11-ac75-580ff7aa8fec","name":"Post to LinkedIn","type":"n8n-nodes-base.httpRequest","position":[940,1460],"parameters":{"url":"https://backend.blotato.com/v2/posts","method":"POST","options":{},"jsonBody":"={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Social Media IDs').item.json.linkedin_id }}\",\n    \"target\": {\n      \"targetType\": \"linkedin\"\n      \n    },\n    \"content\": {\n      \"text\": \"{{ $('Save Video Metadata to Google Sheets').item.json.DESCRIPTION }}\",\n      \"platform\": \"linkedin\",\n      \"mediaUrls\": [\n        \"{{ $json.url }}\"\n      ]\n    }\n  }\n}\n","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"blotato-api-key"}]}},"typeVersion":4.2},{"id":"a404095d-47b7-464b-82b1-cbc732e6a0a5","name":"Post to Bluesky","type":"n8n-nodes-base.httpRequest","position":[1240,1460],"parameters":{"url":"https://backend.blotato.com/v2/posts","method":"POST","options":{},"jsonBody":"={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Social Media IDs').item.json.bluesky_id }}\",\n    \"target\": {\n      \"targetType\": \"bluesky\"\n      \n    },\n    \"content\": {\n      \"text\": \"{{ $('Save Video Metadata to Google Sheets').item.json.DESCRIPTION }}\",\n      \"platform\": \"bluesky\",\n      \"mediaUrls\": [\n        \"https://pbs.twimg.com/media/GE8MgIiWEAAfsK3.jpg\"\n      ]\n    }\n  }\n}\n","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"blotato-api-key"}]}},"typeVersion":4.2},{"id":"a23845dc-e81d-4eab-817d-d1d8b480e386","name":"Post to Pinterest","type":"n8n-nodes-base.httpRequest","position":[1520,1460],"parameters":{"url":"https://backend.blotato.com/v2/posts","method":"POST","options":{},"jsonBody":"={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Social Media IDs').item.json.pinterest_id }}\",\n    \"target\": {\n      \"targetType\": \"pinterest\",\n      \"boardId\": \"{{ $('Assign Social Media IDs').item.json.pinterest_board_id }}\"      \n    },\n    \"content\": {\n      \"text\": \"{{ $('Save Video Metadata to Google Sheets').item.json.DESCRIPTION }}\",\n      \"platform\": \"pinterest\",\n      \"mediaUrls\": [\n        \"https://pbs.twimg.com/media/GE8MgIiWEAAfsK3.jpg\"\n      ]\n    }\n  }\n}\n","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"blotato-api-key"}]}},"typeVersion":4.2}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"ba0fabe4-69f5-4c38-984b-d1df6ec572b8","connections":{"Post to Bluesky":{"main":[[]]},"Post to Threads":{"main":[[]]},"Post to YouTube":{"main":[[]]},"Post to LinkedIn":{"main":[[]]},"Post to Instagram":{"main":[[]]},"Merge Audio + Video":{"main":[[{"node":"Wait for Audio/Video Fusion","type":"main","index":0}]]},"OpenAI Model Bridge":{"ai_languageModel":[[{"node":"Transform Prompt for Kling (GPT-4)","type":"ai_languageModel","index":0}]]},"Post to Facebook Page":{"main":[[]]},"Wait Before Captioning":{"main":[[{"node":"Add Captions/Subtitles to Video","type":"main","index":0}]]},"Assign Social Media IDs":{"main":[[{"node":"Upload Video to Blotato","type":"main","index":0}]]},"Get Generated Video URL":{"main":[[{"node":"Generate Voice-Over Script","type":"main","index":0}]]},"Upload Video to Blotato":{"main":[[{"node":"Post to Instagram","type":"main","index":0},{"node":"Post to YouTube","type":"main","index":0},{"node":"Post to TikTok","type":"main","index":0},{"node":"Post to Facebook Page","type":"main","index":0},{"node":"Post to Threads","type":"main","index":0},{"node":"Post to Twitter (X)","type":"main","index":0},{"node":"Post to LinkedIn","type":"main","index":0},{"node":"Post to Bluesky","type":"main","index":0},{"node":"Post to Pinterest","type":"main","index":0}]]},"Wait for Caption Render":{"main":[[{"node":"Get Final Video URL (Audio + Captions)","type":"main","index":0}]]},"Extract Prompt & Caption":{"main":[[{"node":"Transform Prompt for Kling (GPT-4)","type":"main","index":0}]]},"Get Video URL with Audio":{"main":[[{"node":"Wait Before Captioning","type":"main","index":0}]]},"Trigger: Telegram Prompt":{"main":[[{"node":"Extract Prompt & Caption","type":"main","index":0}]]},"Wait for Video Generation":{"main":[[{"node":"Get Generated Video URL","type":"main","index":0}]]},"Generate Voice-Over Script":{"main":[[{"node":"Convert Script to Audio (TTS)","type":"main","index":0}]]},"Upload Audio to Cloudinary":{"main":[[{"node":"Merge Audio + Video","type":"main","index":0}]]},"Wait for Audio/Video Fusion":{"main":[[{"node":"Get Video URL with Audio","type":"main","index":0}]]},"Generate Video via Kling API":{"main":[[{"node":"Wait for Video Generation","type":"main","index":0}]]},"Generate YouTube-Style Title":{"main":[[{"node":"Save Video Metadata to Google Sheets","type":"main","index":0}]]},"Send Final Video to Telegram":{"main":[[{"node":"Send Caption Link via Telegram","type":"main","index":0}]]},"Convert Script to Audio (TTS)":{"main":[[{"node":"Upload Audio to Cloudinary","type":"main","index":0}]]},"Send Caption Link via Telegram":{"main":[[{"node":"Assign Social Media IDs","type":"main","index":0}]]},"Add Captions/Subtitles to Video":{"main":[[{"node":"Wait for Caption Render","type":"main","index":0}]]},"Transform Prompt for Kling (GPT-4)":{"main":[[{"node":"Generate Video via Kling API","type":"main","index":0}]]},"Save Video Metadata to Google Sheets":{"main":[[{"node":"Send Final Video to Telegram","type":"main","index":0}]]},"Generate Social Caption from Voiceover":{"main":[[{"node":"Generate YouTube-Style Title","type":"main","index":0}]]},"Get Final Video URL (Audio + Captions)":{"main":[[{"node":"Generate Social Caption from Voiceover","type":"main","index":0}]]}}}


name: Build an MCP Server with Google Calendar and Custom Functions
author_name: Solomon
author_username: solomon
categories: []
created_at: 2025-04-10T16:33:11.142Z
updated_at: 2025-04-10T16:33:11.142Z
url: https://n8n.io/workflows/3514
scraped_at: 2025-07-06 21:16:30
description:
  Learn how to build an MCP Server and Client in n8n with official nodes.

  &gt; ⚠ Requires n8n version 1.88.0 or higher.

  In this example, we use Google Calendar and custom functions as two separate MCP Servers, demonstrating how to integrate both native and custom tools.

  How it works

  The AI Agent connects to two MCP Servers. Each MCP Trigger (Server) generates a URL exposing its tools. This URL is used by an MCP Client linked to the AI Agent.

  Whenever you make changes to the tools, there’s no need to modify the MCP Client. It automatically keeps the AI Agent informed on how to use each tool, even if you change them over time.

  That’s the power of MCP 🙌

  Who is this template for

  Anyone looking to use MCP with their AI Agents.

  How to set up

  Instructions are included within the workflow itself.

  Check out my other templates

  👉 https://n8n.io/creators/solomon/

nodes_used:
  ["n8n-nodes-base.httpRequest","n8n-nodes-base.debugHelper","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.lmChatOpenAi","@n8n/n8n-nodes-langchain.memoryBufferWindow","@n8n/n8n-nodes-langchain.toolWorkflow","@n8n/n8n-nodes-langchain.mcpClientTool"]

workflow_json:
  {"meta":{"instanceId":"d6b502dfa4d9dd072cdc5c2bb763558661053f651289291352a84403e01b3d1b"},"nodes":[{"id":"6a36842b-b214-4683-9129-ad44f4b79117","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[440,-180],"parameters":{"options":{"systemMessage":"=You are a helpful assistant.\nCurrent datetime is {{ $now.toString() }}"}},"typeVersion":1.8},{"id":"f7c9aaa7-9ba7-4bbe-909b-3085ed60a387","name":"SearchEvent","type":"n8n-nodes-base.googleCalendarTool","position":[2060,180],"parameters":{"limit":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Limit', ``, 'number') }}","options":{},"timeMax":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Before', ``, 'string') }}","timeMin":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('After', ``, 'string') }}","calendar":{"__rl":true,"mode":"list","value":"gmsalomao2@gmail.com","cachedResultName":"gmsalomao2@gmail.com"},"operation":"getAll"},"typeVersion":1.3},{"id":"47f6077d-de8a-46f7-8d3a-3a21596dea1f","name":"CreateEvent","type":"n8n-nodes-base.googleCalendarTool","position":[2180,180],"parameters":{"end":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('End', ``, 'string') }}","start":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Start', ``, 'string') }}","calendar":{"__rl":true,"mode":"list","value":"gmsalomao2@gmail.com","cachedResultName":"gmsalomao2@gmail.com"},"additionalFields":{"summary":"={{ $fromAI(\"event_title\", \"The event title\", \"string\") }}","description":"={{ $fromAI(\"event_description\", \"The event description\", \"string\") }}"}},"typeVersion":1.3},{"id":"7e3573c8-d4b5-4bd2-9aac-3bcfca1c8eb4","name":"UpdateEvent","type":"n8n-nodes-base.googleCalendarTool","position":[2300,180],"parameters":{"eventId":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Event_ID', ``, 'string') }}","calendar":{"__rl":true,"mode":"list","value":"gmsalomao2@gmail.com","cachedResultName":"gmsalomao2@gmail.com"},"operation":"update","updateFields":{"end":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('End', ``, 'string') }}","start":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Start', ``, 'string') }}","summary":"={{ $fromAI(\"event_title\", \"The event title\", \"string\") }}","description":"={{ $fromAI(\"event_description\", \"The event description\", \"string\") }}"}},"typeVersion":1.3},{"id":"fae46aa7-02c9-40d3-8f59-b46533e6a93c","name":"DeleteEvent","type":"n8n-nodes-base.googleCalendarTool","position":[2420,180],"parameters":{"eventId":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Event_ID', ``, 'string') }}","options":{},"calendar":{"__rl":true,"mode":"list","value":"gmsalomao2@gmail.com","cachedResultName":"gmsalomao2@gmail.com"},"operation":"delete"},"typeVersion":1.3},{"id":"da58e521-7e80-4d28-84fd-17732728855e","name":"Google Calendar MCP","type":"@n8n/n8n-nodes-langchain.mcpTrigger","position":[2060,-20],"webhookId":"f9d9d5ea-6f83-42c8-ae50-ee6c71789bca","parameters":{"path":"my-calendar"},"typeVersion":1},{"id":"9a8490a0-eacf-4b7a-b6fd-e8d17a5cf25a","name":"When Executed by Another Workflow","type":"n8n-nodes-base.executeWorkflowTrigger","position":[1440,880],"parameters":{"workflowInputs":{"values":[{"name":"function_name"},{"name":"payload","type":"object"}]}},"typeVersion":1.1},{"id":"c2430651-b604-4aff-bdc8-c51a7de9fcc1","name":"Switch","type":"n8n-nodes-base.switch","position":[1660,860],"parameters":{"rules":{"values":[{"outputKey":"UPPERCASE","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"ab18304c-4f73-430f-b9fa-2ce4d098e1fa","operator":{"type":"string","operation":"equals"},"leftValue":"={{ $json.function_name }}","rightValue":"uppercase"}]},"renameOutput":true},{"outputKey":"LOWERCASE","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"606bda79-f401-4de2-be9d-51368c794479","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.function_name }}","rightValue":"lowercase"}]},"renameOutput":true},{"outputKey":"RANDOM DATA","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"4b22e689-e652-47d2-b737-7be00da9f185","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.function_name }}","rightValue":"random_user_data"}]},"renameOutput":true},{"outputKey":"JOKE","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"27a75a2c-8058-4a7c-85c1-898cabeac4a1","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.function_name }}","rightValue":"joke"}]},"renameOutput":true}]},"options":{}},"typeVersion":3.2},{"id":"77df0d2c-ed4d-4da9-a218-acf4fd06cf13","name":"Convert Text to Upper Case","type":"n8n-nodes-base.set","position":[2000,520],"parameters":{"options":{},"assignments":{"assignments":[{"id":"42333f26-8e14-438a-9965-eec31bf4b6a3","name":"converted_text","type":"string","value":"={{ $json.payload.text.toUpperCase() }}"}]}},"typeVersion":3.4},{"id":"15e7489b-b1eb-4be1-80b0-0cb94d05daa3","name":"Convert Text to Lower Case","type":"n8n-nodes-base.set","position":[2000,720],"parameters":{"options":{},"assignments":{"assignments":[{"id":"42333f26-8e14-438a-9965-eec31bf4b6a3","name":"converted_text","type":"string","value":"={{ $json.payload.text.toLowerCase() }}"}]}},"typeVersion":3.4},{"id":"75bc9895-ccad-48b6-bd99-965a62f36f2a","name":"Convert Text","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[1440,180],"parameters":{"name":"convert_text_case","workflowId":{"__rl":true,"mode":"id","value":"={{ $workflow.id }}"},"description":"Call this tool to convert text to lower case or upper case.","workflowInputs":{"value":{"payload":"={\n  \"text\": \"{{ $fromAI(\"text_to_convert\", \"The text to convert\", \"string\") }}\"\n}\n","function_name":"={{ $fromAI(\"function_name\", \"Either lowercase or uppercase\", \"string\") }}"},"schema":[{"id":"function_name","type":"string","display":true,"removed":false,"required":false,"displayName":"function_name","defaultMatch":false,"canBeUsedToMatch":true},{"id":"payload","type":"object","display":true,"removed":false,"required":false,"displayName":"payload","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.1},{"id":"b2b8419d-f068-41ad-bcda-a057ddc82924","name":"When chat message received","type":"@n8n/n8n-nodes-langchain.chatTrigger","position":[240,-180],"webhookId":"7b02318f-1c6b-4f2a-9a4f-b17fa69ea680","parameters":{"options":{}},"typeVersion":1.1},{"id":"3f4bee1a-18c8-45be-8038-b192f771e4d4","name":"Simple Memory","type":"@n8n/n8n-nodes-langchain.memoryBufferWindow","position":[540,40],"parameters":{},"typeVersion":1.3},{"id":"165cd445-13e6-4215-966a-0cd1cc4cb795","name":"Calendar MCP","type":"@n8n/n8n-nodes-langchain.mcpClientTool","position":[1080,60],"parameters":{"sseEndpoint":"https://n8n.yourdomain/mcp/my-calendar/sse"},"typeVersion":1},{"id":"3e2e655a-0d95-489e-9e4e-79415db90bbe","name":"My Functions","type":"@n8n/n8n-nodes-langchain.mcpClientTool","position":[920,60],"parameters":{"sseEndpoint":"https://n8n.yourdomain/mcp/my-functions/sse"},"typeVersion":1},{"id":"8fbf3a7b-171e-42f1-96f0-b4862a800721","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[1320,-180],"parameters":{"color":3,"width":620,"height":520,"content":"## Activate the workflow to make the MCP Trigger work\nIn order to make the MCP server available, you need to activate the workflow.\n\nThen copy the Production URL of the MCP Trigger and paste it in the corresponding MCP Client tool."},"typeVersion":1},{"id":"783b47d1-8b6d-4d45-903f-812dc46d80de","name":"My Functions Server","type":"@n8n/n8n-nodes-langchain.mcpTrigger","position":[1440,-20],"webhookId":"83f72547-18b7-4f02-846b-27bf39d1efff","parameters":{"path":"my-functions"},"typeVersion":1},{"id":"31432882-2953-440c-9144-ba129ab2a8f7","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[820,-180],"parameters":{"color":7,"width":440,"height":520,"content":"## MCP Clients\nFor every tool here you need to obtain he corresponding Production URL from the MCP Triggers on the right 👉"},"typeVersion":1},{"id":"65269a4d-d6db-4767-b8bc-0992bfe42d17","name":"Random user data","type":"n8n-nodes-base.debugHelper","position":[2000,1020],"parameters":{"category":"randomData","randomDataCount":"={{ $json.payload.number }}"},"typeVersion":1},{"id":"2c97af29-d923-49a4-91e2-b6ff5d0fe322","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-480,-180],"parameters":{"color":7,"width":660,"height":640,"content":"# Try these example requests with the AI Agent\n\n### My Functions MCP\n1. Use your tools to convert this text to lower case: `EXAMPLE TeXt`\n\n2. Use your tools to convert this text to upper case: `example TeXt`\n\n3. Generate 5 random user data, please.\n\n4. Please obtain 3 jokes.\n\n\n\n\n### Calendar MCP\n5. What is my schedule for next week?\n\n6. I have a meeting with John tomorrow at 2pm. Please add it to my Calendar.\n\n7. Adjust the time of my meeting with John tomorrow from 2pm to 4pm, please.\n\n8. Cancel my meeting with John, tomorrow."},"typeVersion":1},{"id":"77f8d96d-11da-4323-9925-58267da607c3","name":"Generate random user data","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[1600,180],"parameters":{"name":"random_user_data","workflowId":{"__rl":true,"mode":"id","value":"={{ $workflow.id }}"},"description":"Generate random user data","workflowInputs":{"value":{"payload":"={\n  \"number\": {{ $fromAI(\"amount\", \"The amount of user data to generate in integer format\", \"number\") }}\n}","function_name":"random_user_data"},"schema":[{"id":"function_name","type":"string","display":true,"removed":false,"required":false,"displayName":"function_name","defaultMatch":false,"canBeUsedToMatch":true},{"id":"payload","type":"object","display":true,"removed":false,"required":false,"displayName":"payload","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.1},{"id":"89d36f19-c7b4-4f53-9aec-2977bbd74de8","name":"Return only some fields","type":"n8n-nodes-base.set","position":[2220,1020],"parameters":{"options":{},"assignments":{"assignments":[{"id":"b4548cbe-f3fc-4911-901a-d73182d710a9","name":"First name","type":"string","value":"={{ $json.firstname }}"},{"id":"6e573a27-ef03-4254-8f9b-2c471e1540c2","name":"Last name","type":"string","value":"={{ $json.lastname }}"},{"id":"ac5b5806-bf8e-4e1a-a47d-e7180d31e98a","name":"Email","type":"string","value":"={{ $json.email }}"}]}},"typeVersion":3.4},{"id":"a8cf7d60-b3d8-41cd-84d8-5cc1c299f33f","name":"Joke Request","type":"n8n-nodes-base.httpRequest","position":[2000,1220],"parameters":{"url":"=https://official-joke-api.appspot.com/jokes/random/{{ $json.payload.number }}","options":{}},"typeVersion":4.2},{"id":"76847e5d-2cc1-46f6-b0a6-0be81a5d0fea","name":"Random Jokes","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[1760,180],"parameters":{"name":"obtain_jokes","workflowId":{"__rl":true,"mode":"id","value":"={{ $workflow.id }}"},"description":"Call this tool to obtain random jokes","workflowInputs":{"value":{"payload":"={\n  \"number\": {{ $fromAI(\"amount\", \"The amount of jokes to request\", \"number\") }}\n}","function_name":"joke"},"schema":[{"id":"function_name","type":"string","display":true,"removed":false,"required":false,"displayName":"function_name","defaultMatch":false,"canBeUsedToMatch":true},{"id":"payload","type":"object","display":true,"removed":false,"required":false,"displayName":"payload","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.1},{"id":"2a34f767-7bf0-4c7c-8882-6dde62670383","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[1320,360],"parameters":{"color":7,"width":1260,"height":1060,"content":"## The My Functions MCP calls this sub-workflow every time.\nA subworkflow is a separate workflow that can be called by other workflows and is able to receive parameters.\nLearn more about sub-workflows **[here](https://docs.n8n.io/flow-logic/subworkflows/)**"},"typeVersion":1},{"id":"eda3b2a5-845a-413f-b866-759fe5e1a0b9","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[1960,-180],"parameters":{"color":5,"width":620,"height":520,"content":"## Google Calendar tools require credentials\nIf you don't have your Google Credentials set up in n8n yet, watch [this](https://www.youtube.com/watch?v=3Ai1EPznlAc) video to learn how to do it.\n\nIf you are using n8n Cloud plans, it's very intuitive to setup and you may not even need the tutorial."},"typeVersion":1},{"id":"4b100035-d803-46aa-8540-08e69d7f2179","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[-480,1160],"parameters":{"width":660,"height":180,"content":"# Need help?\nFor getting help with this workflow, please create a topic on the community forums here:\nhttps://community.n8n.io/c/questions/"},"typeVersion":1},{"id":"74ad0058-87b6-4a91-88a5-a0cb72bce84d","name":"OpenAI 4o","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[400,40],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o","cachedResultName":"gpt-4o"},"options":{}},"typeVersion":1.2},{"id":"c7f95bf5-23ed-4296-a2e0-dfb9fdebde94","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","position":[240,160],"parameters":{"color":7,"height":240,"content":"## Why model 4o? 👆\nAfter testing 4o-mini it had some difficulties handling the calendar requests, while the 4o model handled it with ease.\n\nDepending on your prompt and tools, 4o-mini might be able to work well too, but it requires further testing."},"typeVersion":1},{"id":"f5c974cc-4277-4ab4-ada6-cad1d16dda80","name":"Sticky Note8","type":"n8n-nodes-base.stickyNote","position":[-480,-340],"parameters":{"color":4,"width":3060,"height":140,"content":""},"typeVersion":1},{"id":"a304ab81-9ef6-485d-b35a-76d2cc3d5c91","name":"Sticky Note9","type":"n8n-nodes-base.stickyNote","position":[640,-300],"parameters":{"color":4,"width":800,"height":80,"content":"# Learn How to Build an MCP Server and Client"},"typeVersion":1},{"id":"148904d6-f94b-4ec0-a026-2e5fb921c07f","name":"Sticky Note10","type":"n8n-nodes-base.stickyNote","position":[-480,480],"parameters":{"color":7,"width":660,"height":660,"content":"# Author\n![Solomon](https://gravatar.com/avatar/79aa147f090807fe0f618fb47a1de932669e385bb0c84bf3a7f891ae7d174256?r=pg&d=retro&size=200)\n### Solomon\nFreelance consultant from Brazil, specializing in automations and data analysis. I work with select clients, addressing their toughest projects.\n\nFor business inquiries, email me at automations.solomon@gmail.com\nOr message me on [Telegram](https://t.me/salomaoguilherme) for a faster response.\n\n### Check out my other templates\n### 👉 https://n8n.io/creators/solomon/\n"},"typeVersion":1},{"id":"36aeb3a3-bcc3-4d50-84f9-87065f908248","name":"Sticky Note16","type":"n8n-nodes-base.stickyNote","position":[-460,1020],"parameters":{"color":4,"width":620,"height":80,"content":"### 💡 **Want to learn advanced n8n skills and earn money building workflows?**\n‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎Check out [Scrapes Academy](https://www.skool.com/scrapes/about?ref=21f10ad99f4d46ba9b8aaea8c9f58c34)"},"typeVersion":1}],"pinData":{"When Executed by Another Workflow":[{"payload":{"number":5},"function_name":"joke"}]},"connections":{"Switch":{"main":[[{"node":"Convert Text to Upper Case","type":"main","index":0}],[{"node":"Convert Text to Lower Case","type":"main","index":0}],[{"node":"Random user data","type":"main","index":0}],[{"node":"Joke Request","type":"main","index":0}]]},"OpenAI 4o":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"CreateEvent":{"ai_tool":[[{"node":"Google Calendar MCP","type":"ai_tool","index":0}]]},"DeleteEvent":{"ai_tool":[[{"node":"Google Calendar MCP","type":"ai_tool","index":0}]]},"SearchEvent":{"ai_tool":[[{"node":"Google Calendar MCP","type":"ai_tool","index":0}]]},"UpdateEvent":{"ai_tool":[[{"node":"Google Calendar MCP","type":"ai_tool","index":0}]]},"Calendar MCP":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Convert Text":{"ai_tool":[[{"node":"My Functions Server","type":"ai_tool","index":0}]]},"My Functions":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Random Jokes":{"ai_tool":[[{"node":"My Functions Server","type":"ai_tool","index":0}]]},"Simple Memory":{"ai_memory":[[{"node":"AI Agent","type":"ai_memory","index":0}]]},"Random user data":{"main":[[{"node":"Return only some fields","type":"main","index":0}]]},"Generate random user data":{"ai_tool":[[{"node":"My Functions Server","type":"ai_tool","index":0}]]},"When chat message received":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"When Executed by Another Workflow":{"main":[[{"node":"Switch","type":"main","index":0}]]}}}


name: 📊 Token Estim8r UI – Visualize Token Usage analytics Dashboard in n8n
author_name: RealSimple Solutions
author_username: joeperes
categories: []
created_at: 2025-04-12T22:53:26.571Z
updated_at: 2025-04-12T22:53:26.571Z
url: https://n8n.io/workflows/3529
scraped_at: 2025-07-06 21:16:30
description:
  📊 Visualize all your AI Token Usage analytics Dashboard using a single n8n Workflow

  Artwork Generated with ✨ ideoGener8r n8n workflow template

  Token Estim8r UI is the premium version of our token tracking solution for n8n users who want real-time insight into AI model usage and exact cost per execution — all in a beautifully designed analytics dashboard.

  We've done the work with over 4000 lines of code for you to simply add a pre-configured HTTP Request node to the end of any workflow you want to track, and Token Estim8r UI will handle the rest: collecting data, analyzing token usage, calculating model costs, and feeding everything into a clean UI with charts, graphs, and summaries.

  🖼️ What the Dashboard Looks Like

  🙋‍♂️ Who is this for?
  This workflow is perfect for:
  AI engineers
  Automation specialists
  Business analysts
  Teams using OpenAI, Anthropic, Claude, or any token-based LLM

  If you’re managing API budgets or optimizing prompt performance, this tool provides immediate visibility into where tokens (and money) are going.

  😌 What problem does this solve?
  n8n makes it easy to build powerful workflows — but it doesn’t natively track OpenAI token usage or cost. Without that visibility, it’s impossible to:
  Know what each automation is costing
  Spot inefficiencies in prompt construction
  Track cost trends over time

  Token Estim8r UI solves that with zero manual logging.

  ⚙️ What this workflow does
  Fetches detailed execution logs from n8n
  Extracts prompt/completion token usage per model/tool
  Optionally retrieves live pricing or use preset pricing as of 4/2025
  Calculates total cost per run
  Sends data to a backend for aggregation
  Displays a full-featured analytics dashboard with:
      Total tokens, cost, and usage trends
      Most used models/tools
      Workflow-model correlations
      Cost breakdowns and comparisons
      Workflow usage over time
      Auto-complete workflow search with filtering by ID or name
      Filter by date or workflow (single or all workflows)
      Built in image server
      Sortable & searchable data table of filtered results with:
          Prompt & completion token breakdown
          Cost calculations
          Workflow name + direct link to the workflow
          Link to exact execution in n8n

  🛠️ How Setup Works
  Import the Token Estim8r UI workflow into your n8n instance
  Deploy the included dashboard (React/Next.js app, hosted or self-hosted)
  Configure Google Sheets or your preferred backend (e.g., Supabase, Airtable)
  Copy the prebuilt HTTP Request node into the end of any n8n workflow
  Run your workflow — data is captured, aggregated and stored automatically in Google Sheets 🎉

  🔄 What Makes This Better than the simple version?
  The simple version logs to Google Sheets only. This premium UI version adds:
  Full analytics dashboard
  Cost aggregation across all workflows
  Graphs, filters, and model/tool comparisons

  🔧 Customization Ideas
  Switch backend to Supabase or Firebase
  Add alerts via Slack when costs exceed thresholds
  Build weekly token cost summaries
  Track model performance across teams
  Add filters by user/session/timeframe

  🧠 Why Users Love It
  "Token Estim8r UI is exactly what I needed to take control of my AI costs inside n8n. It’s plug and play — and the dashboard makes optimization easy."  
  – Beta user, AI Ops Lead

  😐 If you're serious about building with AI in n8n, 
  Token Estim8r UI gives you the visibility to scale confidently. 🚀

nodes_used:
  ["n8n-nodes-base.googleSheets","n8n-nodes-base.httpRequest","n8n-nodes-base.code","n8n-nodes-base.html"]

workflow_json:
  {"id":"0mKBxHjQ8S3Jr2GZ","meta":{"instanceId":"","templateCredsSetupCompleted":false},"name":"Token Estim8r EMPTY CODE","tags":[{"id":"n7iHVPoDy5TG4oVr","name":"utility","createdAt":"2025-01-14T14:58:44.872Z","updatedAt":"2025-01-14T14:58:44.872Z"},{"id":"pRdXyfp6n3bBMCdp","name":"AI Token Usage","createdAt":"2025-04-12T22:20:57.332Z","updatedAt":"2025-04-12T22:20:57.332Z"}],"nodes":[{"id":"43df953e-428d-4b42-b449-39d9763b8f13","name":"Get AI Usage Data","type":"n8n-nodes-base.code","position":[-180,280],"parameters":{},"typeVersion":2},{"id":"533ca2a3-6e48-4bc6-8a0c-779b4618f5b2","name":"Set Ai_Run_Data","type":"n8n-nodes-base.set","position":[100,280],"parameters":{},"typeVersion":3.4},{"id":"979f6a66-cfff-4df9-b0bd-3b7ace68149c","name":"Get Models Price and Add Summary","type":"n8n-nodes-base.code","position":[740,280],"parameters":{},"typeVersion":2},{"id":"72051d50-5715-478e-b6f6-f7678138fd9b","name":"Google Sheets","type":"n8n-nodes-base.googleSheets","position":[1040,280],"parameters":{},"typeVersion":4.5},{"id":"c582210d-671d-4be2-b26b-26a38c997671","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-1860,140],"parameters":{"content":""},"typeVersion":1},{"id":"6ee8b96f-67f7-4424-b6bb-baad3cc7004e","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[-940,1240],"parameters":{"content":""},"typeVersion":1},{"id":"1b60cb57-3b44-4c07-9390-61f19204228d","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-1860,-260],"parameters":{"content":""},"typeVersion":1},{"id":"984da037-a7dd-452f-8326-f760f6d7016a","name":"HTML","type":"n8n-nodes-base.html","position":[-460,500],"parameters":{},"typeVersion":1.2},{"id":"3afc7727-6221-4b14-bc78-5bd8318b99c3","name":"Respond to Webhook","type":"n8n-nodes-base.respondToWebhook","position":[100,500],"parameters":{},"typeVersion":1.1},{"id":"2c0c8c1c-47ca-44dc-af32-a4a569ff5361","name":"Google Sheets1","type":"n8n-nodes-base.googleSheets","position":[-740,980],"parameters":{},"typeVersion":4.5},{"id":"b5c7912a-d7e9-4db6-af46-21e2c0fb399b","name":"Respond to Webhook1","type":"n8n-nodes-base.respondToWebhook","position":[120,980],"parameters":{},"typeVersion":1.1},{"id":"98e0ea0a-2f35-43ac-b4b1-ca4d99e6ede5","name":"Wait","type":"n8n-nodes-base.wait","position":[-740,280],"webhookId":"e6282885-8216-4a5d-8324-59cb6aea03b6","parameters":{},"typeVersion":1.1},{"id":"696dc1fd-303c-4f5c-8c48-cb5ebf445574","name":"n8n - Get Execution","type":"n8n-nodes-base.httpRequest","position":[-460,280],"parameters":{},"typeVersion":4.2},{"id":"6e564cd6-0ac5-48f6-a654-9957d92e6a37","name":"Send Token Estim8r Data","type":"n8n-nodes-base.httpRequest","position":[-920,-120],"parameters":{},"typeVersion":4.2},{"id":"3b3d0967-7604-4b80-87a4-16d3347e8eeb","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-1160,-260],"parameters":{"content":""},"typeVersion":1},{"id":"e3e80a96-bdf2-4272-82f1-b60b6b1254f6","name":"Convert to File","type":"n8n-nodes-base.convertToFile","position":[-200,740],"parameters":{},"typeVersion":1.1},{"id":"b1276cd4-f138-4a6e-b992-fd9371e28f4f","name":"Respond to Webhook2","type":"n8n-nodes-base.respondToWebhook","position":[120,740],"parameters":{},"typeVersion":1.1},{"id":"4d647c17-02f1-4bb8-9462-06f2f1152008","name":"SetImageStrings","type":"n8n-nodes-base.set","position":[-740,740],"parameters":{},"typeVersion":3.4},{"id":"f74c229e-59e7-47c8-bd47-3443797270a5","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[-1080,700],"parameters":{"content":""},"typeVersion":1},{"id":"454dff82-dd9c-42ec-9956-c0e1da0c25a7","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[-1080,480],"parameters":{"content":""},"typeVersion":1},{"id":"ba26f9ec-c75b-445f-a79d-8bddab260e30","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[-1080,240],"parameters":{"content":""},"typeVersion":1},{"id":"7a8b4329-78ac-4dbc-ba0f-2a42e413b400","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","position":[-1080,940],"parameters":{"content":""},"typeVersion":1},{"id":"19be06ed-3b81-41cd-959f-7efece3b3f46","name":"SetPayload","type":"n8n-nodes-base.set","position":[-480,980],"parameters":{},"typeVersion":3.4},{"id":"515af5eb-8a3e-4abf-b20a-6d3c3e2e7e4c","name":"Aggregate Payload","type":"n8n-nodes-base.aggregate","position":[-200,980],"parameters":{},"typeVersion":1},{"id":"97202826-e46a-4630-89b0-bf61a1eeff0e","name":"Webhook Add Data","type":"n8n-nodes-base.webhook","position":[-1020,280],"webhookId":"452062fc-7b30-44c4-8e78-63bc332ae17e","parameters":{},"typeVersion":2},{"id":"fef17245-9368-4b43-8aa1-fa9309280a24","name":"Webhook UI","type":"n8n-nodes-base.webhook","position":[-1020,500],"webhookId":"96f08be0-8c13-42e4-b7de-93bf93dff601","parameters":{},"typeVersion":2},{"id":"8b68662c-d6ec-4b7d-82bf-5287ff75f353","name":"Webhook GetImage","type":"n8n-nodes-base.webhook","position":[-1020,740],"webhookId":"7e54be63-41c7-427a-9f21-7506da9394dc","parameters":{},"typeVersion":2},{"id":"8bed380b-c14c-461b-86bc-149f47e39c06","name":"GetPayload","type":"n8n-nodes-base.webhook","position":[-1020,980],"webhookId":"50a3d09e-6288-4fb2-8833-61c6c1248044","parameters":{},"typeVersion":2},{"id":"3ab90593-27b6-4786-94bb-b64bd2cf87ce","name":"Get AI Pricing - Live","type":"n8n-nodes-base.httpRequest","onError":"continueRegularOutput","position":[440,100],"parameters":{},"retryOnFail":true,"typeVersion":4.2},{"id":"82e360a2-8a83-4ea2-aa38-74535ab6bd37","name":"Get AI Pricing - 2024-04","type":"n8n-nodes-base.set","position":[440,280],"parameters":{},"typeVersion":3.4}],"active":true,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"912897a7-6710-412c-8409-6ff66315ac7a","connections":{"HTML":{"main":[[{"node":"Respond to Webhook","type":"main","index":0}]]},"Wait":{"main":[[{"node":"n8n - Get Execution","type":"main","index":0}]]},"GetPayload":{"main":[[{"node":"Google Sheets1","type":"main","index":0}]]},"SetPayload":{"main":[[{"node":"Aggregate Payload","type":"main","index":0}]]},"Webhook UI":{"main":[[{"node":"HTML","type":"main","index":0}]]},"Google Sheets1":{"main":[[{"node":"SetPayload","type":"main","index":0}]]},"Convert to File":{"main":[[{"node":"Respond to Webhook2","type":"main","index":0}]]},"Set Ai_Run_Data":{"main":[[{"node":"Get AI Pricing - 2024-04","type":"main","index":0}]]},"SetImageStrings":{"main":[[{"node":"Convert to File","type":"main","index":0}]]},"Webhook Add Data":{"main":[[{"node":"Wait","type":"main","index":0}]]},"Webhook GetImage":{"main":[[{"node":"SetImageStrings","type":"main","index":0}]]},"Aggregate Payload":{"main":[[{"node":"Respond to Webhook1","type":"main","index":0}]]},"Get AI Usage Data":{"main":[[{"node":"Set Ai_Run_Data","type":"main","index":0}]]},"n8n - Get Execution":{"main":[[{"node":"Get AI Usage Data","type":"main","index":0}]]},"Get AI Pricing - 2024-04":{"main":[[{"node":"Get Models Price and Add Summary","type":"main","index":0}]]},"Get Models Price and Add Summary":{"main":[[{"node":"Google Sheets","type":"main","index":0}]]}}}


name: Extract Trends, Auto-Generate Social Content with AI, Reddit, Google & Post
author_name: Immanuel
author_username: spectrabit
categories: []
created_at: 2025-04-15T10:37:51.062Z
updated_at: 2025-04-15T10:37:51.062Z
url: https://n8n.io/workflows/3560
scraped_at: 2025-07-06 21:16:30
description:
  Extract Trends and Auto-Generate Social Media Content with OpenAI, Reddit, and Google Trends: Approve and Post to Instagram, TikTok, and More

  Description
  What Problem Does This Solve? 🛠️
  This workflow automates trend extraction and social media content creation for businesses and marketers. It eliminates manual trend research and content generation by fetching trends, scoring them with AI, and posting tailored content to multiple platforms. Target audience: Social media managers, digital marketers, and businesses aiming to streamline content strategies.

  What Does It Do? 🌟
  Fetches trending topics from Reddit, X and Google Trends
  Scores trends for relevance using OpenAI.
  Generates content for Twitter/X, LinkedIn, Instagram and Facebook
  Posts to supported platforms 
  Stores results in Google Sheets for tracking

  Key Features 📋
  Real-time trend fetching from Reddit and Google Trends.
  AI-driven trend scoring and content generation (OpenAI).
  Automated posting to Twitter/X, LinkedIn, Instagram, and Facebook.
  Persistent storage in Google Sheets.
  Setup Instructions

  Prerequisites ⚙️
  n8n Instance**: Self-hosted or cloud n8n instance.
  API Credentials**:
    Reddit API: Client ID and secret from Reddit.
    SerpApi (Google Trends): API key from SerpApi, stored in n8n credentials 
    OpenAI API: API key with GPT model access.
    Twitter/X API: OAuth 1.0a credentials with write permissions.
    LinkedIn API: OAuth 2.0 credentials with w_organization_social scope.
    Instagram/Facebook API: Meta Developer app with posting permissions.
    Google Sheets API: Credentials from Google Cloud Console.

  Installation Steps 📦
  Import the Workflow:
     Copy the workflow JSON from the "Template Code" section below.
     Import it into n8n via "Import from File" or "Import from URL".
  Configure Credentials:
     Add API credentials in n8n’s Credentials section for Reddit, SerpApi, OpenAI, Twitter/X, LinkedIn, Instagram/Facebook, and Google Sheets.
     Assign credentials to respective nodes. For example:
       In the Fetch Google Trends node (HTTP Request), use n8n credentials for SerpApi instead of hardcoding the API key.
       Example: Set the API key in n8n credentials as SerpApiKey and reference it in the node’s query parameter: api_key={{ $credentials.SerpApiKey }}.
  Set Up Google Sheets with the following columns (exact column names are case-sensitive)
   -Timestamp | Trend | Score | BrandVoice | AudienceMood |

  Customize Nodes:
  OpenAI Nodes** (Trend Relevance Scoring, Generate Social Media Content): Update the model (e.g., gpt-4o) and prompt as needed.
  HTTP Request Nodes** (Post to Twitter/X, Post to LinkedIn, etc.): Verify URLs, authentication, and payloads.
  Brand Voice/Audience Mood**: Adjust Prepare Trend Scoring Input for your desired brand_voice (e.g., "casual") and audience_mood (e.g., "curious").
  Test the Workflow:
  Fetch Reddit Trends to Store Selected Trends- to score and store trends.
  Retrieve Latest Trends to end) to generate and post content
  Check Google Sheets for posting statuses
  How It Works

  High-Level Steps 🔍
  Fetch Trends**: Pulls trends from Reddit,X and Google Trends.
  Score Trends**: Uses OpenAI to score trends for relevance.
  Generate Content**: Creates platform-specific social media content.
  Post Content**: Posts to LinkedIn,  Facebook or X

  Detailed descriptions are available in the sticky notes within the workflow screenshot above.

  Node Names and Actions

  Trend Extraction and Scoring
  Daily Trigger Idea: Triggers the workflow daily.
  Set Default Inputs: Sets default brand_voice and inputs.
  Fetch Reddit Trends: Fetches Reddit posts.
  Extract Reddit Trends: Extracts trends from Reddit.
  Fetch Google Trends: Fetches Google Trends via SerpApi.
  Extract Google Trends2: Processes Google Trends data.
  Fetch Twitter Mentions: Fetches Twitter mentions.
  Translate Tweets to English: Translates tweets.
  Fix Tweet Translation Output: Fixes translation format.
  Detect Audience Mood: Detects audience mood.
  Fix Audience Mood Output: Fixes mood output format.
  Analyze News Sentiment: Analyzes news sentiment.
  Combine Data (Merge): Merges all data sources.
  Merge Items into Single Item: Combines data into one item.
  Combine Trends and UGC: Combines trends with UGC.
  Prepare Trend Scoring Input: Prepares data for scoring.
  Trend Relevance Scoring: Scores trends with OpenAI.
  Parse Trend Scores: Parses scoring output.
  Store Selected Trends: Stores trends in Google Sheets.

  Content Generation and Posting
  Retrieve Latest Trends: Retrieves trends from Google Sheets.
  Parse Retrieved Trends: Parses retrieved trends.
  Select Top Trends: Selects the top trend.
  Generate Social Media Content: Generates platform-specific content.
  Parse Social Media Content: Parses generated content.
  Generate Images: Generates images for posts (if applicable).
  -Handle Approvals/Rejection before Posting
  Post to Instagram: Posts to Instagram.
  Post to Facebook: Posts to Facebook.
  Post to LinkedIn: Posts to LinkedIn.

  Customization Tips

  Add Trend Sources** 📡: Include more sources (e.g., Instagram trends) by adding nodes to Combine Data (Merge).
  Change Content Tone** ✍️: Update the Generate Social Media Content prompt for a different tone (e.g., "humorous").
  Adjust Schedule** ⏰: Modify Daily Trigger Idea to run hourly or weekly.
  Automate TikTok/YouTube** 🎥: Add video generation (e.g., FFMPEG) to post TikTok and YouTube Shorts

nodes_used:
  ["n8n-nodes-base.googleSheets","n8n-nodes-base.httpRequest","n8n-nodes-base.facebookGraphApi","n8n-nodes-base.gmail","n8n-nodes-base.linkedIn","n8n-nodes-base.reddit","n8n-nodes-base.code","@n8n/n8n-nodes-langchain.openAi"]

workflow_json:
  {"id":"8g78mYHT7rYhgShb","meta":{"instanceId":"3da9aa1165fccd6e57ad278dd59febaa1dfaafc31e0e52a95d11801200f09024"},"name":"Extract Trends and Auto-Generate Social Media Content with OpenAI, Reddit, and Google Trends: Approve and Post to Instagram, TikTok, and More","tags":[],"nodes":[{"id":"556a0c9d-be45-4564-8931-89ed0f6345ec","name":"Set Default Inputs","type":"n8n-nodes-base.set","position":[240,640],"parameters":{},"typeVersion":3.4},{"id":"fd0d2a66-1a89-4d48-9e6f-ffd2ce50f8d4","name":"Fetch Twitter Trends","type":"n8n-nodes-base.httpRequest","onError":"continueRegularOutput","position":[1280,420],"parameters":{},"typeVersion":4.2},{"id":"52e6130c-9de0-44f1-ae57-a58f04969cb9","name":"Fetch Twitter Mentions","type":"n8n-nodes-base.httpRequest","onError":"continueRegularOutput","position":[400,460],"parameters":{},"typeVersion":4.2},{"id":"b52809d0-f7a8-4e0d-a188-dc678743ffb4","name":"SERP-Google Trends","type":"n8n-nodes-base.httpRequest","position":[680,860],"parameters":{},"typeVersion":4.2},{"id":"efb03844-ca36-4753-9e3e-016610a2d1ff","name":"Fetch Breaking News","type":"n8n-nodes-base.httpRequest","position":[680,620],"parameters":{},"typeVersion":4.2},{"id":"266ddb21-5061-43b4-b68e-13a1cfe56530","name":"Analyze News Sentiment","type":"@n8n/n8n-nodes-langchain.openAi","position":[1240,620],"parameters":{},"typeVersion":1.8},{"id":"86a3478d-d122-4634-adbc-65ffdca7e447","name":"Detect Audience Mood","type":"@n8n/n8n-nodes-langchain.openAi","position":[1220,280],"parameters":{},"typeVersion":1.8},{"id":"78da3e89-60e8-4a06-bd64-faf6c41dc423","name":"Translate Tweets to English","type":"@n8n/n8n-nodes-langchain.openAi","position":[560,360],"parameters":{},"typeVersion":1.8},{"id":"eb45e8e5-7191-4673-99da-4e28aa12a2d2","name":"Combine All Data","type":"n8n-nodes-base.merge","position":[2000,580],"parameters":{},"typeVersion":3.1},{"id":"916f7c4d-0495-4d73-a416-7a1e1c7f7b05","name":"Merge Items into Single Item","type":"n8n-nodes-base.code","position":[2160,380],"parameters":{},"typeVersion":2},{"id":"294ad3c2-bd20-481b-a78f-1be9bad3e5e5","name":"Fix Translated Tweets Output","type":"n8n-nodes-base.set","position":[880,360],"parameters":{},"typeVersion":3.4},{"id":"64bc2120-5ec4-43fa-93b2-997ed7d48fbf","name":"Fix Audience Mood Output","type":"n8n-nodes-base.set","position":[1560,280],"parameters":{},"typeVersion":3.4},{"id":"5426a1f7-f637-4f40-b5f9-dab4afaae45b","name":"Fix News Sentiment Output","type":"n8n-nodes-base.set","position":[1560,620],"parameters":{},"typeVersion":3.4},{"id":"bf09cb84-f2a0-404c-9613-91a982b5ac6a","name":"Trend Relevance Scoring (Wow Factor)","type":"@n8n/n8n-nodes-langchain.openAi","position":[2880,380],"parameters":{},"typeVersion":1.8},{"id":"8724453f-f3ca-4c86-bba7-0dea197b7829","name":"Extract Google Trends","type":"n8n-nodes-base.set","position":[1560,860],"parameters":{},"typeVersion":3.4},{"id":"09ce4fad-3229-4b96-9917-2a9ddc476824","name":"Extract News Headlines","type":"n8n-nodes-base.set","position":[880,620],"parameters":{},"typeVersion":3.4},{"id":"7f239d0c-f198-461d-b6f8-ba681db8bd9a","name":"Log Reddit Response","type":"n8n-nodes-base.code","position":[1080,1100],"parameters":{},"typeVersion":2},{"id":"1c03ba94-7936-4be2-a113-d1b75e24a606","name":"Posts from Reddit","type":"n8n-nodes-base.reddit","position":[680,1100],"parameters":{},"typeVersion":1},{"id":"bd8776f2-02da-4106-9b14-6a13bd318106","name":"Exctract Reddit Trends","type":"n8n-nodes-base.code","position":[1560,1100],"parameters":{},"typeVersion":2},{"id":"f0fc7d05-f7a2-4823-a4c9-54a218b6dc62","name":"Parse Trend Scores","type":"n8n-nodes-base.code","position":[3220,380],"parameters":{},"typeVersion":2},{"id":"d2d2dc15-7665-4d4c-b67d-3a789ae8fd28","name":"Generate Social Media Content","type":"@n8n/n8n-nodes-langchain.openAi","position":[2060,1100],"parameters":{},"typeVersion":1.8},{"id":"8ec35365-ad7c-45b1-a2a6-c8dd0c09fbf4","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[1900,20],"parameters":{"content":""},"typeVersion":1},{"id":"aa9c4237-e10e-4167-9be3-e154bb449258","name":"Parse Social Media Content","type":"n8n-nodes-base.code","position":[2580,1100],"parameters":{},"typeVersion":2},{"id":"23614f4c-0a4b-4d0a-871e-919475d3b90f","name":"Retrieve Latest Trend Scores","type":"n8n-nodes-base.googleSheets","position":[2720,620],"parameters":{},"typeVersion":4.5},{"id":"10feedb0-7e5a-45ee-bab4-b89d8b50c39c","name":"Parse Retrieved Trend Scores","type":"n8n-nodes-base.code","position":[3220,620],"parameters":{},"typeVersion":2},{"id":"b0f81dc6-64d7-4abf-9d21-c2d325b9c978","name":"Generate Images","type":"@n8n/n8n-nodes-langchain.openAi","position":[2740,1100],"parameters":{},"typeVersion":1.8},{"id":"834477fa-b323-43c1-84d1-47fffefcd187","name":"Store Selected Trend","type":"n8n-nodes-base.googleSheets","position":[2340,620],"parameters":{},"typeVersion":4.5},{"id":"1898dad7-ce81-447f-ad50-e200bf31bd74","name":"Extract Google Trends2","type":"n8n-nodes-base.code","position":[1080,860],"parameters":{},"typeVersion":2},{"id":"0befadcb-9640-4f12-bd28-b515579db46c","name":"If Fallback","type":"n8n-nodes-base.if","position":[860,880],"parameters":{},"typeVersion":2.2},{"id":"7f392c2b-80da-4d97-86e7-2d6a8bd4d901","name":"Daily Trigger Idea","type":"n8n-nodes-base.scheduleTrigger","position":[60,640],"parameters":{},"typeVersion":1.2},{"id":"c9437516-306a-4bca-8e40-1cdaf5a04d5c","name":"Format Headlines","type":"n8n-nodes-base.code","position":[1080,620],"parameters":{},"typeVersion":2},{"id":"0087ba95-df20-4481-991c-3a235d377a04","name":"Combine Trends and UGCc","type":"n8n-nodes-base.code","position":[2340,380],"parameters":{},"typeVersion":2},{"id":"a15e381d-75b3-41e8-a678-d9d7305a54b0","name":"Filter English Trends","type":"n8n-nodes-base.code","position":[2520,380],"parameters":{},"typeVersion":2},{"id":"a6e6a239-d0f3-4885-99dc-f1aaec6fd21c","name":"Prepare Trends Scoring Input","type":"n8n-nodes-base.code","position":[2700,380],"parameters":{},"typeVersion":2},{"id":"2bda966a-3c70-4e7b-abbe-b5e7ea906eae","name":"Select Top 5 Trends","type":"n8n-nodes-base.code","position":[2180,620],"parameters":{},"typeVersion":2},{"id":"63dd5b80-43c3-473f-87dd-1c461283a9eb","name":"Find Latest Timestamp","type":"n8n-nodes-base.code","position":[2540,620],"parameters":{},"typeVersion":2},{"id":"05d20b57-0ef9-4e5d-8666-bdbfec6e3932","name":"Extract Latest Row","type":"n8n-nodes-base.code","position":[3000,620],"parameters":{},"typeVersion":2},{"id":"092cfcdd-d4a5-4d27-b65e-26c87244d4a9","name":"Select Top Trend","type":"n8n-nodes-base.code","position":[3460,620],"parameters":{},"typeVersion":2},{"id":"5d693dcb-2c7e-410f-a716-06b9f19872c7","name":"Send Approval Email","type":"n8n-nodes-base.gmail","position":[3480,920],"webhookId":"82a85ba3-7930-4182-8cc2-1d15c1c78356","parameters":{},"typeVersion":2.1},{"id":"c5fd31c9-0be6-4ce4-9b9d-22ccb6de234e","name":"Store Social Media Content","type":"n8n-nodes-base.googleSheets","position":[3260,920],"parameters":{},"typeVersion":4.5},{"id":"fe678444-eb46-4e14-b6cc-5c39299ae97c","name":"Set Content Fields","type":"n8n-nodes-base.set","position":[3080,920],"parameters":{},"typeVersion":3.4},{"id":"1801aedf-fa5a-4493-b414-416dcaf048b6","name":"Debug Url","type":"n8n-nodes-base.code","position":[2940,1260],"parameters":{},"typeVersion":2},{"id":"33525419-c16e-4b75-a021-8af355ee9d8c","name":"Wait","type":"n8n-nodes-base.wait","position":[2900,920],"webhookId":"f84eee37-bd61-4254-b1b4-cc9cd28d6a7c","parameters":{},"typeVersion":1.1},{"id":"3a4772e4-5c77-4612-ba8f-da59356d4b8d","name":"Wait3","type":"n8n-nodes-base.wait","position":[2400,1100],"webhookId":"f84eee37-bd61-4254-b1b4-cc9cd28d6a7c","parameters":{},"typeVersion":1.1},{"id":"a76bbdd6-b069-47ff-900c-c5c57fa77b99","name":"Reddit","type":"n8n-nodes-base.reddit","position":[5040,1020],"parameters":{},"typeVersion":1},{"id":"c5985c58-00aa-4ffb-898a-0f3f554cd03e","name":"Facebook Posts","type":"n8n-nodes-base.facebookGraphApi","position":[5020,580],"parameters":{},"typeVersion":1},{"id":"ae265d3a-3809-4cf1-87c9-df9c59ecd2c5","name":"Instagram Container","type":"n8n-nodes-base.facebookGraphApi","position":[4780,420],"parameters":{},"typeVersion":1},{"id":"12a07dc6-9fb5-4df5-ab16-0fdfe29e74cc","name":"Post to Instagram","type":"n8n-nodes-base.facebookGraphApi","position":[5020,420],"parameters":{},"typeVersion":1},{"id":"b56b13f8-a880-4226-acef-3de2a192ba31","name":"Google Sheets Trigger","type":"n8n-nodes-base.googleSheetsTrigger","position":[3820,920],"parameters":{},"typeVersion":1},{"id":"c0e0fc1f-e825-4237-af87-24a24bb5371d","name":"If","type":"n8n-nodes-base.if","position":[4260,780],"parameters":{},"typeVersion":2.2},{"id":"ccde044a-975b-4720-9d04-2671b3815b06","name":"Facebook Filter","type":"n8n-nodes-base.set","position":[4580,580],"parameters":{},"typeVersion":3.4},{"id":"1519bbd1-bbff-4c23-8daa-5d25ede05117","name":"Edit Fields","type":"n8n-nodes-base.set","position":[4580,420],"parameters":{},"typeVersion":3.4},{"id":"6f8d9a71-66d8-4581-99fc-34a223c40fc4","name":"Set Reddit","type":"n8n-nodes-base.set","position":[4600,1020],"parameters":{},"typeVersion":3.4},{"id":"c0abf4ad-bb90-472a-a9cc-b4c63542b671","name":"Set LinkedIn","type":"n8n-nodes-base.set","position":[4580,800],"parameters":{},"typeVersion":3.4},{"id":"2eed5618-1301-4b44-84bf-a332efe69a61","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[3740,360],"parameters":{"content":""},"typeVersion":1},{"id":"b24b2048-6f85-4df0-b2de-1cd26412a53b","name":"Reverse Rows","type":"n8n-nodes-base.code","position":[3960,680],"parameters":{},"typeVersion":2},{"id":"816db4f4-3c93-4b5d-aa7a-9ff27da22455","name":"Handle Approval/Rejection","type":"n8n-nodes-base.webhook","position":[3900,140],"webhookId":"17af4117-195d-4526-9d48-394f740e09c5","parameters":{},"typeVersion":2},{"id":"d56be861-ea95-4d49-b523-e282b4e3f1da","name":"Get Newest Row","type":"n8n-nodes-base.code","position":[4120,580],"parameters":{},"typeVersion":2},{"id":"bf84bed9-cf4c-47aa-ac20-d85c7f6cce70","name":"LinkedIn","type":"n8n-nodes-base.linkedIn","position":[5040,800],"parameters":{},"typeVersion":1,"alwaysOutputData":true},{"id":"50a870a9-6770-48e1-97c7-ea804d72563f","name":"Social Media Content Update","type":"n8n-nodes-base.googleSheets","position":[4120,140],"parameters":{},"typeVersion":4.5},{"id":"039a63f7-58e4-4c76-9465-d4bc0e45136a","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[3740,20],"parameters":{"content":""},"typeVersion":1},{"id":"bd583a6a-67b1-4490-8f83-0366a9da52fc","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[0,0],"parameters":{"content":""},"typeVersion":1}],"active":false,"pinData":{"Combine All Data":[{"json":{"audience_mood":"The mood of the user-generated content can be characterized as \"excited.\" The use of numerous emojis, expressions of admiration, and playful interactions suggest a positive and enthusiastic atmosphere among the audience.","translated_tweets":"Here is the translated text:\n\n\"Handsome cutting cane, even when asleep, still handsome\n\nENGFA FANTASTIC ACTRESS03\n#EngfaThePeople #EngfaWaraha @EWaraha https://t.co/W0jsamX1Ts, handsome and captivating to girls\n\nENGFA FANTASTIC ACTRESS03\n#EngfaThePeople #EngfaWaraha @EWaraha https://t.co/Pa6PoArn0i, rich and handsome, a billion\n\nENGFA FANTASTIC ACTRESS03\n#EngfaThePeople #EngfaWaraha @EWaraha https://t.co/S9tGHge7F5, during the praise for handsome people, handsomely heart-stopping in the evening\n\nENGFA FANTASTIC ACTRESS03\n#EngfaThePeople #EngfaWaraha @EWaraha https://t.co/LdiPXvRfpC, it’s evening now, has Ing finished the shoot yet? Sending you strength, talented person✌🏻🤍\n\nENGFA FANTASTIC ACTRESS03 \n#EngfaThePeople #EngfaWaraha @EWaraha https://t.co/t0K92gk0H3, @fkhanhly @EWaraha Want to provoke my boyfriend\n\nENGFA FANTASTIC ACTRESS03\n#EngfaThePeople #EngfaWaraha @EWaraha https://t.co/O7zxAACo6B, working long hours today, have you finished shooting? Waiting to see you at eight, Ing🤍\n\nENGFA FANTASTIC ACTRESS03 \n#EngfaThePeople #EngfaWaraha @EWaraha https://t.co/ypyqo3EhXt, @Gnotatak @EWaraha melting away >.<\n\nENGFA FANTASTIC ACTRESS03\n#EngfaThePeople #EngfaWaraha @EWaraha, @EWaraha 555555, @Janthakorn19 @EWaraha Oh myyyyy🙈\n\nENGFA FANTASTIC ACTRESS03\n#EngfaThePeople #EngfaWaraha @EWaraha, @BcbjHdhji @EWaraha 555555, @flamingo3785 @EWaraha Okay, signing off for now until the end of the year 😁, @Kaezazaza @zombieA88 @EWaraha Hair with personality and style as she is 🧡\n\nENGFA FANTASTIC ACTRESS03\n#EngfaThePeople #EngfaWaraha @EWaraha, does Ing have rabbit teeth too? 🤏🏻🐶➡️🐰\n\nENGFA FANTASTIC ACTRESS03 \n#EngfaThePeople #EngfaWaraha @EWaraha https://t.co/VAv2HmvAJF, coming out of the bathroom looking this good is nice 🥰😘\n\nENGFA FANTASTIC ACTRESS03 \n#EngfaThePeople #EngfaWaraha @EWaraha https://t.co/aISkssIQvA, @JisooandEngfa @EWaraha +1, mom 🥰🥰\nENGFA FANTASTIC ACTRESS03 \n#EngfaThePeople #EngfaWaraha \n@EWaraha, @pnaddathxngreu1 @EWaraha so cute🫠\n\nENGFA FANTASTIC ACTRESS03 \n#EngfaThePeople #EngfaWaraha @EWaraha, @mxnkiez_ @EWaraha enjoy, please, @Murak_21 @EWaraha can we combine them? 5555\""}},{"json":{"tweets":[{"id":"1918625985311744120","url":"https://x.com/manus2bjs/status/1918625985311744120","card":null,"lang":"ar","text":"مارسيليا إبسويتش تاون القادسية\n\nڪۆد خضم مباشر\n\n▬ڪاردىال▬ ← M63","type":"tweet","place":{},"author":{"id":"426653635","url":"https://x.com/manus2bjs","name":"هلا ك&#x624;د خ&#x635;م كارد&#x64a;ال ك&#x624;بون","type":"user","canDm":false,"status":"","entities":{"url":{},"description":{"urls":[]}},"location":"sjc","userName":"manus2bjs","createdAt":"Fri Dec 02 14:26:00 +0000 2011","followers":8,"following":26,"isVerified":false,"mediaCount":0,"twitterUrl":"https://twitter.com/manus2bjs","automatedBy":null,"canMediaTag":true,"description":"","isAutomated":false,"profile_bio":{"entities":{"description":{}},"description":"que pena que você não me ama !mesmo assim ainda te amo"},"coverPicture":"https://pbs.twimg.com/profile_banners/426653635/1724931856","isTranslator":false,"statusesCount":143226,"isBlueVerified":false,"pinnedTweetIds":[],"profilePicture":"https://pbs.twimg.com/profile_images/1829122883542515712/bXhjklZw_normal.jpg","favouritesCount":0,"possiblySensitive":false,"fastFollowersCount":0,"hasCustomTimelines":true,"withheldInCountries":[],"affiliatesHighlightedLabel":{}},"source":"Twitter for iPhone","isReply":false,"entities":{},"createdAt":"Sat May 03 11:17:35 +0000 2025","likeCount":0,"viewCount":0,"quoteCount":0,"replyCount":0,"twitterUrl":"https://twitter.com/manus2bjs/status/1918625985311744120","inReplyToId":null,"quoted_tweet":null,"retweetCount":0,"bookmarkCount":0,"conversationId":"1918625985311744120","inReplyToUserId":null,"retweeted_tweet":null,"extendedEntities":{},"inReplyToUsername":null},{"id":"1918625876557885642","url":"https://x.com/anonymous_julie/status/1918625876557885642","card":null,"lang":"en","text":"@barriecassidy And thank you for calling out #Dutton lies about Manus.\n\nI hope that contiues to be used as a fine example to young journalists as a benchmark for integrity in their work. \n\nThe public deserve it.","type":"tweet","place":{},"author":{"id":"1371593989795684354","url":"https://x.com/anonymous_julie","name":"Julie Anonymous","type":"user","canDm":false,"status":"","entities":{"url":{},"description":{"urls":[]}},"location":"","userName":"anonymous_julie","createdAt":"Mon Mar 15 22:48:05 +0000 2021","followers":5155,"following":5883,"isVerified":false,"mediaCount":2769,"twitterUrl":"https://twitter.com/anonymous_julie","automatedBy":null,"canMediaTag":false,"description":"","isAutomated":false,"profile_bio":{"entities":{"description":{"hashtags":[{"text":"LNP","indices":[87,91]},{"text":"VoteLabor","indices":[148,158]}]}},"description":"Social Media correcting the lies with facts, every day - keeping the b*sta*rds honest. #LNP clueless don't deserve to govern. Let's go. Share truth #VoteLabor"},"coverPicture":"https://pbs.twimg.com/profile_banners/1371593989795684354/1707633619","isTranslator":false,"statusesCount":22471,"isBlueVerified":false,"pinnedTweetIds":["1905780243320955306"],"profilePicture":"https://pbs.twimg.com/profile_images/1371594983770259462/yjcuhxDg_normal.jpg","favouritesCount":207564,"possiblySensitive":false,"fastFollowersCount":0,"hasCustomTimelines":true,"withheldInCountries":[],"affiliatesHighlightedLabel":{}},"source":"Twitter for iPhone","isReply":true,"entities":{"hashtags":[{"text":"Dutton","indices":[45,52]}],"user_mentions":[{"name":"Barrie Cassidy","id_str":"1240407498","indices":[0,14],"screen_name":"barriecassidy"}]},"createdAt":"Sat May 03 11:17:09 +0000 2025","likeCount":1,"viewCount":4,"quoteCount":0,"replyCount":0,"twitterUrl":"https://twitter.com/anonymous_julie/status/1918625876557885642","inReplyToId":"1918616388182168029","quoted_tweet":null,"retweetCount":0,"bookmarkCount":0,"conversationId":"1918616388182168029","inReplyToUserId":"1240407498","retweeted_tweet":null,"extendedEntities":{},"inReplyToUsername":"barriecassidy"},{"id":"1918625757410086982","url":"https://x.com/battlleroyall/status/1918625757410086982","card":null,"lang":"tr","text":"@COCA1NEN0SE limonlu kurabiye yaptim turk milleti bahcesi akmax mi","type":"tweet","place":{},"author":{"id":"1779880674981253120","url":"https://x.com/battlleroyall","name":"manus baba","type":"user","canDm":false,"status":"","entities":{"url":{},"description":{"urls":[]}},"location":"balo sokak","userName":"battlleroyall","createdAt":"Mon Apr 15 14:33:48 +0000 2024","followers":142,"following":150,"isVerified":false,"mediaCount":56,"twitterUrl":"https://twitter.com/battlleroyall","automatedBy":null,"canMediaTag":false,"description":"","isAutomated":false,"profile_bio":{"entities":{"description":{}},"description":"seytanlakulaktankulaga"},"coverPicture":"https://pbs.twimg.com/profile_banners/1779880674981253120/1746211567","isTranslator":false,"statusesCount":594,"isBlueVerified":false,"pinnedTweetIds":["1823142061924552816"],"profilePicture":"https://pbs.twimg.com/profile_images/1916481558409519104/1Ql4OspR_normal.jpg","favouritesCount":11197,"possiblySensitive":false,"fastFollowersCount":0,"hasCustomTimelines":true,"withheldInCountries":[],"affiliatesHighlightedLabel":{}},"source":"Twitter for iPhone","isReply":true,"entities":{"user_mentions":[{"name":"cocaine nose","id_str":"1826619891757002752","indices":[0,12],"screen_name":"COCA1NEN0SE"}]},"createdAt":"Sat May 03 11:16:41 +0000 2025","likeCount":0,"viewCount":3,"quoteCount":0,"replyCount":1,"twitterUrl":"https://twitter.com/battlleroyall/status/1918625757410086982","inReplyToId":"1918624133102936206","quoted_tweet":null,"retweetCount":0,"bookmarkCount":0,"conversationId":"1918624133102936206","inReplyToUserId":"1826619891757002752","retweeted_tweet":null,"extendedEntities":{},"inReplyToUsername":"COCA1NEN0SE"},{"id":"1918625543706272029","url":"https://x.com/Bihari_Manus/status/1918625543706272029","card":null,"lang":"hi","text":"@ANI चुटिया होगा जो हिंदू जाएगा कश्मीर में ।","type":"tweet","place":{},"author":{"id":"1907739681846083584","url":"https://x.com/Bihari_Manus","name":"Manish Kumar","type":"user","canDm":false,"status":"","entities":{"url":{},"description":{"urls":[]}},"location":"Muzaffarpur","userName":"Bihari_Manus","createdAt":"Thu Apr 03 10:19:46 +0000 2025","followers":1,"following":13,"isVerified":false,"mediaCount":1,"twitterUrl":"https://twitter.com/Bihari_Manus","automatedBy":null,"canMediaTag":true,"description":"","isAutomated":false,"profile_bio":{"entities":{"description":{}},"description":"A proud Hindu."},"coverPicture":"https://pbs.twimg.com/profile_banners/1907739681846083584/1743675973","isTranslator":false,"statusesCount":174,"isBlueVerified":false,"pinnedTweetIds":[],"profilePicture":"https://pbs.twimg.com/profile_images/1907741117602271232/VFQXwvbO_normal.jpg","favouritesCount":702,"possiblySensitive":false,"fastFollowersCount":0,"hasCustomTimelines":true,"withheldInCountries":[],"affiliatesHighlightedLabel":{}},"source":"Twitter for iPhone","isReply":true,"entities":{"user_mentions":[{"name":"ANI","id_str":"355989081","indices":[0,4],"screen_name":"ANI"}]},"createdAt":"Sat May 03 11:15:50 +0000 2025","likeCount":0,"viewCount":0,"quoteCount":0,"replyCount":0,"twitterUrl":"https://twitter.com/Bihari_Manus/status/1918625543706272029","inReplyToId":"1918521084476838183","quoted_tweet":null,"retweetCount":0,"bookmarkCount":0,"conversationId":"1918521084476838183","inReplyToUserId":"355989081","retweeted_tweet":null,"extendedEntities":{},"inReplyToUsername":"ANI"},{"id":"1918625476517753012","url":"https://x.com/manus2bjs/status/1918625476517753012","card":null,"lang":"ar","text":"فيردر بريمن أونيون برلين جنوى\n\nڪۆد خضم مباشر\n\n▬ڪاردىال▬ ← M63","type":"tweet","place":{},"author":{"id":"426653635","url":"https://x.com/manus2bjs","name":"هلا ك&#x624;د خ&#x635;م كارد&#x64a;ال ك&#x624;بون","type":"user","canDm":false,"status":"","entities":{"url":{},"description":{"urls":[]}},"location":"sjc","userName":"manus2bjs","createdAt":"Fri Dec 02 14:26:00 +0000 2011","followers":8,"following":26,"isVerified":false,"mediaCount":0,"twitterUrl":"https://twitter.com/manus2bjs","automatedBy":null,"canMediaTag":true,"description":"","isAutomated":false,"profile_bio":{"entities":{"description":{}},"description":"que pena que você não me ama !mesmo assim ainda te amo"},"coverPicture":"https://pbs.twimg.com/profile_banners/426653635/1724931856","isTranslator":false,"statusesCount":143226,"isBlueVerified":false,"pinnedTweetIds":[],"profilePicture":"https://pbs.twimg.com/profile_images/1829122883542515712/bXhjklZw_normal.jpg","favouritesCount":0,"possiblySensitive":false,"fastFollowersCount":0,"hasCustomTimelines":true,"withheldInCountries":[],"affiliatesHighlightedLabel":{}},"source":"Twitter for iPhone","isReply":false,"entities":{},"createdAt":"Sat May 03 11:15:34 +0000 2025","likeCount":0,"viewCount":0,"quoteCount":0,"replyCount":0,"twitterUrl":"https://twitter.com/manus2bjs/status/1918625476517753012","inReplyToId":null,"quoted_tweet":null,"retweetCount":0,"bookmarkCount":0,"conversationId":"1918625476517753012","inReplyToUserId":null,"retweeted_tweet":null,"extendedEntities":{},"inReplyToUsername":null},{"id":"1918625075567173802","url":"https://x.com/iixx319797/status/1918625075567173802","card":null,"lang":"en","text":"@LionOhDay i would like to see that, but the fandom i don't think would understand that for the most part \ni would like to see a schneider that's maybe less calm and manipulative and more angry and aggressive as she just joined manus","type":"tweet","place":{},"author":{"id":"1878169764884811776","url":"https://x.com/iixx319797","name":"eden !","type":"user","canDm":true,"status":"","entities":{"url":{},"description":{"urls":[]}},"location":"14/🇺🇸","userName":"iixx319797","createdAt":"Sat Jan 11 19:59:11 +0000 2025","followers":33,"following":89,"isVerified":false,"mediaCount":190,"twitterUrl":"https://twitter.com/iixx319797","automatedBy":null,"canMediaTag":true,"description":"","isAutomated":false,"profile_bio":{"entities":{"url":{"urls":[{"url":"https://t.co/sEN8aena8X","indices":[0,23],"display_url":"msradiolver.straw.page","expanded_url":"https://msradiolver.straw.page"}]},"description":{}},"description":"honamizu ceo ! / only ms. radio yumeshipper"},"coverPicture":"https://pbs.twimg.com/profile_banners/1878169764884811776/1743474875","isTranslator":false,"statusesCount":3943,"isBlueVerified":false,"pinnedTweetIds":["1917361211974332729"],"profilePicture":"https://pbs.twimg.com/profile_images/1906900630418976768/eO8RbRGA_normal.jpg","favouritesCount":27264,"possiblySensitive":false,"fastFollowersCount":0,"hasCustomTimelines":true,"withheldInCountries":[],"affiliatesHighlightedLabel":{}},"source":"Twitter for iPhone","isReply":true,"entities":{"user_mentions":[{"name":"Lion-Oh-Day","id_str":"2448134286","indices":[0,10],"screen_name":"LionOhDay"}]},"createdAt":"Sat May 03 11:13:59 +0000 2025","likeCount":0,"viewCount":3,"quoteCount":0,"replyCount":0,"twitterUrl":"https://twitter.com/iixx319797/status/1918625075567173802","inReplyToId":"1918596295452758123","quoted_tweet":null,"retweetCount":0,"bookmarkCount":0,"conversationId":"1918444865634853096","inReplyToUserId":"2448134286","retweeted_tweet":null,"extendedEntities":{},"inReplyToUsername":"LionOhDay"},{"id":"1918624966666489869","url":"https://x.com/manus2bjs/status/1918624966666489869","card":null,"lang":"ar","text":"بولونيا فينيسيا فالنسيا ستراسبورغ أرسنال\n\nڪۆد خضم مباشر\n\n▬ڪاردىال▬ ← M63","type":"tweet","place":{},"author":{"id":"426653635","url":"https://x.com/manus2bjs","name":"هلا ك&#x624;د خ&#x635;م كارد&#x64a;ال ك&#x624;بون","type":"user","canDm":false,"status":"","entities":{"url":{},"description":{"urls":[]}},"location":"sjc","userName":"manus2bjs","createdAt":"Fri Dec 02 14:26:00 +0000 2011","followers":8,"following":26,"isVerified":false,"mediaCount":0,"twitterUrl":"https://twitter.com/manus2bjs","automatedBy":null,"canMediaTag":true,"description":"","isAutomated":false,"profile_bio":{"entities":{"description":{}},"description":"que pena que você não me ama !mesmo assim ainda te amo"},"coverPicture":"https://pbs.twimg.com/profile_banners/426653635/1724931856","isTranslator":false,"statusesCount":143226,"isBlueVerified":false,"pinnedTweetIds":[],"profilePicture":"https://pbs.twimg.com/profile_images/1829122883542515712/bXhjklZw_normal.jpg","favouritesCount":0,"possiblySensitive":false,"fastFollowersCount":0,"hasCustomTimelines":true,"withheldInCountries":[],"affiliatesHighlightedLabel":{}},"source":"Twitter for iPhone","isReply":false,"entities":{},"createdAt":"Sat May 03 11:13:33 +0000 2025","likeCount":0,"viewCount":0,"quoteCount":0,"replyCount":0,"twitterUrl":"https://twitter.com/manus2bjs/status/1918624966666489869","inReplyToId":null,"quoted_tweet":null,"retweetCount":0,"bookmarkCount":0,"conversationId":"1918624966666489869","inReplyToUserId":null,"retweeted_tweet":null,"extendedEntities":{},"inReplyToUsername":null},{"id":"1918624965076619556","url":"https://x.com/GOROman/status/1918624965076619556","card":null,"lang":"ja","text":"ワンワン https://t.co/LwXN7ud9gj","type":"tweet","place":{},"author":{"id":"7622742","url":"https://x.com/GOROman","name":"null-sensei | LLM 無職 | Manus Fellow","type":"user","canDm":true,"status":"","entities":{"url":{},"description":{"urls":[]}},"location":"元GOROman","userName":"GOROman","createdAt":"Sat Jul 21 02:29:06 +0000 2007","followers":52319,"following":12207,"isVerified":false,"mediaCount":50745,"twitterUrl":"https://twitter.com/GOROman","automatedBy":null,"canMediaTag":false,"description":"","isAutomated":false,"profile_bio":{"entities":{"url":{"urls":[{"url":"https://t.co/rjOeIGwzwV","indices":[0,23],"display_url":"x.com/GOROman/creato…","expanded_url":"https://x.com/GOROman/creator-subscriptions/subscribe"}]},"description":{"hashtags":[{"text":"LLM無職","indices":[29,35]}]}},"description":"Manus Fellow | Former meta → #LLM無職\n課金中:  Devin. ai /Manus Pro/Claude Max/ChatGPT Plus/Windsurf Pro Ultimate/GenSpark/Krea Pro/Suno Pro"},"coverPicture":"https://pbs.twimg.com/profile_banners/7622742/1746265648","isTranslator":false,"statusesCount":582115,"isBlueVerified":true,"pinnedTweetIds":["1918530949241029111"],"profilePicture":"https://pbs.twimg.com/profile_images/1916274315026436096/8hl3_nKI_normal.jpg","favouritesCount":234969,"possiblySensitive":false,"fastFollowersCount":0,"hasCustomTimelines":true,"withheldInCountries":[],"affiliatesHighlightedLabel":{}},"source":"Twitter for iPhone","isReply":false,"entities":{},"createdAt":"Sat May 03 11:13:32 +0000 2025","likeCount":0,"viewCount":264,"quoteCount":0,"replyCount":0,"twitterUrl":"https://twitter.com/GOROman/status/1918624965076619556","inReplyToId":null,"quoted_tweet":null,"retweetCount":0,"bookmarkCount":0,"conversationId":"1918624965076619556","inReplyToUserId":null,"retweeted_tweet":null,"extendedEntities":{"media":[{"url":"https://t.co/LwXN7ud9gj","type":"photo","sizes":{"large":{"h":2048,"w":1152}},"id_str":"1918624945040736256","indices":[5,28],"features":{"orig":{},"large":{}},"media_key":"3_1918624945040736256","display_url":"pic.twitter.com/LwXN7ud9gj","expanded_url":"https://twitter.com/GOROman/status/1918624965076619556/photo/1","media_results":{"id":"QXBpTWVkaWFSZXN1bHRzOgwAAQoAARqgUzjiW0AACgACGqBTPYyWkSQAAA==","result":{"id":"QXBpTWVkaWE6DAABCgABGqBTOOJbQAAKAAIaoFM9jJaRJAAA","media_key":"3_1918624945040736256","__typename":"ApiMedia"}},"original_info":{"width":2268,"height":4032,"focus_rects":[{"h":1270,"w":2268,"x":0,"y":272},{"h":2268,"w":2268,"x":0,"y":0},{"h":2586,"w":2268,"x":0,"y":0},{"h":4032,"w":2016,"x":252,"y":0},{"h":4032,"w":2268,"x":0,"y":0}]},"media_url_https":"https://pbs.twimg.com/media/GqBTOOJbQAAYha6.jpg","allow_download_status":{"allow_download":true},"ext_media_availability":{"status":"Available"}}]},"inReplyToUsername":null},{"id":"1918624712487293403","url":"https://x.com/Bihari_Manus/status/1918624712487293403","card":null,"lang":"hi","text":"@AmanChopra_ बाद में तो पूर्व मुख्यमंत्री मुल्ले जी की सटकी हुई दिख रही थी तो मौका मिला ही नहीं होगा।","type":"tweet","place":{},"author":{"id":"1907739681846083584","url":"https://x.com/Bihari_Manus","name":"Manish Kumar","type":"user","canDm":false,"status":"","entities":{"url":{},"description":{"urls":[]}},"location":"Muzaffarpur","userName":"Bihari_Manus","createdAt":"Thu Apr 03 10:19:46 +0000 2025","followers":1,"following":13,"isVerified":false,"mediaCount":1,"twitterUrl":"https://twitter.com/Bihari_Manus","automatedBy":null,"canMediaTag":true,"description":"","isAutomated":false,"profile_bio":{"entities":{"description":{}},"description":"A proud Hindu."},"coverPicture":"https://pbs.twimg.com/profile_banners/1907739681846083584/1743675973","isTranslator":false,"statusesCount":174,"isBlueVerified":false,"pinnedTweetIds":[],"profilePicture":"https://pbs.twimg.com/profile_images/1907741117602271232/VFQXwvbO_normal.jpg","favouritesCount":702,"possiblySensitive":false,"fastFollowersCount":0,"hasCustomTimelines":true,"withheldInCountries":[],"affiliatesHighlightedLabel":{}},"source":"Twitter for iPhone","isReply":true,"entities":{"user_mentions":[{"name":"Aman Chopra","id_str":"1273748948","indices":[0,12],"screen_name":"AmanChopra_"}]},"createdAt":"Sat May 03 11:12:32 +0000 2025","likeCount":0,"viewCount":1,"quoteCount":0,"replyCount":0,"twitterUrl":"https://twitter.com/Bihari_Manus/status/1918624712487293403","inReplyToId":"1918561709817815234","quoted_tweet":null,"retweetCount":0,"bookmarkCount":0,"conversationId":"1918561709817815234","inReplyToUserId":"1273748948","retweeted_tweet":null,"extendedEntities":{},"inReplyToUsername":"AmanChopra_"},{"id":"1918624592341401638","url":"https://x.com/MaxManus73/status/1918624592341401638","card":null,"lang":"en","text":"@WallStreetApes The US already has those laws.\n\nThey aren't enforced.","type":"tweet","place":{},"author":{"id":"1504515410716147719","url":"https://x.com/MaxManus73","name":"Max Manus","type":"user","canDm":false,"status":"","entities":{"url":{},"description":{"urls":[]}},"location":"","userName":"MaxManus73","createdAt":"Thu Mar 17 17:51:21 +0000 2022","followers":462,"following":341,"isVerified":false,"mediaCount":275,"twitterUrl":"https://twitter.com/MaxManus73","automatedBy":null,"canMediaTag":true,"description":"","isAutomated":false,"profile_bio":{"entities":{"description":{}},"description":"Right To Life, Property, Liberty \nNorwegian resistance fighter\nNo more Kool-Aid\nAccountability for Vaccine genocide\nand corruption\n\nLove Enemies\nFaith-Hope-Love"},"coverPicture":"","isTranslator":false,"statusesCount":30512,"isBlueVerified":false,"pinnedTweetIds":[],"profilePicture":"https://pbs.twimg.com/profile_images/1504517688655290375/NLbNDSl6_normal.jpg","favouritesCount":116,"possiblySensitive":false,"fastFollowersCount":0,"hasCustomTimelines":true,"withheldInCountries":[],"affiliatesHighlightedLabel":{}},"source":"Twitter for iPhone","isReply":true,"entities":{"user_mentions":[{"name":"Wall Street Apes","id_str":"1099579684981944320","indices":[0,15],"screen_name":"WallStreetApes"}]},"createdAt":"Sat May 03 11:12:03 +0000 2025","likeCount":0,"viewCount":4,"quoteCount":0,"replyCount":0,"twitterUrl":"https://twitter.com/MaxManus73/status/1918624592341401638","inReplyToId":"1918369743985361338","quoted_tweet":null,"retweetCount":0,"bookmarkCount":0,"conversationId":"1918369743985361338","inReplyToUserId":"1099579684981944320","retweeted_tweet":null,"extendedEntities":{},"inReplyToUsername":"WallStreetApes"},{"id":"1918624429111652741","url":"https://x.com/iixx319797/status/1918624429111652741","card":null,"lang":"en","text":"@ThFlrBsl oh i actually wrote about that once on my tumblr!! i would love for there to be a character that looks so so similar to her and there's some angst w vertin bc of that\neven better if that person is apart of manus","type":"tweet","place":{},"author":{"id":"1878169764884811776","url":"https://x.com/iixx319797","name":"eden !","type":"user","canDm":true,"status":"","entities":{"url":{},"description":{"urls":[]}},"location":"14/🇺🇸","userName":"iixx319797","createdAt":"Sat Jan 11 19:59:11 +0000 2025","followers":33,"following":89,"isVerified":false,"mediaCount":190,"twitterUrl":"https://twitter.com/iixx319797","automatedBy":null,"canMediaTag":true,"description":"","isAutomated":false,"profile_bio":{"entities":{"url":{"urls":[{"url":"https://t.co/sEN8aena8X","indices":[0,23],"display_url":"msradiolver.straw.page","expanded_url":"https://msradiolver.straw.page"}]},"description":{}},"description":"honamizu ceo ! / only ms. radio yumeshipper"},"coverPicture":"https://pbs.twimg.com/profile_banners/1878169764884811776/1743474875","isTranslator":false,"statusesCount":3943,"isBlueVerified":false,"pinnedTweetIds":["1917361211974332729"],"profilePicture":"https://pbs.twimg.com/profile_images/1906900630418976768/eO8RbRGA_normal.jpg","favouritesCount":27264,"possiblySensitive":false,"fastFollowersCount":0,"hasCustomTimelines":true,"withheldInCountries":[],"affiliatesHighlightedLabel":{}},"source":"Twitter for iPhone","isReply":true,"entities":{"user_mentions":[{"name":"Lilith","id_str":"1576507526626955264","indices":[0,9],"screen_name":"ThFlrBsl"}]},"createdAt":"Sat May 03 11:11:24 +0000 2025","likeCount":0,"viewCount":3,"quoteCount":0,"replyCount":0,"twitterUrl":"https://twitter.com/iixx319797/status/1918624429111652741","inReplyToId":"1918579074135388340","quoted_tweet":null,"retweetCount":0,"bookmarkCount":0,"conversationId":"1918444865634853096","inReplyToUserId":"1576507526626955264","retweeted_tweet":null,"extendedEntities":{},"inReplyToUsername":"ThFlrBsl"},{"id":"1918624345708273898","url":"https://x.com/manus473/status/1918624345708273898","card":null,"lang":"th","text":"@macauv4 แจกจริง","type":"tweet","place":{},"author":{"id":"1823623357482590209","url":"https://x.com/manus473","name":"tanaya meenata","type":"user","canDm":false,"status":"","entities":{"url":{},"description":{"urls":[]}},"location":"","userName":"manus473","createdAt":"Wed Aug 14 07:31:35 +0000 2024","followers":0,"following":20,"isVerified":false,"mediaCount":8,"twitterUrl":"https://twitter.com/manus473","automatedBy":null,"canMediaTag":true,"description":"","isAutomated":false,"profile_bio":{"entities":{"description":{}},"description":""},"coverPicture":"","isTranslator":false,"statusesCount":101,"isBlueVerified":false,"pinnedTweetIds":[],"profilePicture":"https://pbs.twimg.com/profile_images/1823623487849918464/b2F6toq-_normal.png","favouritesCount":54,"possiblySensitive":false,"fastFollowersCount":0,"hasCustomTimelines":true,"withheldInCountries":[],"affiliatesHighlightedLabel":{}},"source":"Twitter for iPhone","isReply":true,"entities":{"user_mentions":[{"name":"MACAU888","id_str":"1909342626731769860","indices":[0,8],"screen_name":"macauv4"}]},"createdAt":"Sat May 03 11:11:04 +0000 2025","likeCount":0,"viewCount":4,"quoteCount":0,"replyCount":0,"twitterUrl":"https://twitter.com/manus473/status/1918624345708273898","inReplyToId":"1915010842254606813","quoted_tweet":null,"retweetCount":0,"bookmarkCount":0,"conversationId":"1915010842254606813","inReplyToUserId":"1909342626731769860","retweeted_tweet":null,"extendedEntities":{},"inReplyToUsername":"macauv4"},{"id":"1918623946607350032","url":"https://x.com/manus2bjs/status/1918623946607350032","card":null,"lang":"sd","text":"لوهافر جنوى الاتفاق\n\nڪۆد خضم مباشر\n\n▬ڪاردىال▬ ← M63","type":"tweet","place":{},"author":{"id":"426653635","url":"https://x.com/manus2bjs","name":"هلا ك&#x624;د خ&#x635;م كارد&#x64a;ال ك&#x624;بون","type":"user","canDm":false,"status":"","entities":{"url":{},"description":{"urls":[]}},"location":"sjc","userName":"manus2bjs","createdAt":"Fri Dec 02 14:26:00 +0000 2011","followers":8,"following":26,"isVerified":false,"mediaCount":0,"twitterUrl":"https://twitter.com/manus2bjs","automatedBy":null,"canMediaTag":true,"description":"","isAutomated":false,"profile_bio":{"entities":{"description":{}},"description":"que pena que você não me ama !mesmo assim ainda te amo"},"coverPicture":"https://pbs.twimg.com/profile_banners/426653635/1724931856","isTranslator":false,"statusesCount":143226,"isBlueVerified":false,"pinnedTweetIds":[],"profilePicture":"https://pbs.twimg.com/profile_images/1829122883542515712/bXhjklZw_normal.jpg","favouritesCount":0,"possiblySensitive":false,"fastFollowersCount":0,"hasCustomTimelines":true,"withheldInCountries":[],"affiliatesHighlightedLabel":{}},"source":"Twitter for iPhone","isReply":false,"entities":{},"createdAt":"Sat May 03 11:09:29 +0000 2025","likeCount":0,"viewCount":1,"quoteCount":0,"replyCount":0,"twitterUrl":"https://twitter.com/manus2bjs/status/1918623946607350032","inReplyToId":null,"quoted_tweet":null,"retweetCount":0,"bookmarkCount":0,"conversationId":"1918623946607350032","inReplyToUserId":null,"retweeted_tweet":null,"extendedEntities":{},"inReplyToUsername":null}],"next_cursor":"DAADDAABCgABGqBUKxdXIHgKAAIaoFJQaxbREAAIAAIAAAACCAADAAAAAAgABAAAAAAKAAUaoFRIqoAnEAoABhqgVEiqf9jwAAA","has_next_page":true}},{"json":{"news_sentiment":"Here is the sentiment analysis of the given headlines:\n\n1. \"The Chromecast is back, but not as we know it\" - **Neutral**\n2. \"French President Macron Congratulates Clair Obscur: Expedition 33 Developer For Creating 'One of the Best-Rated Games in History'\" - **Positive**\n3. \"ICYMI: 12 Switch Games Will Receive Free Switch 2 Upgrades\" - **Positive**\n4. \"Some Nintendo Switch users impacted by error code 2206-1015 following system update\" - **Negative**\n5. \"Billions of iPhone users at risk of dangerous malware attack — newly-found flaw warning issued\" - **Negative**\n6. \"Switch 2 GameCube Controller 'Early Purchase' Goes Live Next Week (North America)\" - **Positive**\n7. \"Microsoft goes passwordless by default on new accounts\" - **Positive**\n8. \"Phishing attacks that defeat MFA are easier than ever. So what are we to do?\" - **Negative**\n9. \"Silksong is playable in a museum this September, but that probably doesn't help narrow down its release date\" - **Neutral**\n10. \"Patch Notes: Season 14 — Warcraft Rumble\" - **Neutral**\n11. \"Google's Gemini App Is Getting AI Image Editing\" - **Positive**\n12. \"Fandom Blows Up Giant Bomb\" - **Negative**\n13. \"The 2025 Aston Martin Vantage: Achingly beautiful and thrilling to drive\" - **Positive**\n14. \"The New 2025 Apple iPad Drops to the Lowest Price of the Year on Amazon (All Colors Available)\" - **Positive**\n15. \"Prime Gaming members get 22 more games in May\" - **Positive**\n16. \"Nintendo Switch 2 vs. Steam Deck: Battle of the Handhelds\" - **Neutral**\n17. \"iOS 19 multitasking upgrade sounds perfect for Apple’s foldables\" - **Positive**\n18. \"‘Borderlands 4’ Looks Fantastic After Listening To Fan Feedback\" - **Positive**\n19. \"Work advice: I can't hide one part of my appearance. Everyone at work won't let me forget it.\" - **Negative**\n20. \"Libogc Allegations Rock Wii Homebrew Community\" - **Negative**\n\nOverall sentiment: **Mixed** (combining positive, negative, and neutral sentiments)","formatted_headlines ":"The Chromecast is back, but not as we know it - The Verge, French President Macron Congratulates Clair Obscur: Expedition 33 Developer For Creating 'One of the Best-Rated Games in History' - IGN, ICYMI: 12 Switch Games Will Receive Free Switch 2 Upgrades - Nintendo Life, Some Nintendo Switch users impacted by error code 2206-1015 following system update - Nintendo Everything, Billions of iPhone users at risk of dangerous malware attack — newly-found flaw warning issued - New York Post, Switch 2 GameCube Controller 'Early Purchase' Goes Live Next Week (North America) - Nintendo Life, Microsoft goes passwordless by default on new accounts - The Verge, Phishing attacks that defeat MFA are easier than ever. So what are we to do? - Ars Technica, Silksong is playable in a museum this September, but that probably doesn't help narrow down its release date - Eurogamer, Patch Notes: Season 14 — Warcraft Rumble - Blizzard News, Google's Gemini App Is Getting AI Image Editing - Lifehacker, Fandom Blows Up Giant Bomb - Kotaku, The 2025 Aston Martin Vantage: Achingly beautiful and thrilling to drive - Ars Technica, The New 2025 Apple iPad Drops to the Lowest Price of the Year on Amazon (All Colors Available) - IGN, Prime Gaming members get 22 more games in May - Eurogamer, Nintendo Switch 2 vs. Steam Deck: Battle of the Handhelds - IGN, iOS 19 multitasking upgrade sounds perfect for Apple’s foldables - 9to5Mac, ‘Borderlands 4’ Looks Fantastic After Listening To Fan Feedback - Forbes, Work advice: I can't hide one part of my appearance. Everyone at work won't let me forget it. - Slate, Libogc Allegations Rock Wii Homebrew Community - Hackaday"}},{"json":{"link":"- \"https://trends.google.com/trends/explore?q=gta%206\"\n- \"https://trends.google.com/trends/explore?q=kentucky%20derby\"\n- \"https://trends.google.com/trends/explore?q=wwe%20releases\"\n- \"https://trends.google.com/trends/explore?q=gregg%20popovich\"\n- \"https://trends.google.com/trends/explore?q=kirk%20floribama%20shore\"\n- \"https://trends.google.com/trends/explore?q=john%20fetterman\"\n- \"https://trends.google.com/trends/explore?q=dodgers%20vs%20braves\"\n- \"https://trends.google.com/trends/explore?q=prince%20harry\"\n- \"https://trends.google.com/trends/explore?q=subway%20closing%20stores\"\n- \"https://trends.google.com/trends/explore?q=man%20city%20vs%20wolves\"\n- \"https://trends.google.com/trends/explore?q=cubs%20vs%20brewers\"\n- \"https://trends.google.com/trends/explore?q=rays%20vs%20yankees\"\n- \"https://trends.google.com/trends/explore?q=twins%20vs%20red%20sox\"\n- \"https://trends.google.com/trends/explore?q=devin%20haney%20fight\"\n- \"https://trends.google.com/trends/explore?q=diamondbacks%20vs%20phillies\"\n- \"https://trends.google.com/trends/explore?q=mets%20vs%20cardinals\"\n- \"https://trends.google.com/trends/explore?q=who%20won%20the%20ryan%20garcia%20fight\"\n- \"https://trends.google.com/trends/explore?q=mariners%20vs%20rangers\"\n- \"https://trends.google.com/trends/explore?q=dannielynn%20birkhead\"\n- \"https://trends.google.com/trends/explore?q=royals%20vs%20orioles\"\n- \"https://trends.google.com/trends/explore?q=padres%20vs%20pirates\"\n- \"https://trends.google.com/trends/explore?q=astros%20vs%20white%20sox\"\n- \"https://trends.google.com/trends/explore?q=dallas%20wings\"\n- \"https://trends.google.com/trends/explore?q=nationals%20vs%20reds\"\n- \"https://trends.google.com/trends/explore?q=australia%20election\"\n- \"https://trends.google.com/trends/explore?q=chicago%20sky\"\n- \"https://trends.google.com/trends/explore?q=trump%20pope\"\n- \"https://trends.google.com/trends/explore?q=what%20time%20is%20canelo%20fight\"\n- \"https://trends.google.com/trends/explore?q=aston%20villa%20vs%20fulham\"\n- \"https://trends.google.com/trends/explore?q=guardians%20vs%20blue%20jays\"\n- \"https://trends.google.com/trends/explore?q=banking%20outages\"\n- \"https://trends.google.com/trends/explore?q=rockets%20vs%20warriors\"\n- \"https://trends.google.com/trends/explore?q=elizabeth%20smart\"\n- \"https://trends.google.com/trends/explore?q=kimi%20antonelli\"\n- \"https://trends.google.com/trends/explore?q=jakara%20jackson\"\n- \"https://trends.google.com/trends/explore?q=dv%20lottery%202026%20results\"\n- \"https://trends.google.com/trends/explore?q=disney%2B\"\n- \"https://trends.google.com/trends/explore?q=kentucky%20oaks\"\n- \"https://trends.google.com/trends/explore?q=riley%20greene\"\n- \"https://trends.google.com/trends/explore?q=ill\"\n- \"https://trends.google.com/trends/explore?q=greiner%20of%20shark%20tank%20nyt\"\n- \"https://trends.google.com/trends/explore?q=paris%20fc\"\n- \"https://trends.google.com/trends/explore?q=king%20charles\"\n- \"https://trends.google.com/trends/explore?q=ruth%20buzzi%20death\"\n- \"https://trends.google.com/trends/explore?q=ashli%20babbitt\"\n- \"https://trends.google.com/trends/explore?q=the%20equalizer\"\n- \"https://trends.google.com/trends/explore?q=nil\"\n- \"https://trends.google.com/trends/explore?q=trump%20veterans%20day\"\n- \"https://trends.google.com/trends/explore?q=shell\"\n- \"https://trends.google.com/trends/explore?q=bobbi%20althoff\"\n- \"https://trends.google.com/trends/explore?q=wnba%20schedule\"\n- \"https://trends.google.com/trends/explore?q=cheech%20and%20chong\"\n- \"https://trends.google.com/trends/explore?q=joey%20gallo\"\n- \"https://trends.google.com/trends/explore?q=tarik%20skubal\"\n- \"https://trends.google.com/trends/explore?q=perkins%20coie\"\n- \"https://trends.google.com/trends/explore?q=steven%20adams\"\n- \"https://trends.google.com/trends/explore?q=theo%20james\"\n- \"https://trends.google.com/trends/explore?q=caitlin%20clark\"\n- \"https://trends.google.com/trends/explore?q=severe%20thunderstorm%20watch\"\n- \"https://trends.google.com/trends/explore?q=give%20send%20go\"\n- \"https://trends.google.com/trends/explore?q=jeffrey%20dean\"\n- \"https://trends.google.com/trends/explore?q=max%20fried\"\n- \"https://trends.google.com/trends/explore?q=alexis%20bellino\"\n- \"https://trends.google.com/trends/explore?q=zachary%20nehus\"\n- \"https://trends.google.com/trends/explore?q=thunderbolts%20box%20office\"\n- \"https://trends.google.com/trends/explore?q=paul%20goldschmidt\"\n- \"https://trends.google.com/trends/explore?q=tommy%20chong\"\n- \"https://trends.google.com/trends/explore?q=fred%20kerley\"\n- \"https://trends.google.com/trends/explore?q=buffalo%20bandits\"\n- \"https://trends.google.com/trends/explore?q=connor%20hellebuyck\"\n- \"https://trends.google.com/trends/explore?q=naomi%20osaka\"\n- \"https://trends.google.com/trends/explore?q=brian%20kelly\"\n- \"https://trends.google.com/trends/explore?q=milk\"\n- \"https://trends.google.com/trends/explore?q=javier%20b%C3%A1ez\"\n- \"https://trends.google.com/trends/explore?q=arkansas%20baseball\"\n- \"https://trends.google.com/trends/explore?q=nyt%20connections%20hints\"\n- \"https://trends.google.com/trends/explore?q=jets%20vs%20blues\"\n- \"https://trends.google.com/trends/explore?q=st%20louis%20blues\"\n- \"https://trends.google.com/trends/explore?q=teofimo%20lopez%20fight\"\n- \"https://trends.google.com/trends/explore?q=anthony%20rizzo\"\n- \"https://trends.google.com/trends/explore?q=brad%20keselowski\"\n- \"https://trends.google.com/trends/explore?q=severe%20thunderstorm%20warning\"\n- \"https://trends.google.com/trends/explore?q=antonio%20brown\"\n- \"https://trends.google.com/trends/explore?q=pittsburgh%20marathon%202025\"\n- \"https://trends.google.com/trends/explore?q=spartan%20college\"\n- \"https://trends.google.com/trends/explore?q=new%20zealand\"\n- \"https://trends.google.com/trends/explore?q=hulk%20hogan%20new%20look\"\n- \"https://trends.google.com/trends/explore?q=pete%20crow-armstrong\"\n- \"https://trends.google.com/trends/explore?q=nirmal%20kapoor\"\n- \"https://trends.google.com/trends/explore?q=mets%20score\"\n- \"https://trends.google.com/trends/explore?q=indy%20mini%20marathon\"\n- \"https://trends.google.com/trends/explore?q=basketball%20zero%20codes\"\n- \"https://trends.google.com/trends/explore?q=sandman%20horse\"\n- \"https://trends.google.com/trends/explore?q=aoc\"\n- \"https://trends.google.com/trends/explore?q=%EB%82%A0%EC%94%A8\"\n- \"https://trends.google.com/trends/explore?q=houston\"\n- \"https://trends.google.com/trends/explore?q=aaron%20judge%20stats\"\n- \"https://trends.google.com/trends/explore?q=dillon%20brooks\"\n- \"https://trends.google.com/trends/explore?q=aliza%20sherman\"\n- \"https://trends.google.com/trends/explore?q=gt%20vs%20srh\"\n- \"https://trends.google.com/trends/explore?q=trump%20birthday\"\n- \"https://trends.google.com/trends/explore?q=taskmaster%20marvel\"\n- \"https://trends.google.com/trends/explore?q=newark%20airport\"\n- \"https://trends.google.com/trends/explore?q=rayo%20vallecano%20-%20getafe\"\n- \"https://trends.google.com/trends/explore?q=athletics%20vs%20marlins\"\n- \"https://trends.google.com/trends/explore?q=madrid%20open%202025%20schedule\"\n- \"https://trends.google.com/trends/explore?q=draymond%20green\"\n- \"https://trends.google.com/trends/explore?q=sat\"\n- \"https://trends.google.com/trends/explore?q=travis%20kelce\"\n- \"https://trends.google.com/trends/explore?q=gsw\"\n- \"https://trends.google.com/trends/explore?q=anna%20kendrick\"\n- \"https://trends.google.com/trends/explore?q=fire\"\n- \"https://trends.google.com/trends/explore?q=weather%20atlanta\"\n- \"https://trends.google.com/trends/explore?q=la%20county%20fair%202025\"\n- \"https://trends.google.com/trends/explore?q=stephen%20curry\"\n- \"https://trends.google.com/trends/explore?q=colman%20domingo\"\n- \"https://trends.google.com/trends/explore?q=blake%20lively\"\n- \"https://trends.google.com/trends/explore?q=phil%20simms\"\n- \"https://trends.google.com/trends/explore?q=bill%20pullman\"\n- \"https://trends.google.com/trends/explore?q=germany\"\n- \"https://trends.google.com/trends/explore?q=anita%20knutson\"\n- \"https://trends.google.com/trends/explore?q=boxing%20fights%20tonight\"\n- \"https://trends.google.com/trends/explore?q=triple%20crown%20winners\"\n- \"https://trends.google.com/trends/explore?q=elden%20ring%20nightreign\"\n- \"https://trends.google.com/trends/explore?q=orlando%20weather\"\n- \"https://trends.google.com/trends/explore?q=byron%20nelson%20tournament\"\n- \"https://trends.google.com/trends/explore?q=indivisible\"\n- \"https://trends.google.com/trends/explore?q=sengun\"\n- \"https://trends.google.com/trends/explore?q=steve%20kerr\"\n- \"https://trends.google.com/trends/explore?q=tom%20homan\"\n- \"https://trends.google.com/trends/explore?q=quincy%20wilson\"\n- \"https://trends.google.com/trends/explore?q=burkina%20faso\"\n- \"https://trends.google.com/trends/explore?q=jackie%20chan\"\n- \"https://trends.google.com/trends/explore?q=dasha\"\n- \"https://trends.google.com/trends/explore?q=buddy%20hield\"\n- \"https://trends.google.com/trends/explore?q=max%20scherzer\"\n- \"https://trends.google.com/trends/explore?q=jen%20mccabe\"\n- \"https://trends.google.com/trends/explore?q=fernando%20tatis%20jr\"\n- \"https://trends.google.com/trends/explore?q=spencer%20torkelson\"\n- \"https://trends.google.com/trends/explore?q=george%20ryan\"\n- \"https://trends.google.com/trends/explore?q=fantastic%20four\"\n- \"https://trends.google.com/trends/explore?q=h5n1\"\n- \"https://trends.google.com/trends/explore?q=ana%20caldas\"\n- \"https://trends.google.com/trends/explore?q=reinier%20de%20ridder\"\n- \"https://trends.google.com/trends/explore?q=unc%20basketball\"\n- \"https://trends.google.com/trends/explore?q=kerry%20carpenter\"\n- \"https://trends.google.com/trends/explore?q=aurora%20borealis%20forecast\"\n- \"https://trends.google.com/trends/explore?q=fatal%20fury\"\n- \"https://trends.google.com/trends/explore?q=fanion\"\n- \"https://trends.google.com/trends/explore?q=black%20widow\"\n- \"https://trends.google.com/trends/explore?q=formula%201%20miami\"\n- \"https://trends.google.com/trends/explore?q=gas%20prices\"\n- \"https://trends.google.com/trends/explore?q=battlehawks\"\n- \"https://trends.google.com/trends/explore?q=jose%20ramirez\"\n- \"https://trends.google.com/trends/explore?q=amy%20schumer\"\n- \"https://trends.google.com/trends/explore?q=amen%20thompson\"\n- \"https://trends.google.com/trends/explore?q=nwsl\"\n- \"https://trends.google.com/trends/explore?q=jon%20gruden\"\n- \"https://trends.google.com/trends/explore?q=mc%20donalds\"\n- \"https://trends.google.com/trends/explore?q=alianza%20lima%20-%20cienciano\"\n- \"https://trends.google.com/trends/explore?q=jack%20draper\"\n- \"https://trends.google.com/trends/explore?q=chile\"\n- \"https://trends.google.com/trends/explore?q=xfinity%20outage\"\n- \"https://trends.google.com/trends/explore?q=manny%20pacquiao\"\n- \"https://trends.google.com/trends/explore?q=patrick%20schwarzenegger\"\n- \"https://trends.google.com/trends/explore?q=gervonta%20davis\"\n- \"https://trends.google.com/trends/explore?q=jorbit%20vivas\"\n- \"https://trends.google.com/trends/explore?q=old%20national%20bank\"\n- \"https://trends.google.com/trends/explore?q=black%20desert%20championship\"\n- \"https://trends.google.com/trends/explore?q=nyt%20crossword%20clues%20today\"\n- \"https://trends.google.com/trends/explore?q=investments\"\n- \"https://trends.google.com/trends/explore?q=giants%20game\"\n- \"https://trends.google.com/trends/explore?q=joseph%20czuba\"\n- \"https://trends.google.com/trends/explore?q=nba%20youngboy\"\n- \"https://trends.google.com/trends/explore?q=tesla%20cybertruck\"\n- \"https://trends.google.com/trends/explore?q=riley%20osborne\"\n- \"https://trends.google.com/trends/explore?q=cathie%20wood\"\n- \"https://trends.google.com/trends/explore?q=max%20kepler\"\n- \"https://trends.google.com/trends/explore?q=aaron%20holiday\"\n- \"https://trends.google.com/trends/explore?q=fsu%20baseball\"\n- \"https://trends.google.com/trends/explore?q=meta%20glasses\"\n- \"https://trends.google.com/trends/explore?q=texas%20motor%20speedway\"\n- \"https://trends.google.com/trends/explore?q=jensen%20ackles\"\n- \"https://trends.google.com/trends/explore?q=the%20handmaid's%20tale\"\n- \"https://trends.google.com/trends/explore?q=keanu%20reeves\"\n- \"https://trends.google.com/trends/explore?q=mookie%20betts\"\n- \"https://trends.google.com/trends/explore?q=strikeout\"\n- \"https://trends.google.com/trends/explore?q=steph%20curry%20stats\"\n- \"https://trends.google.com/trends/explore?q=drew%20barrymore\"\n- \"https://trends.google.com/trends/explore?q=dallas%20wings%20roster\"\n- \"https://trends.google.com/trends/explore?q=jeff%20green\"\n- \"https://trends.google.com/trends/explore?q=drlupo\"\n- \"https://trends.google.com/trends/explore?q=rosario%20movie\"\n- \"https://trends.google.com/trends/explore?q=coachella%202026\"\n- \"https://trends.google.com/trends/explore?q=hannah%20berner\"\n- \"https://trends.google.com/trends/explore?q=anna%20faris\"\n- \"https://trends.google.com/trends/explore?q=dalma%20galfi\"\n- \"https://trends.google.com/trends/explore?q=netflix%20streaming%20movies\"\n- \"https://trends.google.com/trends/explore?q=jobs%20report%20april%202025\"\n- \"https://trends.google.com/trends/explore?q=personal%20injury%20attorney\"\n- \"https://trends.google.com/trends/explore?q=turki%20alalshikh\"\n- \"https://trends.google.com/trends/explore?q=tuomas%20iisalo\"\n- \"https://trends.google.com/trends/explore?q=hunter%20greene\"\n- \"https://trends.google.com/trends/explore?q=trump%20budget\"\n- \"https://trends.google.com/trends/explore?q=omar%20sy\"\n- \"https://trends.google.com/trends/explore?q=steve%20adams\"\n- \"https://trends.google.com/trends/explore?q=the%20tv%20app\"\n- \"https://trends.google.com/trends/explore?q=grant%20holmes\"\n- \"https://trends.google.com/trends/explore?q=gujarat%20titans%20vs%20sunrisers%20hyderabad%20match%20scorecard\"\n- \"https://trends.google.com/trends/explore?q=casper%20ruud\"\n- \"https://trends.google.com/trends/explore?q=tim%20duncan\"\n- \"https://trends.google.com/trends/explore?q=kendrick%20perkins\"\n- \"https://trends.google.com/trends/explore?q=coachella\"\n- \"https://trends.google.com/trends/explore?q=tv%20app\"\n- \"https://trends.google.com/trends/explore?q=julianne%20nicholson\"\n- \"https://trends.google.com/trends/explore?q=el%20eternauta\"\n- \"https://trends.google.com/trends/explore?q=alex%20bregman\"\n- \"https://trends.google.com/trends/explore?q=mission%20impossible\"\n- \"https://trends.google.com/trends/explore?q=porto%20vs%20moreirense\"\n- \"https://trends.google.com/trends/explore?q=rivian\"\n- \"https://trends.google.com/trends/explore?q=adam%20thielen\"\n- \"https://trends.google.com/trends/explore?q=torino%20vs%20venezia\"\n- \"https://trends.google.com/trends/explore?q=kc%20current%20vs%20seattle%20reign%20fc\"\n- \"https://trends.google.com/trends/explore?q=may%20the%204th%20be%20with%20you\"\n- \"https://trends.google.com/trends/explore?q=michelle%20obama\"\n- \"https://trends.google.com/trends/explore?q=josh%20groban\"\n- \"https://trends.google.com/trends/explore?q=roman%20anthony\"\n- \"https://trends.google.com/trends/explore?q=jabari%20smith\"\n- \"https://trends.google.com/trends/explore?q=aleister%20black\"\n- \"https://trends.google.com/trends/explore?q=alan%20haller%20msu\"\n- \"https://trends.google.com/trends/explore?q=cinco%20de%20mayo%202025\"\n- \"https://trends.google.com/trends/explore?q=stream\"\n- \"https://trends.google.com/trends/explore?q=bow%20wow\"\n- \"https://trends.google.com/trends/explore?q=christina%20parcell\"\n- \"https://trends.google.com/trends/explore?q=dakota%20fanning\"\n- \"https://trends.google.com/trends/explore?q=creed%20movie\"\n- \"https://trends.google.com/trends/explore?q=dolly%20parton\"\n- \"https://trends.google.com/trends/explore?q=cubs%20score\"\n- \"https://trends.google.com/trends/explore?q=adam%20devine\"\n- \"https://trends.google.com/trends/explore?q=gwen%20stefani\"\n- \"https://trends.google.com/trends/explore?q=paige%20desorbo\"\n- \"https://trends.google.com/trends/explore?q=the%20sentry\"\n- \"https://trends.google.com/trends/explore?q=thompson%20twins%20nba\"\n- \"https://trends.google.com/trends/explore?q=cubs%20game%20today\"\n- \"https://trends.google.com/trends/explore?q=austin%20weather\"\n- \"https://trends.google.com/trends/explore?q=ben%20affleck\"\n- \"https://trends.google.com/trends/explore?q=south%20america\"\n- \"https://trends.google.com/trends/explore?q=la%20dodgers\"\n- \"https://trends.google.com/trends/explore?q=ps5%20pro\"\n- \"https://trends.google.com/trends/explore?q=ian%20schieffelin\"\n- \"https://trends.google.com/trends/explore?q=nate%20burleson\"\n- \"https://trends.google.com/trends/explore?q=jobs%20report%20today\"\n- \"https://trends.google.com/trends/explore?q=brewers%20schedule\"\n- \"https://trends.google.com/trends/explore?q=roger%20clemens\"\n- \"https://trends.google.com/trends/explore?q=silver%20alert\"\n- \"https://trends.google.com/trends/explore?q=los%20angeles\"\n- \"https://trends.google.com/trends/explore?q=harvard\"\n- \"https://trends.google.com/trends/explore?q=bkfc\"\n- \"https://trends.google.com/trends/explore?q=cory%20sandhagen\"\n- \"https://trends.google.com/trends/explore?q=syracuse%20lacrosse\"\n- \"https://trends.google.com/trends/explore?q=brayden%20schenn\"\n- \"https://trends.google.com/trends/explore?q=jon%20hamm\"\n- \"https://trends.google.com/trends/explore?q=alex%20warren\"\n- \"https://trends.google.com/trends/explore?q=luke%20schenn\"\n- \"https://trends.google.com/trends/explore?q=dillon%20gabriel%20number%202\"\n- \"https://trends.google.com/trends/explore?q=quinn%20priester\"\n- \"https://trends.google.com/trends/explore?q=gary%20payton%20ii\"\n- \"https://trends.google.com/trends/explore?q=oscar%20de%20la%20hoya\"\n- \"https://trends.google.com/trends/explore?q=happy%20gilmore%202\"\n- \"https://trends.google.com/trends/explore?q=nicolas%20cage\"\n- \"https://trends.google.com/trends/explore?q=frankie%20muniz\"\n- \"https://trends.google.com/trends/explore?q=johnny%20depp\"\n- \"https://trends.google.com/trends/explore?q=percy%20jackson\"\n- \"https://trends.google.com/trends/explore?q=jason%20momoa\"\n- \"https://trends.google.com/trends/explore?q=lizzo\"\n- \"https://trends.google.com/trends/explore?q=reed%20sheppard\"\n- \"https://trends.google.com/trends/explore?q=racing%20louisville%20vs%20houston%20dash\"\n- \"https://trends.google.com/trends/explore?q=robby%20starbuck\"\n- \"https://trends.google.com/trends/explore?q=nia%20jax\"\n- \"https://trends.google.com/trends/explore?q=nicky%20lopez\"\n- \"https://trends.google.com/trends/explore?q=james%20outman\"\n- \"https://trends.google.com/trends/explore?q=death%20becomes%20her\"\n- \"https://trends.google.com/trends/explore?q=alabama%20power\"\n- \"https://trends.google.com/trends/explore?q=ketanji%20brown%20jackson\"\n- \"https://trends.google.com/trends/explore?q=pat%20spencer\"\n- \"https://trends.google.com/trends/explore?q=chris%20flexen\"\n- \"https://trends.google.com/trends/explore?q=jo%20koy\"\n- \"https://trends.google.com/trends/explore?q=nathan%20walker\"\n- \"https://trends.google.com/trends/explore?q=dollywood\"\n- \"https://trends.google.com/trends/explore?q=mariners%20score\"\n- \"https://trends.google.com/trends/explore?q=david%20muir\"\n- \"https://trends.google.com/trends/explore?q=scarlett%20johansson\"\n- \"https://trends.google.com/trends/explore?q=rockets%20coach\"\n- \"https://trends.google.com/trends/explore?q=al%20hrabosky\"\n- \"https://trends.google.com/trends/explore?q=chevrolet\"\n- \"https://trends.google.com/trends/explore?q=robert%20horry\"\n- \"https://trends.google.com/trends/explore?q=zelina%20vega\"\n- \"https://trends.google.com/trends/explore?q=wwe%20backlash%202025\"\n- \"https://trends.google.com/trends/explore?q=henry%20cavill\"\n- \"https://trends.google.com/trends/explore?q=pittsburgh%20weather\"\n- \"https://trends.google.com/trends/explore?q=las%20vegas%20sphere\"\n- \"https://trends.google.com/trends/explore?q=f1%20tv\"\n- \"https://trends.google.com/trends/explore?q=nba%20lakers\"\n- \"https://trends.google.com/trends/explore?q=magic%20johnson\"\n- \"https://trends.google.com/trends/explore?q=senate%20epa%20rule%20air%20pollution%20rollback\"\n- \"https://trends.google.com/trends/explore?q=rory%20mcilroy\"\n- \"https://trends.google.com/trends/explore?q=baltimore%20weather\"\n- \"https://trends.google.com/trends/explore?q=juju%20watkins\"\n- \"https://trends.google.com/trends/explore?q=baseball%20games\"\n- \"https://trends.google.com/trends/explore?q=britney%20spears\"\n- \"https://trends.google.com/trends/explore?q=pltr\"\n- \"https://trends.google.com/trends/explore?q=max%20verstappen\"\n- \"https://trends.google.com/trends/explore?q=rust\"\n- \"https://trends.google.com/trends/explore?q=stl%20cardinals\"\n- \"https://trends.google.com/trends/explore?q=sai%20sudharsan\"\n- \"https://trends.google.com/trends/explore?q=ghost%20of%20yotei\"\n- \"https://trends.google.com/trends/explore?q=ryan%20garcia%20age\"\n- \"https://trends.google.com/trends/explore?q=jose%20andres\"\n- \"https://trends.google.com/trends/explore?q=tristan%20casas\"\n- \"https://trends.google.com/trends/explore?q=nashville%20weather\"\n- \"https://trends.google.com/trends/explore?q=in%20n%20out%20burger\"\n- \"https://trends.google.com/trends/explore?q=perry's%20steakhouse\"\n- \"https://trends.google.com/trends/explore?q=ryan%20seacrest\"\n- \"https://trends.google.com/trends/explore?q=yellowstone%20national%20park\"\n- \"https://trends.google.com/trends/explore?q=mets%20-%20cardenales\"\n- \"https://trends.google.com/trends/explore?q=ayesha%20curry\"\n- \"https://trends.google.com/trends/explore?q=westgate%20mall%20shooting\"\n- \"https://trends.google.com/trends/explore?q=tucker%20barnhart\"\n- \"https://trends.google.com/trends/explore?q=jasmine%20crockett\"\n- \"https://trends.google.com/trends/explore?q=swat\"\n- \"https://trends.google.com/trends/explore?q=torino%20fc\"\n- \"https://trends.google.com/trends/explore?q=palm%20springs\"\n- \"https://trends.google.com/trends/explore?q=bill%20nye\"\n- \"https://trends.google.com/trends/explore?q=nick%20cannon\"\n- \"https://trends.google.com/trends/explore?q=cal%20stevenson\"\n- \"https://trends.google.com/trends/explore?q=ben%20feldman\"\n- \"https://trends.google.com/trends/explore?q=pretty%20deadly%20wwe\"\n- \"https://trends.google.com/trends/explore?q=keanu%20carver\"\n- \"https://trends.google.com/trends/explore?q=emily%20deschanel\"\n- \"https://trends.google.com/trends/explore?q=jaire%20alexander\"\n- \"https://trends.google.com/trends/explore?q=corey%20heim\"\n- \"https://trends.google.com/trends/explore?q=billy%20gardell\"\n- \"https://trends.google.com/trends/explore?q=nice%20vs%20reims\"\n- \"https://trends.google.com/trends/explore?q=the%20miz\"\n- \"https://trends.google.com/trends/explore?q=chronicle\"\n- \"https://trends.google.com/trends/explore?q=kerry%20condon\"\n- \"https://trends.google.com/trends/explore?q=edwin%20kneedler\"\n- \"https://trends.google.com/trends/explore?q=santos%20escobar\"\n- \"https://trends.google.com/trends/explore?q=apple%20tv%20plus\"\n- \"https://trends.google.com/trends/explore?q=chelsea%20michigan\"\n- \"https://trends.google.com/trends/explore?q=kevin%20hart\"\n- \"https://trends.google.com/trends/explore?q=rocket\"\n- \"https://trends.google.com/trends/explore?q=jesus%20luzardo\"\n- \"https://trends.google.com/trends/explore?q=guadalajara%20-%20am%C3%A9rica\"\n- \"https://trends.google.com/trends/explore?q=cam%20fowler\"\n- \"https://trends.google.com/trends/explore?q=block%20stock\"\n- \"https://trends.google.com/trends/explore?q=kaitlan%20collins\"\n- \"https://trends.google.com/trends/explore?q=saudi%20arabia\"\n- \"https://trends.google.com/trends/explore?q=kraft%20mac%20and%20cheese%20necklace\"\n- \"https://trends.google.com/trends/explore?q=greenville%20sc\"\n- \"https://trends.google.com/trends/explore?q=georgia%20amoore\"\n- \"https://trends.google.com/trends/explore?q=0\"\n- \"https://trends.google.com/trends/explore?q=new%20york%20time\"\n- \"https://trends.google.com/trends/explore?q=nelson%20mandela\"\n- \"https://trends.google.com/trends/explore?q=beyond%20the%20gates\"\n- \"https://trends.google.com/trends/explore?q=nba%20hoy\"\n- \"https://trends.google.com/trends/explore?q=jason%20bateman\"\n- \"https://trends.google.com/trends/explore?q=james%20cook\"\n- \"https://trends.google.com/trends/explore?q=julio%20rodr%C3%ADguez\"\n- \"https://trends.google.com/trends/explore?q=jrue%20holiday\"\n- \"https://trends.google.com/trends/explore?q=preston%20lord\"\n- \"https://trends.google.com/trends/explore?q=%EB%82%B4%EC%9D%BC%20%EB%82%A0%EC%94%A8\"\n- \"https://trends.google.com/trends/explore?q=john%20hamm\"\n- \"https://trends.google.com/trends/explore?q=lsu%20baseball%20schedule\"\n- \"https://trends.google.com/trends/explore?q=ewan%20mcgregor\"\n- \"https://trends.google.com/trends/explore?q=livvy%20dunne\"\n- \"https://trends.google.com/trends/explore?q=bailey%20zimmerman\"\n- \"https://trends.google.com/trends/explore?q=courtney%20vandersloot\"\n- \"https://trends.google.com/trends/explore?q=bryce%20canyon\"\n- \"https://trends.google.com/trends/explore?q=eric%20comrie\"\n- \"https://trends.google.com/trends/explore?q=giants%20sf\"\n- \"https://trends.google.com/trends/explore?q=isaac%20howard\"\n- \"https://trends.google.com/trends/explore?q=hannah%20hidalgo\"\n- \"https://trends.google.com/trends/explore?q=estonia\"\n- \"https://trends.google.com/trends/explore?q=malika%20andrews\"\n- \"https://trends.google.com/trends/explore?q=ross%20dwelley\"\n- \"https://trends.google.com/trends/explore?q=john%20skipper\"\n- \"https://trends.google.com/trends/explore?q=samuel%20l%20jackson\"\n- \"https://trends.google.com/trends/explore?q=miley%20cyrus\"\n- \"https://trends.google.com/trends/explore?q=keith%20hernandez\"\n- \"https://trends.google.com/trends/explore?q=210%20freeway%20accident\"\n- \"https://trends.google.com/trends/explore?q=lupin\"\n- \"https://trends.google.com/trends/explore?q=homes%20for%20sale\"\n- \"https://trends.google.com/trends/explore?q=ben%20brown\"\n- \"https://trends.google.com/trends/explore?q=james%20earl%20jones\"\n- \"https://trends.google.com/trends/explore?q=johan%20rojas\"\n- \"https://trends.google.com/trends/explore?q=hope%20walz\"\n- \"https://trends.google.com/trends/explore?q=john%20elway%20golf%20cart\"\n- \"https://trends.google.com/trends/explore?q=andrew%20rannells\"\n- \"https://trends.google.com/trends/explore?q=jb%20smoove\"\n- \"https://trends.google.com/trends/explore?q=draftkings\"\n- \"https://trends.google.com/trends/explore?q=islamabad%20united%20vs%20peshawar%20zalmi\"\n- \"https://trends.google.com/trends/explore?q=blaine%20crim\"\n- \"https://trends.google.com/trends/explore?q=s%C3%A3o%20paulo%20vs%20fortaleza\"\n- \"https://trends.google.com/trends/explore?q=ps6\"\n- \"https://trends.google.com/trends/explore?q=nyt%20strands%20hints\"\n- \"https://trends.google.com/trends/explore?q=paul%20bissonnette\"\n- \"https://trends.google.com/trends/explore?q=tyler%20alexander\"\n- \"https://trends.google.com/trends/explore?q=fort%20lauderdale%20air%20show\"\n- \"https://trends.google.com/trends/explore?q=waco%20weather\"\n- \"https://trends.google.com/trends/explore?q=peru\"\n- \"https://trends.google.com/trends/explore?q=ghost%20of%20yotei%20collector's%20edition\"\n- \"https://trends.google.com/trends/explore?q=star%20wars%20movies\"\n- \"https://trends.google.com/trends/explore?q=jane%20fonda\"\n- \"https://trends.google.com/trends/explore?q=misty%20copeland\"\n- \"https://trends.google.com/trends/explore?q=dijonai%20carrington\"\n- \"https://trends.google.com/trends/explore?q=mike%20sullivan%20rangers\"\n- \"https://trends.google.com/trends/explore?q=mlb%20the%20show%2025\"\n- \"https://trends.google.com/trends/explore?q=tpg\"\n- \"https://trends.google.com/trends/explore?q=willem%20dafoe\"\n- \"https://trends.google.com/trends/explore?q=kenneth%20cole\"\n- \"https://trends.google.com/trends/explore?q=ventura%20high%20school\"\n- \"https://trends.google.com/trends/explore?q=merrill%20kelly\"\n- \"https://trends.google.com/trends/explore?q=kisd\"\n- \"https://trends.google.com/trends/explore?q=ryan%20o'hearn\"\n- \"https://trends.google.com/trends/explore?q=elle%20duncan\"\n- \"https://trends.google.com/trends/explore?q=jesse%20watters\"\n- \"https://trends.google.com/trends/explore?q=piper%20niven\"\n- \"https://trends.google.com/trends/explore?q=economic%20calendar\"\n- \"https://trends.google.com/trends/explore?q=martha%20maccallum\"\n- \"https://trends.google.com/trends/explore?q=harry%20potter\"\n- \"https://trends.google.com/trends/explore?q=columbia%20university\"\n- \"https://trends.google.com/trends/explore?q=john%20tortorella\"\n- \"https://trends.google.com/trends/explore?q=asts%20stock\"\n- \"https://trends.google.com/trends/explore?q=peyton%20manning\"\n- \"https://trends.google.com/trends/explore?q=fentanyl\"\n- \"https://trends.google.com/trends/explore?q=gen%20x\"\n- \"https://trends.google.com/trends/explore?q=ahtisa%20manalo\"\n- \"https://trends.google.com/trends/explore?q=venice\"\n- \"https://trends.google.com/trends/explore?q=erika%20alexander\"\n- \"https://trends.google.com/trends/explore?q=starbase%20texas\"\n- \"https://trends.google.com/trends/explore?q=sec%20softball%20standings\"\n- \"https://trends.google.com/trends/explore?q=pogo%C5%84%20szczecin%20vs%20legia%20warszawa\"\n- \"https://trends.google.com/trends/explore?q=freddie%20glenn\"\n- \"https://trends.google.com/trends/explore?q=josh%20naylor\"\n- \"https://trends.google.com/trends/explore?q=virat%20kohli\"\n- \"https://trends.google.com/trends/explore?q=ninja%20foodi%20recall\"\n- \"https://trends.google.com/trends/explore?q=six%20flags%20great%20adventure\"\n- \"https://trends.google.com/trends/explore?q=sophia%20umansky\"\n- \"https://trends.google.com/trends/explore?q=clay%20holmes\"\n- \"https://trends.google.com/trends/explore?q=omega%20block%20weather\"","google_trends":"- \"gta 6\"\n- \"kentucky derby\"\n- \"wwe releases\"\n- \"gregg popovich\"\n- \"kirk floribama shore\"\n- \"john fetterman\"\n- \"dodgers vs braves\"\n- \"prince harry\"\n- \"subway closing stores\"\n- \"man city vs wolves\"\n- \"cubs vs brewers\"\n- \"rays vs yankees\"\n- \"twins vs red sox\"\n- \"devin haney fight\"\n- \"diamondbacks vs phillies\"\n- \"mets vs cardinals\"\n- \"who won the ryan garcia fight\"\n- \"mariners vs rangers\"\n- \"dannielynn birkhead\"\n- \"royals vs orioles\"\n- \"padres vs pirates\"\n- \"astros vs white sox\"\n- \"dallas wings\"\n- \"nationals vs reds\"\n- \"australia election\"\n- \"chicago sky\"\n- \"trump pope\"\n- \"what time is canelo fight\"\n- \"aston villa vs fulham\"\n- \"guardians vs blue jays\"\n- \"banking outages\"\n- \"rockets vs warriors\"\n- \"elizabeth smart\"\n- \"kimi antonelli\"\n- \"jakara jackson\"\n- \"dv lottery 2026 results\"\n- \"disney+\"\n- \"kentucky oaks\"\n- \"riley greene\"\n- \"ill\"\n- \"greiner of shark tank nyt\"\n- \"paris fc\"\n- \"king charles\"\n- \"ruth buzzi death\"\n- \"ashli babbitt\"\n- \"the equalizer\"\n- \"nil\"\n- \"trump veterans day\"\n- \"shell\"\n- \"bobbi althoff\"\n- \"wnba schedule\"\n- \"cheech and chong\"\n- \"joey gallo\"\n- \"tarik skubal\"\n- \"perkins coie\"\n- \"steven adams\"\n- \"theo james\"\n- \"caitlin clark\"\n- \"severe thunderstorm watch\"\n- \"give send go\"\n- \"jeffrey dean\"\n- \"max fried\"\n- \"alexis bellino\"\n- \"zachary nehus\"\n- \"thunderbolts box office\"\n- \"paul goldschmidt\"\n- \"tommy chong\"\n- \"fred kerley\"\n- \"buffalo bandits\"\n- \"connor hellebuyck\"\n- \"naomi osaka\"\n- \"brian kelly\"\n- \"milk\"\n- \"javier báez\"\n- \"arkansas baseball\"\n- \"nyt connections hints\"\n- \"jets vs blues\"\n- \"st louis blues\"\n- \"teofimo lopez fight\"\n- \"anthony rizzo\"\n- \"brad keselowski\"\n- \"severe thunderstorm warning\"\n- \"antonio brown\"\n- \"pittsburgh marathon 2025\"\n- \"spartan college\"\n- \"new zealand\"\n- \"hulk hogan new look\"\n- \"pete crow-armstrong\"\n- \"nirmal kapoor\"\n- \"mets score\"\n- \"indy mini marathon\"\n- \"basketball zero codes\"\n- \"sandman horse\"\n- \"aoc\"\n- \"날씨\"\n- \"houston\"\n- \"aaron judge stats\"\n- \"dillon brooks\"\n- \"aliza sherman\"\n- \"gt vs srh\"\n- \"trump birthday\"\n- \"taskmaster marvel\"\n- \"newark airport\"\n- \"rayo vallecano - getafe\"\n- \"athletics vs marlins\"\n- \"madrid open 2025 schedule\"\n- \"draymond green\"\n- \"sat\"\n- \"travis kelce\"\n- \"gsw\"\n- \"anna kendrick\"\n- \"fire\"\n- \"weather atlanta\"\n- \"la county fair 2025\"\n- \"stephen curry\"\n- \"colman domingo\"\n- \"blake lively\"\n- \"phil simms\"\n- \"bill pullman\"\n- \"germany\"\n- \"anita knutson\"\n- \"boxing fights tonight\"\n- \"triple crown winners\"\n- \"elden ring nightreign\"\n- \"orlando weather\"\n- \"byron nelson tournament\"\n- \"indivisible\"\n- \"sengun\"\n- \"steve kerr\"\n- \"tom homan\"\n- \"quincy wilson\"\n- \"burkina faso\"\n- \"jackie chan\"\n- \"dasha\"\n- \"buddy hield\"\n- \"max scherzer\"\n- \"jen mccabe\"\n- \"fernando tatis jr\"\n- \"spencer torkelson\"\n- \"george ryan\"\n- \"fantastic four\"\n- \"h5n1\"\n- \"ana caldas\"\n- \"reinier de ridder\"\n- \"unc basketball\"\n- \"kerry carpenter\"\n- \"aurora borealis forecast\"\n- \"fatal fury\"\n- \"fanion\"\n- \"black widow\"\n- \"formula 1 miami\"\n- \"gas prices\"\n- \"battlehawks\"\n- \"jose ramirez\"\n- \"amy schumer\"\n- \"amen thompson\"\n- \"nwsl\"\n- \"jon gruden\"\n- \"mc donalds\"\n- \"alianza lima - cienciano\"\n- \"jack draper\"\n- \"chile\"\n- \"xfinity outage\"\n- \"manny pacquiao\"\n- \"patrick schwarzenegger\"\n- \"gervonta davis\"\n- \"jorbit vivas\"\n- \"old national bank\"\n- \"black desert championship\"\n- \"nyt crossword clues today\"\n- \"investments\"\n- \"giants game\"\n- \"joseph czuba\"\n- \"nba youngboy\"\n- \"tesla cybertruck\"\n- \"riley osborne\"\n- \"cathie wood\"\n- \"max kepler\"\n- \"aaron holiday\"\n- \"fsu baseball\"\n- \"meta glasses\"\n- \"texas motor speedway\"\n- \"jensen ackles\"\n- \"the handmaid's tale\"\n- \"keanu reeves\"\n- \"mookie betts\"\n- \"strikeout\"\n- \"steph curry stats\"\n- \"drew barrymore\"\n- \"dallas wings roster\"\n- \"jeff green\"\n- \"drlupo\"\n- \"rosario movie\"\n- \"coachella 2026\"\n- \"hannah berner\"\n- \"anna faris\"\n- \"dalma galfi\"\n- \"netflix streaming movies\"\n- \"jobs report april 2025\"\n- \"personal injury attorney\"\n- \"turki alalshikh\"\n- \"tuomas iisalo\"\n- \"hunter greene\"\n- \"trump budget\"\n- \"omar sy\"\n- \"steve adams\"\n- \"the tv app\"\n- \"grant holmes\"\n- \"gujarat titans vs sunrisers hyderabad match scorecard\"\n- \"casper ruud\"\n- \"tim duncan\"\n- \"kendrick perkins\"\n- \"coachella\"\n- \"tv app\"\n- \"julianne nicholson\"\n- \"el eternauta\"\n- \"alex bregman\"\n- \"mission impossible\"\n- \"porto vs moreirense\"\n- \"rivian\"\n- \"adam thielen\"\n- \"torino vs venezia\"\n- \"kc current vs seattle reign fc\"\n- \"may the 4th be with you\"\n- \"michelle obama\"\n- \"josh groban\"\n- \"roman anthony\"\n- \"jabari smith\"\n- \"aleister black\"\n- \"alan haller msu\"\n- \"cinco de mayo 2025\"\n- \"stream\"\n- \"bow wow\"\n- \"christina parcell\"\n- \"dakota fanning\"\n- \"creed movie\"\n- \"dolly parton\"\n- \"cubs score\"\n- \"adam devine\"\n- \"gwen stefani\"\n- \"paige desorbo\"\n- \"the sentry\"\n- \"thompson twins nba\"\n- \"cubs game today\"\n- \"austin weather\"\n- \"ben affleck\"\n- \"south america\"\n- \"la dodgers\"\n- \"ps5 pro\"\n- \"ian schieffelin\"\n- \"nate burleson\"\n- \"jobs report today\"\n- \"brewers schedule\"\n- \"roger clemens\"\n- \"silver alert\"\n- \"los angeles\"\n- \"harvard\"\n- \"bkfc\"\n- \"cory sandhagen\"\n- \"syracuse lacrosse\"\n- \"brayden schenn\"\n- \"jon hamm\"\n- \"alex warren\"\n- \"luke schenn\"\n- \"dillon gabriel number 2\"\n- \"quinn priester\"\n- \"gary payton ii\"\n- \"oscar de la hoya\"\n- \"happy gilmore 2\"\n- \"nicolas cage\"\n- \"frankie muniz\"\n- \"johnny depp\"\n- \"percy jackson\"\n- \"jason momoa\"\n- \"lizzo\"\n- \"reed sheppard\"\n- \"racing louisville vs houston dash\"\n- \"robby starbuck\"\n- \"nia jax\"\n- \"nicky lopez\"\n- \"james outman\"\n- \"death becomes her\"\n- \"alabama power\"\n- \"ketanji brown jackson\"\n- \"pat spencer\"\n- \"chris flexen\"\n- \"jo koy\"\n- \"nathan walker\"\n- \"dollywood\"\n- \"mariners score\"\n- \"david muir\"\n- \"scarlett johansson\"\n- \"rockets coach\"\n- \"al hrabosky\"\n- \"chevrolet\"\n- \"robert horry\"\n- \"zelina vega\"\n- \"wwe backlash 2025\"\n- \"henry cavill\"\n- \"pittsburgh weather\"\n- \"las vegas sphere\"\n- \"f1 tv\"\n- \"nba lakers\"\n- \"magic johnson\"\n- \"senate epa rule air pollution rollback\"\n- \"rory mcilroy\"\n- \"baltimore weather\"\n- \"juju watkins\"\n- \"baseball games\"\n- \"britney spears\"\n- \"pltr\"\n- \"max verstappen\"\n- \"rust\"\n- \"stl cardinals\"\n- \"sai sudharsan\"\n- \"ghost of yotei\"\n- \"ryan garcia age\"\n- \"jose andres\"\n- \"tristan casas\"\n- \"nashville weather\"\n- \"in n out burger\"\n- \"perry's steakhouse\"\n- \"ryan seacrest\"\n- \"yellowstone national park\"\n- \"mets - cardenales\"\n- \"ayesha curry\"\n- \"westgate mall shooting\"\n- \"tucker barnhart\"\n- \"jasmine crockett\"\n- \"swat\"\n- \"torino fc\"\n- \"palm springs\"\n- \"bill nye\"\n- \"nick cannon\"\n- \"cal stevenson\"\n- \"ben feldman\"\n- \"pretty deadly wwe\"\n- \"keanu carver\"\n- \"emily deschanel\"\n- \"jaire alexander\"\n- \"corey heim\"\n- \"billy gardell\"\n- \"nice vs reims\"\n- \"the miz\"\n- \"chronicle\"\n- \"kerry condon\"\n- \"edwin kneedler\"\n- \"santos escobar\"\n- \"apple tv plus\"\n- \"chelsea michigan\"\n- \"kevin hart\"\n- \"rocket\"\n- \"jesus luzardo\"\n- \"guadalajara - américa\"\n- \"cam fowler\"\n- \"block stock\"\n- \"kaitlan collins\"\n- \"saudi arabia\"\n- \"kraft mac and cheese necklace\"\n- \"greenville sc\"\n- \"georgia amoore\"\n- \"0\"\n- \"new york time\"\n- \"nelson mandela\"\n- \"beyond the gates\"\n- \"nba hoy\"\n- \"jason bateman\"\n- \"james cook\"\n- \"julio rodríguez\"\n- \"jrue holiday\"\n- \"preston lord\"\n- \"내일 날씨\"\n- \"john hamm\"\n- \"lsu baseball schedule\"\n- \"ewan mcgregor\"\n- \"livvy dunne\"\n- \"bailey zimmerman\"\n- \"courtney vandersloot\"\n- \"bryce canyon\"\n- \"eric comrie\"\n- \"giants sf\"\n- \"isaac howard\"\n- \"hannah hidalgo\"\n- \"estonia\"\n- \"malika andrews\"\n- \"ross dwelley\"\n- \"john skipper\"\n- \"samuel l jackson\"\n- \"miley cyrus\"\n- \"keith hernandez\"\n- \"210 freeway accident\"\n- \"lupin\"\n- \"homes for sale\"\n- \"ben brown\"\n- \"james earl jones\"\n- \"johan rojas\"\n- \"hope walz\"\n- \"john elway golf cart\"\n- \"andrew rannells\"\n- \"jb smoove\"\n- \"draftkings\"\n- \"islamabad united vs peshawar zalmi\"\n- \"blaine crim\"\n- \"são paulo vs fortaleza\"\n- \"ps6\"\n- \"nyt strands hints\"\n- \"paul bissonnette\"\n- \"tyler alexander\"\n- \"fort lauderdale air show\"\n- \"waco weather\"\n- \"peru\"\n- \"ghost of yotei collector's edition\"\n- \"star wars movies\"\n- \"jane fonda\"\n- \"misty copeland\"\n- \"dijonai carrington\"\n- \"mike sullivan rangers\"\n- \"mlb the show 25\"\n- \"tpg\"\n- \"willem dafoe\"\n- \"kenneth cole\"\n- \"ventura high school\"\n- \"merrill kelly\"\n- \"kisd\"\n- \"ryan o'hearn\"\n- \"elle duncan\"\n- \"jesse watters\"\n- \"piper niven\"\n- \"economic calendar\"\n- \"martha maccallum\"\n- \"harry potter\"\n- \"columbia university\"\n- \"john tortorella\"\n- \"asts stock\"\n- \"peyton manning\"\n- \"fentanyl\"\n- \"gen x\"\n- \"ahtisa manalo\"\n- \"venice\"\n- \"erika alexander\"\n- \"starbase texas\"\n- \"sec softball standings\"\n- \"pogoń szczecin vs legia warszawa\"\n- \"freddie glenn\"\n- \"josh naylor\"\n- \"virat kohli\"\n- \"ninja foodi recall\"\n- \"six flags great adventure\"\n- \"sophia umansky\"\n- \"clay holmes\"\n- \"omega block weather\"\n"}},{"json":{"reddit_trends":[{"score":5826,"title":"Trump administration asks Supreme Court to allow DOGE into Social Security systems"},{"score":36370,"title":"Tesla Sales Plummet 80.7% in Sweden"},{"score":2786,"title":"Jeff Bezos discloses plan to sell up to $4.8 billion in Amazon stock"}]}}]},"settings":{"executionOrder":"v1"},"versionId":"a5221ab1-b493-4778-ab51-e5135d38f28c","connections":{"If":{"main":[[{"node":"Edit Fields","type":"main","index":0},{"node":"Facebook Filter","type":"main","index":0},{"node":"Set LinkedIn","type":"main","index":0},{"node":"Set Reddit","type":"main","index":0}]]},"Wait":{"main":[[{"node":"Set Content Fields","type":"main","index":0}]]},"Wait3":{"main":[[{"node":"Parse Social Media Content","type":"main","index":0}]]},"Set Reddit":{"main":[[{"node":"Reddit","type":"main","index":0}]]},"Edit Fields":{"main":[[{"node":"Instagram Container","type":"main","index":0}]]},"If Fallback":{"main":[[{"node":"Extract Google Trends2","type":"main","index":0}]]},"Reverse Rows":{"main":[[{"node":"Get Newest Row","type":"main","index":0}]]},"Set LinkedIn":{"main":[[{"node":"LinkedIn","type":"main","index":0}]]},"Get Newest Row":{"main":[[{"node":"If","type":"main","index":0}]]},"Facebook Filter":{"main":[[{"node":"Facebook Posts","type":"main","index":0}]]},"Generate Images":{"main":[[{"node":"Debug Url","type":"main","index":0},{"node":"Wait","type":"main","index":0}]]},"Combine All Data":{"main":[[{"node":"Merge Items into Single Item","type":"main","index":0}]]},"Format Headlines":{"main":[[{"node":"Analyze News Sentiment","type":"main","index":0}]]},"Select Top Trend":{"main":[[{"node":"Generate Social Media Content","type":"main","index":0}]]},"Posts from Reddit":{"main":[[{"node":"Log Reddit Response","type":"main","index":0}]]},"Daily Trigger Idea":{"main":[[{"node":"Set Default Inputs","type":"main","index":0}]]},"Extract Latest Row":{"main":[[{"node":"Parse Retrieved Trend Scores","type":"main","index":0}]]},"Parse Trend Scores":{"main":[[{"node":"Select Top 5 Trends","type":"main","index":0}]]},"SERP-Google Trends":{"main":[[{"node":"If Fallback","type":"main","index":0}]]},"Set Content Fields":{"main":[[{"node":"Store Social Media Content","type":"main","index":0}]]},"Set Default Inputs":{"main":[[{"node":"Fetch Breaking News","type":"main","index":0},{"node":"Fetch Twitter Mentions","type":"main","index":0},{"node":"Fetch Twitter Trends","type":"main","index":0},{"node":"SERP-Google Trends","type":"main","index":0},{"node":"Posts from Reddit","type":"main","index":0}]]},"Fetch Breaking News":{"main":[[{"node":"Extract News Headlines","type":"main","index":0}]]},"Instagram Container":{"main":[[{"node":"Post to Instagram","type":"main","index":0}]]},"Log Reddit Response":{"main":[[{"node":"Exctract Reddit Trends","type":"main","index":0}]]},"Select Top 5 Trends":{"main":[[{"node":"Store Selected Trend","type":"main","index":0}]]},"Detect Audience Mood":{"main":[[{"node":"Fix Audience Mood Output","type":"main","index":0}]]},"Fetch Twitter Trends":{"main":[[{"node":"Combine All Data","type":"main","index":1}]]},"Store Selected Trend":{"main":[[{"node":"Find Latest Timestamp","type":"main","index":0}]]},"Extract Google Trends":{"main":[[{"node":"Combine All Data","type":"main","index":3}]]},"Filter English Trends":{"main":[[{"node":"Prepare Trends Scoring Input","type":"main","index":0}]]},"Find Latest Timestamp":{"main":[[{"node":"Retrieve Latest Trend Scores","type":"main","index":0}]]},"Google Sheets Trigger":{"main":[[{"node":"Reverse Rows","type":"main","index":0}]]},"Analyze News Sentiment":{"main":[[{"node":"Fix News Sentiment Output","type":"main","index":0}]]},"Exctract Reddit Trends":{"main":[[{"node":"Combine All Data","type":"main","index":4}]]},"Extract Google Trends2":{"main":[[{"node":"Extract Google Trends","type":"main","index":0}]]},"Extract News Headlines":{"main":[[{"node":"Format Headlines","type":"main","index":0}]]},"Fetch Twitter Mentions":{"main":[[{"node":"Translate Tweets to English","type":"main","index":0}]]},"Combine Trends and UGCc":{"main":[[{"node":"Filter English Trends","type":"main","index":0}]]},"Fix Audience Mood Output":{"main":[[{"node":"Combine All Data","type":"main","index":0}]]},"Fix News Sentiment Output":{"main":[[{"node":"Combine All Data","type":"main","index":2}]]},"Handle Approval/Rejection":{"main":[[{"node":"Social Media Content Update","type":"main","index":0}]]},"Parse Social Media Content":{"main":[[{"node":"Generate Images","type":"main","index":0}]]},"Store Social Media Content":{"main":[[{"node":"Send Approval Email","type":"main","index":0}]]},"Translate Tweets to English":{"main":[[{"node":"Fix Translated Tweets Output","type":"main","index":0}]]},"Fix Translated Tweets Output":{"main":[[{"node":"Detect Audience Mood","type":"main","index":0}]]},"Merge Items into Single Item":{"main":[[{"node":"Combine Trends and UGCc","type":"main","index":0}]]},"Parse Retrieved Trend Scores":{"main":[[{"node":"Select Top Trend","type":"main","index":0}]]},"Prepare Trends Scoring Input":{"main":[[{"node":"Trend Relevance Scoring (Wow Factor)","type":"main","index":0}]]},"Retrieve Latest Trend Scores":{"main":[[{"node":"Extract Latest Row","type":"main","index":0}]]},"Generate Social Media Content":{"main":[[{"node":"Wait3","type":"main","index":0}]]},"Trend Relevance Scoring (Wow Factor)":{"main":[[{"node":"Parse Trend Scores","type":"main","index":0}]]}}}


name: Build an AI Powered Phone Agent 📞🤖 with Retell, Google Calendar and RAG
author_name: Davide
author_username: n3witalia
categories: []
created_at: 2025-04-15T12:55:32.914Z
updated_at: 2025-04-15T12:55:32.914Z
url: https://n8n.io/workflows/3563
scraped_at: 2025-07-06 21:16:30
description:
  This Workflow simulates an AI-powered phone agent with two main functions:

  📅 Appointment Booking – It can schedule appointments directly into Google Calendar.  
  🧠 RAG-based Information Retrieval – It provides answers using a Retrieval-Augmented Generation (RAG) system. For example, it can respond to questions such as store opening hours, return policies, or product details.

  The guide also explains how to purchase a dedicated phone number (with a +1 prefix) and link it to the AI agent. This setup is cost-effective, as it uses a FREE $10 credit to operate without additional charges in the beginning.

  ✨ Advantages

  🕐 24/7 Availability** – The AI agent can answer calls and assist customers at any time.  
  🤖 Automation** – It reduces the workload on human staff by handling repetitive tasks like appointment scheduling and FAQ responses.  
  🔌 Easy Integration** – Built with n8n, it’s flexible and customizable for various platforms and tools.  
  💸 Low-cost Setup** – Using the free credit, businesses can get started without an upfront investment.

  📦 Use Cases

  🛍 E-commerce** – Answer common product questions or order inquiries.  
  🏬 Retail Stores** – Provide store hours, address info, and return policies.  
  🍽 Restaurants** – Take reservations or share menu information.  
  💼 Service Providers** – Book appointments or consultations.  
  📞 Any Local Business** – Offer phone support without needing a live operator.

  How It Works  
  This Workflow simulates an AI-powered phone agent with two primary functions:  

  Appointment Booking  
     The workflow captures call events (e.g., call_ended or call_analyzed) and extracts key details (transcript, caller info, duration, etc.).  
     Using OpenAI, it summarizes the conversation and parses structured data (e.g., names, contact info, dates).  
     For scheduling, it converts user-provided dates into Google Calendar-compatible formats and creates events automatically.  

  RAG-Based Information Retrieval  
     When a query is received (e.g., store hours, product details), the workflow retrieves relevant information from a Qdrant vector store.  
     An AI agent processes the query using the retrieved data and responds via a webhook, ensuring accurate, context-aware answers.   

  Set Up Steps  
  Prepare Qdrant Vector Store  
     Create/refresh a Qdrant collection (via HTTP requests).  
     Upload and vectorize documents (e.g., from Google Drive) using OpenAI embeddings.  

  Configure RetellAI Agent  
     Sign up for RetellAI, create an agent, and set the webhook URLs (n8n_call for call events, n8n_rag_function for RAG queries).  
     Purchase a Twilio phone number and link it to the agent.  

  n8n Workflow Setup  
     Connect OpenAI, Qdrant, Google Calendar, and Telegram nodes with credentials.  
     Customize prompts for summarization, date parsing, and RAG responses.  
     Test the workflow to ensure data flows from call events → processing → actions (e.g., calendar bookings, Telegram alerts).  

  Deploy  
     Trigger the workflow via RetellAI webhooks during calls.  
     Monitor outputs (e.g., call summaries in Telegram, calendar events).  

  Note: Replace placeholders (e.g., QDRANTURL, COLLECTION, CHAT_ID) with actual values. 

  Need help customizing?  
  Contact me for consulting and support or add me on Linkedin. 

nodes_used:
  ["n8n-nodes-base.httpRequest","n8n-nodes-base.telegram","n8n-nodes-base.googleDrive","n8n-nodes-base.googleCalendar","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.chainLlm","@n8n/n8n-nodes-langchain.embeddingsOpenAi","@n8n/n8n-nodes-langchain.lmChatOpenAi","@n8n/n8n-nodes-langchain.outputParserStructured","@n8n/n8n-nodes-langchain.textSplitterTokenSplitter","@n8n/n8n-nodes-langchain.documentDefaultDataLoader","@n8n/n8n-nodes-langchain.vectorStoreQdrant","@n8n/n8n-nodes-langchain.toolVectorStore"]

workflow_json:
  {"id":"29P4X9mTSmplnjlJ","meta":{"instanceId":"a4bfc93e975ca233ac45ed7c9227d84cf5a2329310525917adaf3312e10d5462","templateCredsSetupCompleted":true},"name":"AI Phone Agent with RetellAI","tags":[],"nodes":[{"id":"55ef0229-0c33-4821-926d-9aabf4f6c812","name":"Filter","type":"n8n-nodes-base.filter","position":[-100,120],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"or","conditions":[{"id":"cce162e9-50f7-41dc-ae45-763a53a835af","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.body.event }}","rightValue":"call_ended"},{"id":"b0cec556-f565-4ade-90c9-1cfd74ed238b","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.body.event }}","rightValue":"call_analyzed"}]}},"typeVersion":2.2},{"id":"1873c991-0ac0-40c4-b027-e48a9f2582c6","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[320,320],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"credentials":{"openAiApi":{"id":"4zwP0MSr8zkNvvV9","name":"OpenAi account"}},"typeVersion":1.2},{"id":"d05a7ec8-2b27-474b-b618-f85da8cf0780","name":"Structured Output Parser","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[640,300],"parameters":{"schemaType":"manual","inputSchema":"{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"first_name\": {\n\t\t\t\"type\": \"string\",\n            \"description\":\"\"\n\t\t},\n\t\t\"last_name\": {\n\t\t\t\"type\": \"string\",\n            \"description\":\"\"\n\t\t},\n        \"email\": {\n\t\t\t\"type\": \"string\",\n            \"description\":\"\"\n\t\t},\n        \"telephone\": {\n\t\t\t\"type\": \"string\",\n            \"description\":\"\"\n\t\t},\n        \"summary\": {\n\t\t\t\"type\": \"string\",\n            \"description\":\"\"\n\t\t},\n        \"date\": {\n\t\t\t\"type\": \"date\",\n            \"description\":\"\"\n\t\t},\n        \"date\": {\n\t\t\t\"type\": \"date\",\n            \"description\":\"\"\n\t\t},\n        \"dateTime\": {\n\t\t\t\"type\": \"date\",\n            \"description\":\"\"\n        }\n\t}\n}"},"typeVersion":1.2},{"id":"aef9edfc-ff3b-42b6-9839-562a5376135d","name":"n8n_rag_function","type":"n8n-nodes-base.webhook","position":[-360,720],"webhookId":"edb1e894-1210-4902-a34f-a014bbdad8d8","parameters":{"path":"edb1e894-1210-4902-a34f-a014bbdad8d8","options":{},"httpMethod":"POST","responseMode":"responseNode"},"typeVersion":2},{"id":"247567b1-b45c-433f-86f8-43cfe210a532","name":"Retrive Qdrant Vector Store","type":"@n8n/n8n-nodes-langchain.vectorStoreQdrant","position":[20,1140],"parameters":{"options":{},"qdrantCollection":{"__rl":true,"mode":"list","value":"scarperia","cachedResultName":"scarperia"}},"credentials":{"qdrantApi":{"id":"iyQ6MQiVaF3VMBmt","name":"QdrantApi account"}},"typeVersion":1},{"id":"c8153076-8ae2-4b34-893d-ef75233c2a74","name":"Embeddings OpenAI2","type":"@n8n/n8n-nodes-langchain.embeddingsOpenAi","position":[-20,1320],"parameters":{"options":{}},"credentials":{"openAiApi":{"id":"4zwP0MSr8zkNvvV9","name":"OpenAi account"}},"typeVersion":1.2},{"id":"0acec55e-cb6a-4220-a491-aa29eccc692a","name":"RAG","type":"@n8n/n8n-nodes-langchain.toolVectorStore","position":[180,940],"parameters":{"name":"company_data","description":"Retrive data about company knowledge from vector store"},"typeVersion":1},{"id":"b7a86b9f-1620-4fc7-973f-e6e169e4ecbe","name":"OpenAI Chat Model2","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[-20,940],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"credentials":{"openAiApi":{"id":"4zwP0MSr8zkNvvV9","name":"OpenAi account"}},"typeVersion":1.2},{"id":"64354f1c-388d-47b7-be4e-a67a6feeb0ed","name":"Respond to Webhook","type":"n8n-nodes-base.respondToWebhook","position":[620,720],"parameters":{"options":{}},"typeVersion":1.1},{"id":"baa32a03-3295-434a-afca-8f7cadece512","name":"OpenAI Chat Model1","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[340,1160],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"credentials":{"openAiApi":{"id":"4zwP0MSr8zkNvvV9","name":"OpenAi account"}},"typeVersion":1.2},{"id":"1d5c9eb2-b468-4dd2-aa77-d33924fdbb41","name":"Telegram","type":"n8n-nodes-base.telegram","position":[820,120],"webhookId":"44d73068-54dc-458b-a6fb-4b4d10ebed34","parameters":{"text":"=Call summary:\n{{ $json.output.summary }}\n\nFirst name: {{ $json.output.first_name }}\nLast name: {{ $json.output.last_name }}\nEmail: {{ $json.output.email }}\nTelephone: {{ $json.output.telephone }}\nSummary: {{ $json.output.summary }}\nDate: {{ $json.output.date }}\nDateTiem: {{ $json.output.dateTime }}","chatId":"CHAT_ID","additionalFields":{}},"credentials":{"telegramApi":{"id":"rQ5q95W7uKesMDx4","name":"Telegram account Fastewb"}},"typeVersion":1.2},{"id":"5ca696a0-b1d2-45f5-93d6-066654a0c2f6","name":"Google Calendar","type":"n8n-nodes-base.googleCalendar","position":[1860,100],"parameters":{"end":"={{ $json.output.end }}","start":"={{ $json.output.start }}","calendar":{"__rl":true,"mode":"list","value":"info@n3w.it","cachedResultName":"info@n3w.it"},"additionalFields":{"summary":"Event title","description":"Event description"}},"credentials":{"googleCalendarOAuth2Api":{"id":"8RFK3u13g2PJEGa9","name":"Google Calendar account"}},"typeVersion":1.3},{"id":"57fedd6a-94a4-4f58-8179-9fd8ae1d0006","name":"OpenAI Chat Model3","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[1340,320],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"credentials":{"openAiApi":{"id":"4zwP0MSr8zkNvvV9","name":"OpenAi account"}},"typeVersion":1.2},{"id":"f3f8a781-eb03-4e99-8512-b926249aabba","name":"Structured Output Parser1","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[1640,320],"parameters":{"schemaType":"manual","inputSchema":"{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"start\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"end\": {\n\t\t\t\"type\": \"string\"\n\t\t}\n\t}\n}"},"typeVersion":1.2},{"id":"f3c416a2-6b42-43cc-aa66-e7d146c1b325","name":"n8n_call","type":"n8n-nodes-base.webhook","position":[-340,120],"webhookId":"b352dd49-d3b3-4e0a-a781-17137f7199c8","parameters":{"path":"b352dd49-d3b3-4e0a-a781-17137f7199c8","options":{},"httpMethod":"POST"},"typeVersion":2},{"id":"2862b10c-77d7-4555-b9ec-86c9c4b9fe7b","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[1080,-1140],"parameters":{"width":1140,"height":920,"content":"# STEP 3 - RETELL AI\n\n- Register on [Retell AI](https://retellai.com) (10$ FREE credits)\n- Create an Agent an set \"Voice & Language\" and add your system prompt\n- In Webhook settings add the \"Agent Level Webhook URL\" with the n8n webhook node url called \"n8n_call\"\n- Buy a new phone number with your FREE credits by Twilio Provider and connect it to the created agent\n- Enter the previously created agency and create the flow as shown in the following image\n![image](https://i.postimg.cc/brtBkgfH/Retellai-flow.png)\n- Aggiungere 2 funzioni (una per RAG e una per il Booking) e inserire l'url apposito ricavato dai webhook di n8n \"n8n_rag_function\" e \"n8n_check_available\"\n\n"},"typeVersion":1},{"id":"98de797e-56d8-42b4-85a5-245ae7d086db","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-340,-100],"parameters":{"color":5,"width":1220,"content":"# STEP 4\nIntercept the \"end call\" event and get the full call transcript\n- Add your CHAT_ID in Telegram node"},"typeVersion":1},{"id":"ccf11ce4-3bc4-46bd-a71e-12e59d7a2504","name":"n8n_check_available","type":"n8n-nodes-base.webhook","position":[1120,100],"webhookId":"4dcd68b1-91d3-40bc-8aa6-c681126752b2","parameters":{"path":"4dcd68b1-91d3-40bc-8aa6-c681126752b2","options":{},"httpMethod":"POST","responseMode":"lastNode"},"typeVersion":2},{"id":"ddc50779-c0cf-4862-87b9-e187d1ab19a5","name":"When clicking ‘Test workflow’","type":"n8n-nodes-base.manualTrigger","position":[-400,-940],"parameters":{},"typeVersion":1},{"id":"fd6f36d4-c8b3-4643-8df9-a775d94946d9","name":"Qdrant Vector Store","type":"@n8n/n8n-nodes-langchain.vectorStoreQdrant","position":[580,-820],"parameters":{"mode":"insert","options":{},"qdrantCollection":{"__rl":true,"mode":"id","value":"="}},"credentials":{"qdrantApi":{"id":"iyQ6MQiVaF3VMBmt","name":"QdrantApi account"}},"typeVersion":1},{"id":"3c4f9805-57e7-4662-ab12-8bedc5e5a815","name":"Create collection","type":"n8n-nodes-base.httpRequest","position":[-100,-1080],"parameters":{"url":"https://QDRANTURL/collections/COLLECTION","method":"POST","options":{},"jsonBody":"{\n  \"filter\": {}\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth","headerParameters":{"parameters":[{"name":"Content-Type","value":"application/json"}]}},"credentials":{"httpHeaderAuth":{"id":"qhny6r5ql9wwotpn","name":"Qdrant API (Hetzner)"}},"typeVersion":4.2},{"id":"b5fdbd4d-0cc9-4b5c-8aa8-b7fe6fd0f3b4","name":"Refresh collection","type":"n8n-nodes-base.httpRequest","position":[-100,-820],"parameters":{"url":"https://QDRANTURL/collections/COLLECTION/points/delete","method":"POST","options":{},"jsonBody":"{\n  \"filter\": {}\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth","headerParameters":{"parameters":[{"name":"Content-Type","value":"application/json"}]}},"credentials":{"httpHeaderAuth":{"id":"qhny6r5ql9wwotpn","name":"Qdrant API (Hetzner)"}},"typeVersion":4.2},{"id":"c2f5ded2-adcb-4c50-95e6-94e54a7c2116","name":"Get folder","type":"n8n-nodes-base.googleDrive","position":[120,-820],"parameters":{"filter":{"driveId":{"__rl":true,"mode":"list","value":"My Drive","cachedResultUrl":"https://drive.google.com/drive/my-drive","cachedResultName":"My Drive"},"folderId":{"__rl":true,"mode":"id","value":"=test-whatsapp"}},"options":{},"resource":"fileFolder"},"credentials":{"googleDriveOAuth2Api":{"id":"HEy5EuZkgPZVEa9w","name":"Google Drive account (n3w.it)"}},"typeVersion":3},{"id":"640ede03-46fc-44a3-a9e8-29118036d64f","name":"Download Files","type":"n8n-nodes-base.googleDrive","position":[340,-820],"parameters":{"fileId":{"__rl":true,"mode":"id","value":"={{ $json.id }}"},"options":{"googleFileConversion":{"conversion":{"docsToFormat":"text/plain"}}},"operation":"download"},"credentials":{"googleDriveOAuth2Api":{"id":"HEy5EuZkgPZVEa9w","name":"Google Drive account (n3w.it)"}},"typeVersion":3},{"id":"ff40b36c-3092-43fc-a001-9683b0e33460","name":"Embeddings OpenAI","type":"@n8n/n8n-nodes-langchain.embeddingsOpenAi","position":[560,-620],"parameters":{"options":{}},"credentials":{"openAiApi":{"id":"4zwP0MSr8zkNvvV9","name":"OpenAi account"}},"typeVersion":1.1},{"id":"cfc6a14a-1445-4d38-8fbb-3dc3c7bfff8b","name":"Default Data Loader","type":"@n8n/n8n-nodes-langchain.documentDefaultDataLoader","position":[740,-620],"parameters":{"options":{},"dataType":"binary"},"typeVersion":1},{"id":"38a49484-82f0-4520-ba03-47edef117cd8","name":"Token Splitter","type":"@n8n/n8n-nodes-langchain.textSplitterTokenSplitter","position":[700,-460],"parameters":{"chunkSize":300,"chunkOverlap":30},"typeVersion":1},{"id":"62726443-9c09-4ee7-becb-789982bc2e9b","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[100,-1140],"parameters":{"color":6,"width":880,"height":220,"content":"# STEP 1\n\n## Create Qdrant Collection\nChange:\n- QDRANTURL\n- COLLECTION"},"typeVersion":1},{"id":"5f52d12f-6bbe-468c-b23f-356e0675b15a","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[-120,-880],"parameters":{"color":4,"width":620,"height":400,"content":"# STEP 2\n\n\n\n\n\n\n\n\n\n\n\n\n## Documents vectorization with Qdrant and Google Drive\nChange:\n- QDRANTURL\n- COLLECTION"},"typeVersion":1},{"id":"08525507-990d-43f3-b2d3-6d73bc2aed84","name":"Set call fields","type":"n8n-nodes-base.set","position":[140,120],"parameters":{"options":{},"assignments":{"assignments":[{"id":"15b079b9-e36d-4c9b-8ca4-30bf858ce75b","name":"Transcript","type":"string","value":"={{ $json.body.call.transcript }}"},{"id":"f1cbced3-bd9c-4d8f-bd81-060406ff27b0","name":"Duration (sec)","type":"string","value":"={{ $('n8n_call').item.json.body.call.call_cost.total_duration_seconds }}"},{"id":"829ee367-1f5e-4d66-9818-8a27344d7e79","name":"From","type":"string","value":"={{ $('n8n_call').item.json.body.call.from_number }}"},{"id":"38e9e856-d87d-4c23-8486-4ebbac2da595","name":"To","type":"string","value":"={{ $('n8n_call').item.json.body.call.to_number }}"},{"id":"4209d6d3-4881-4296-a1db-fff0c14addda","name":"Cost ","type":"string","value":"={{ $('n8n_call').item.json.body.call.call_cost.combined_cost }}"},{"id":"3c871d3b-95b5-493a-b3fe-3c9bf06a0d62","name":"Telephony Identifier","type":"string","value":"={{ $('n8n_call').item.json.body.call.telephony_identifier.twilio_call_sid }}"},{"id":"0a926748-8aff-4dd7-a252-516f3339210a","name":"Disconnection reason","type":"string","value":"={{ $json.body.call.disconnection_reason }}"},{"id":"9c88eafc-4370-47ad-ad98-d14767c137d0","name":"Recording url","type":"string","value":"={{ $json.body.call.recording_url }}"},{"id":"a737a3bd-c871-4273-85b8-8e423bf7c443","name":"Public log url","type":"string","value":"={{ $json.body.call.public_log_url }}"}]}},"typeVersion":3.4},{"id":"db21e42c-ff87-45ad-a228-77ce4c9c6b0c","name":"Extract key points","type":"@n8n/n8n-nodes-langchain.chainLlm","position":[400,120],"parameters":{"text":"=To: {{ $json.To }}\n\nComplete transcript:\n{{ $json.Transcript }} ","messages":{"messageValues":[{"message":"=You are a specialized AI assistant responsible for analyzing complete voice conversation transcripts. Your task is to create concise summaries that extract the essential information from these conversations.\n\nInput: You will receive the complete transcript of a voice conversation between two or more participants.\n\nTask:\n1. Analyze the entire conversation transcript carefully.\n2. Identify and extract the most important key points discussed.\n3. Create a clear, structured summary that captures the essential information.\n4. Highlight any decisions made, action items agreed upon, or critical information shared.\n5. Maintain objectivity in your summary, avoiding interpretation or judgment.\n\nOutput format:\n- Begin with a brief overview of the conversation (1-2 sentences)\n- List the key points in bullet format\n- Include a separate \"Action Items\" section if any tasks or follow-ups were mentioned\n- Keep your summary concise while ensuring all important information is captured\n\nRemember that accuracy is paramount. Focus on extracting what was explicitly stated rather than inferring unstated meanings. If something is unclear in the transcript, note it as such rather than guessing."}]},"promptType":"define","hasOutputParser":true},"typeVersion":1.6},{"id":"0c6c8765-d28f-4398-aa0e-8f65879cc740","name":"Concert start date","type":"@n8n/n8n-nodes-langchain.chainLlm","position":[1420,100],"parameters":{"text":"=Convert this date to a compatible format for Google Calendar APIs for the start date, and for the end date add 1 hour to the start date.\n\nHere is the start date:\n{{ $json.body.args.date }}","promptType":"define","hasOutputParser":true},"typeVersion":1.6},{"id":"0b33c34a-f61c-4aab-8315-600da2da3281","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[1100,-100],"parameters":{"color":5,"width":1100,"content":"# STEP 5\nIf required, create the event in the calendar\n- Enter the title and description of the event"},"typeVersion":1},{"id":"138555e5-b62b-4f59-b223-c73611e5dece","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[-360,520],"parameters":{"color":5,"width":1220,"content":"# STEP 6\nIf required retrive the informations by RAG system"},"typeVersion":1},{"id":"65d998a1-b31b-4463-be9b-0b27448f9026","name":"Retrive Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[60,720],"parameters":{"text":"={{ $json.body.args.query }}","agent":"conversationalAgent","options":{"systemMessage":"You are an AI-powered assistant for an electronics store. Answer in Italian. Your primary goal is to assist customers by providing accurate and helpful information about products, troubleshooting tips, and general support. Use the provided knowledge base (retrieved documents) to answer questions with precision and professionalism.\n\n**Guidelines**:\n1. **Product Information**:\n   - Provide detailed descriptions of products, including specifications, features, and compatibility.\n   - Highlight key selling points and differences between similar products.\n   - Mention availability, pricing, and promotions if applicable.\n\n2. **Technical Support**:\n   - Offer step-by-step troubleshooting guides for common issues.\n   - Suggest solutions for setup, installation, or configuration problems.\n   - If the issue is complex, recommend contacting the store’s support team for further assistance.\n\n3. **Customer Service**:\n   - Respond politely and professionally to all inquiries.\n   - If a question is unclear, ask for clarification to provide the best possible answer.\n   - For order-related questions (e.g., status, returns, or cancellations), guide customers on how to proceed using the store’s systems.\n\n4. **Knowledge Base Usage**:\n   - Always reference the provided knowledge base (retrieved documents) to ensure accuracy.\n   - If the knowledge base does not contain relevant information, inform the customer and suggest alternative resources or actions.\n\n5. **Tone and Style**:\n   - Use a friendly, approachable, and professional tone.\n   - Avoid technical jargon unless the customer demonstrates familiarity with the topic.\n   - Keep responses concise but informative.\n\n**Example Interactions**:\n1. **Product Inquiry**:\n   - Customer: \"What’s the difference between the XYZ Smartwatch and the ABC Smartwatch?\"\n   - AI: \"The XYZ Smartwatch features a longer battery life (up to 7 days) and built-in GPS, while the ABC Smartwatch has a brighter AMOLED display and supports wireless charging. Both are compatible with iOS and Android devices. Would you like more details on either product?\"\n\n2. **Technical Support**:\n   - Customer: \"My wireless router isn’t connecting to the internet.\"\n   - AI: \"Please try the following steps: 1) Restart your router and modem. 2) Ensure all cables are securely connected. 3) Check if the router’s LED indicators show a stable connection. If the issue persists, you may need to reset the router to factory settings. Would you like a detailed guide for resetting your router?\"\n\n3. **Customer Service**:\n   - Customer: \"How do I return a defective product?\"\n   - AI: \"To return a defective product, please visit our Returns Portal on our website and enter your order number. You’ll receive a return label and instructions. If you need further assistance, our support team is available at support@electronicsstore.com.\"\n\n**Limitations**:\n- If the question is outside the scope of the knowledge base or requires human intervention, inform the customer and provide contact details for the appropriate department.\n- Do not provide speculative or unverified information. Always rely on the knowledge base or direct the customer to official resources."},"promptType":"define"},"typeVersion":1.7},{"id":"a98a4ed7-4ebc-4d40-8aaa-70de751bc15f","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[-380,-1600],"parameters":{"color":3,"width":2580,"height":360,"content":"# Create your first AI Phone Agent\n\nBuild, test, deploy, and monitor AI phone agents. Retell is a comprehensive platform for building, testing, deploying, and monitoring reliable AI phone agents.\nConversation flow agent allows you to create multiple nodes to handle different scenarios in the conversation. It provides more fine-grained control over the conversation flow compared to single / multi prompt agent, which unlocks the ability to handle more complex scenarios.\n\nThis Workflow simulates an AI-powered phone agent with two main functions:\n\n📅 Appointment Booking – It can schedule appointments directly into Google Calendar.\n\n🧠 RAG-based Information Retrieval – It provides answers using a Retrieval-Augmented Generation (RAG) system. For example, it can respond to questions such as store opening hours, return policies, or product details.\n\nThe guide also explains how to purchase a dedicated phone number (with a +1 prefix) and link it to the AI agent. This setup is cost-effective, as it uses a free $10 credit to operate without additional charges in the beginning."},"typeVersion":1}],"active":true,"pinData":{},"settings":{"timezone":"Europe/Rome","callerPolicy":"workflowsFromSameOwner","executionOrder":"v1"},"versionId":"d78ac941-900b-49f5-a9a8-158effbd2479","connections":{"RAG":{"ai_tool":[[{"node":"Retrive Agent","type":"ai_tool","index":0}]]},"Filter":{"main":[[{"node":"Set call fields","type":"main","index":0}]]},"n8n_call":{"main":[[{"node":"Filter","type":"main","index":0}]]},"Get folder":{"main":[[{"node":"Download Files","type":"main","index":0}]]},"Retrive Agent":{"main":[[{"node":"Respond to Webhook","type":"main","index":0}]]},"Download Files":{"main":[[{"node":"Qdrant Vector Store","type":"main","index":0}]]},"Token Splitter":{"ai_textSplitter":[[{"node":"Default Data Loader","type":"ai_textSplitter","index":0}]]},"Google Calendar":{"main":[[]]},"Set call fields":{"main":[[{"node":"Extract key points","type":"main","index":0}]]},"n8n_rag_function":{"main":[[{"node":"Retrive Agent","type":"main","index":0}]]},"Embeddings OpenAI":{"ai_embedding":[[{"node":"Qdrant Vector Store","type":"ai_embedding","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"Extract key points","type":"ai_languageModel","index":0}]]},"Concert start date":{"main":[[{"node":"Google Calendar","type":"main","index":0}]]},"Embeddings OpenAI2":{"ai_embedding":[[{"node":"Retrive Qdrant Vector Store","type":"ai_embedding","index":0}]]},"Extract key points":{"main":[[{"node":"Telegram","type":"main","index":0}]]},"OpenAI Chat Model1":{"ai_languageModel":[[{"node":"RAG","type":"ai_languageModel","index":0}]]},"OpenAI Chat Model2":{"ai_languageModel":[[{"node":"Retrive Agent","type":"ai_languageModel","index":0}]]},"OpenAI Chat Model3":{"ai_languageModel":[[{"node":"Concert start date","type":"ai_languageModel","index":0}]]},"Refresh collection":{"main":[[{"node":"Get folder","type":"main","index":0}]]},"Default Data Loader":{"ai_document":[[{"node":"Qdrant Vector Store","type":"ai_document","index":0}]]},"n8n_check_available":{"main":[[{"node":"Concert start date","type":"main","index":0}]]},"Structured Output Parser":{"ai_outputParser":[[{"node":"Extract key points","type":"ai_outputParser","index":0}]]},"Structured Output Parser1":{"ai_outputParser":[[{"node":"Concert start date","type":"ai_outputParser","index":0}]]},"Retrive Qdrant Vector Store":{"ai_vectorStore":[[{"node":"RAG","type":"ai_vectorStore","index":0}]]},"When clicking ‘Test workflow’":{"main":[[{"node":"Create collection","type":"main","index":0},{"node":"Refresh collection","type":"main","index":0}]]}}}


name: Scrape LinkedIn Job Listings for Hiring Signals & Prospecting with Bright Data
author_name: Yaron Been
author_username: yaron-nofluff
nodes_used: ["n8n-nodes-base.googleSheets","n8n-nodes-base.httpRequest","n8n-nodes-base.code"]
categories: []
created_at: 2025-04-16T18:34:57.146Z
updated_at: 2025-04-16T18:34:57.146Z
url: https://n8n.io/workflows/3580
scraped_at: 2025-07-06 21:16:30
description:
  LinkedIn Hiring Signal Scraper — Jobs & Prospecting Using Bright Data

  Purpose:
  Discover recent job posts from LinkedIn using Bright Data's Dataset API, clean the results, and log them into Google Sheets — for both job hunting and identifying high-intent B2B leads based on hiring activity.

  Use Cases:
  Job Seekers** – Spot relevant openings filtered by role, city, and country.  
  Sales & Prospecting** – Use job posts as buying signals.  
    If a company is hiring for a role you support (e.g. marketers, developers, ops) —  
    it's the perfect time to reach out and offer your services.

  Tools Needed:
  n8n Nodes:**
    Form Trigger  
    HTTP Request  
    Wait  
    If  
    Code  
    Google Sheets  
    Sticky Notes (for embedded guidance)
  External Services:**
    Bright Data (Dataset API)  
    Google Sheets

  API Keys & Authentication Required:
  Bright Data API Key**  
    → Add in the HTTP Request headers:  
    Authorization: Bearer YOUR_BRIGHTDATA_API_KEY

  Google Sheets OAuth2**  
    → Connect your account in n8n to allow read/write access to the spreadsheet.

  General Guidelines:
  Use descriptive names for all nodes.  
  Include retry logic in polling to avoid infinite loops.  
  Flatten nested fields (like job_poster and base_salary).  
  Strip out HTML tags from job descriptions for clean output.

  Things to be Aware Of:
  Bright Data snapshots take ~1–3 minutes — use a Wait node and polling.  
  Form filters affect output significantly:  
    🔍 We recommend filtering by "Last 7 days" or "Past 24 hours" for fresher data.  
  Avoid hardcoding values in the form — leave optional filters empty if unsure.

  Post-Processing & Outreach:
  After data lands in Google Sheets, you can use it to:  
    Personalize cold emails based on job titles, locations, and hiring signals.  
    Send thoughtful LinkedIn messages (e.g., "Saw you're hiring a CMO...")  
    Prioritize outreach to companies actively growing in your niche.

  Additional Notes:
  📄 Copy the Google Sheet Template:  
    Click here to make your copy  
    → Rename for each campaign or client.

  Form fields include:  
    Job Location (city or region)  
    Keyword (e.g., CMO, Backend Developer)  
    Country (2-letter code, e.g., US, UK)

  This workflow gives you a competitive edge —  
  📌 For candidates: Be first to apply.  
  📌 For sellers: Be first to pitch.  
  All based on live hiring signals from LinkedIn.

  STEP-BY-STEP WALKTHROUGH

  Step 1: Set up your Google Sheet
  Open this template
  Go to File → Make a copy
  You'll use this copy as the destination for the scraped job posts

  Step 2: Fill out the Input Form in n8n
  The form allows you to define what kind of job posts you want to scrape.

  Fields:
  Job Location** → e.g. New York, Berlin, Remote  
  Keyword** → e.g. CMO, AI Architect, Ecommerce Manager  
  Country Code (2-letter)** → e.g. US, UK, IL

  💡 Pro Tip:  
  For best results, set the filter inside the workflow to:  
  time_range = "Past 24 hours" or "Last 7 days"  
  This keeps results relevant and fresh.

  Step 3: Trigger Bright Data Snapshot
  The workflow sends a request to Bright Data with your input.

  Example API Call Body:
  [
    {
      "location": "New York",
      "keyword": "Marketing Manager",
      "country": "US",
      "time_range": "Past 24 hours",
      "job_type": "Part-time",
      "experience_level": "",
      "remote": "",
      "company": ""
    }
  ]

  Bright Data will start preparing the dataset in the background.

  Step 4: Wait for the Snapshot to Complete
  The workflow includes a Wait Node and Polling Loop that checks every few minutes until the data is ready.

  You don't need to do anything here — it's all automated.

  Step 5: Clean Up the Results
  Once Bright Data responds with the full job post list:

  ✔️ Nested fields like job_poster and base_salary are flattened  
  ✔️ HTML in job descriptions is removed  
  ✔️ Final data is formatted for export

  Step 6: Export to Google Sheets
  The final cleaned list is added to your Google Sheet (first tab).

  Each row = one job post, with columns like:

  job_title, company_name, location, salary_min, apply_link, job_description_plain

  Step 7: Use the Data for Outreach or Research
  Example for Job Seekers:
  You search for:

  Location: Berlin
  Keyword: Product Designer
  Country: DE
  Time range: Past 7 days

  Now you've got a live list of roles — with salary, recruiter info, and apply links.
  → Use it to apply faster than others.

  Example for Prospecting (Sales / SDR):
  You search for:

  Location: London
  Keyword: Growth Marketing
  Country: UK

  And find companies hiring growth marketers.
  → That's your signal to offer help with media buying, SEO, CRO, or your relevant service.

  Use the data to:
  Write personalized cold emails ("Saw you're hiring a Growth Marketer…")
  Start warm LinkedIn outreach
  Build lead lists of companies actively expanding in your niche

  API Credentials Required:
  Bright Data API Key**  
    Used in HTTP headers: Authorization: Bearer YOUR_BRIGHTDATA_API_KEY

  Google Sheets OAuth2**  
    Allows n8n to read/write to your spreadsheet

  Adjustments & Customization Tips:
  Modify the HTTP Request body to add more filters (e.g. job_type, remote, company)
  Increase or reduce polling wait time depending on Bright Data speed
  Add scoring logic to prioritize listings based on title or location

  Final Notes:
  📄 Google Sheet Template:  
    Make your copy here

  ⚙️ Bright Data Dataset API:  
    Visit BrightData.com

  📬 Personalization works best when you act quickly.  
    Use the freshest data to reach out with context — not generic pitches.

  This workflow turns LinkedIn job posts into sales insights and job leads.
  All in one click. Fully automated. Ready for your next move.

workflow_json:
  {"meta":{"instanceId":"1eadd5bc7c3d70c587c28f782511fd898c6bf6d97963d92e836019d2039d1c79"},"nodes":[{"id":"bee233ee-7212-4fbd-b151-0bb49919ca42","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[0,280],"parameters":{"color":4,"width":1289,"height":4398,"content":"LinkedIn Job Data Scraper to Google Sheets\nScrape live job posts from LinkedIn via Bright Data, clean them, and send to Google Sheets. Use for:\n✅ Job Hunting — fresh, filtered roles\n✅ Sales Prospecting — find companies hiring (aka growing)\n⚙️ What's Used\nn8n Nodes: Form → HTTP Request → Wait → If → Code → Google Sheets\nExternal Tools:\n\nBright Data – Dataset API\nGoogle Sheets – Template Copy\n\n🔑 Setup – Credentials Needed\n\nBright Data API Key → Add to HTTP headers as: Authorization: Bearer YOUR_TOKEN_HERE\nGoogle Sheets OAuth2 → Connect account in n8n\n\n📝 Input Form – Fields\nUsed to define what job data to scrape.\nFieldDescriptionExampleLocationCity/regionNew York, BerlinKeywordRole to searchCMO, Data AnalystCountry2-letter ISO codeUS, UK, DETime RangeHow recent the jobs should be\"Past 24 hours\" or \"Last 7 days\" (recommended)Job TypeFull-time / Part-time / Contract(Optional)ExperienceEntry, Mid, Senior(Optional)RemoteFilter by remote-friendly roles(Optional)CompanyFilter by specific employer(Optional)\n🚀 Workflow Steps\n\nUser fills input form\nTrigger snapshot via Bright Data Dataset API\nWait node + polling checks when data is ready (~1–3 mins)\nCleanup step:\n\nFlattens nested fields (job_poster, base_salary, etc.)\nRemoves HTML from job descriptions\n\n\nSend to Google Sheet\n\nSheet is pre-linked, 1 job per row\nExample columns: job_title, company_name, location, salary_min, apply_link, job_description_plain\n\n\nYou use the data\n\nJob seekers → Apply fast\nSalespeople → Spot buyers & offer help\n\n\n\n💡 Pro Tips\n\nUse \"Past 24 hours\" or \"Last 7 days\" for fresher results\nLeave filters empty if unsure — Bright Data will return broader results\nUse cleaned data for:\n\nCold email personalization\nLinkedIn outreach\nBuilding ICP-based lead lists\n\n\n\n🧪 Example API Body\njson[ \n  { \n    \"location\": \"New York\", \n    \"keyword\": \"Marketing Manager\", \n    \"country\": \"US\", \n    \"time_range\": \"Past 24 hours\", \n    \"job_type\": \"Part-time\", \n    \"experience_level\": \"\", \n    \"remote\": \"\", \n    \"company\": \"\" \n  } \n]\n📄 Template & Resources\n\n📋 Google Sheet Template (Make a Copy)\n📘 Bright Data API Reference\n\n🛠️ Customize It\n\nAdd filters to HTTP Body (remote, experience_level, etc.)\nChange polling interval if Bright Data is slow\nAdd custom logic to score/prioritize listings\nSend filtered lists to CRM, Slack, etc.\n\nThis gives you a live stream of hiring signals — whether you're finding a job or pitching a service. One form. One click. Fully automated."},"typeVersion":1},{"id":"0fa9d0fe-b3ba-48be-99b9-2bc3aeb18b43","name":"Sticky Note9","type":"n8n-nodes-base.stickyNote","position":[0,-60],"parameters":{"color":4,"width":1300,"height":320,"content":"=======================================\n            WORKFLOW ASSISTANCE\n=======================================\nFor any questions or support, please contact:\n    Yaron@nofluff.online\n\nExplore more tips and tutorials here:\n   - YouTube: https://www.youtube.com/@YaronBeen/videos\n   - LinkedIn: https://www.linkedin.com/in/yaronbeen/\n=======================================\n"},"typeVersion":1},{"id":"33cb416e-a7ff-4b55-9701-9b9e95d76f12","name":"Snapshot Progress","type":"n8n-nodes-base.httpRequest","position":[2840,360],"parameters":{"url":"=https://api.brightdata.com/datasets/v3/progress/{{ $('HTTP Request- Post API call to Bright Data').item.json.snapshot_id }}","options":{},"sendHeaders":true,"headerParameters":{"parameters":[{"name":"Authorization","value":"Bearer <YOUR_BRIGHT_DATA_API_KEY>"}]}},"typeVersion":4.2},{"id":"6b8c9405-8f8c-4a24-85ca-343d33e06141","name":"Sticky Note10","type":"n8n-nodes-base.stickyNote","position":[3680,140],"parameters":{"width":195,"height":646,"content":"In this workflow, I use Google Sheets to store the results. \n\nYou can use my template to get started faster:\n\n1. [Click on this link to get the template](https://docs.google.com/spreadsheets/d/1_jbr5zBllTy_pGbogfGSvyv1_0a77I8tU-Ai7BjTAw4/edit?usp=sharing)\n2. Make a copy of the Sheets\n3. Add the URL to this node \n\n\n"},"typeVersion":1},{"id":"3d3cd92a-9ea7-4a4f-a9b5-aae689f719e5","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[1320,-60],"parameters":{"width":480,"height":2240,"content":"# 🔍 LinkedIn Jobs API – Parameter Guide\n\nUse this object to query LinkedIn job listings.  \nEach field lets you filter results based on different criteria.\n\n```json\n{\n  \"location\": \"{{ $json.Location }}\",\n  \"keyword\": \"{{ $json.Keyword }}\",\n  \"country\": \"{{ $json.Country }}\",\n  \"time_range\": \"Past 24 hours\",\n  \"job_type\": \"Part-time\",\n  \"experience_level\": \"\",\n  \"remote\": \"\",\n  \"company\": \"\"\n}\n```\n\n## 🧾 Field Explanations & Valid Options\n\n### 🗺️ location\nCity or region where the job is located.\nUse a city or region name.\n✅ Example: \"Berlin\", \"New York\"\n\n### 🧠 keyword\nJob title or search keywords.\nUse terms like role names or skills.\n✅ Example: \"Data Scientist\", \"Growth Marketing\"\n\n### 🌍 country\nCountry code in ISO 3166-1 alpha-2 format.\n✅ Example: \"US\", \"DE\", \"IL\"\n\n### ⏱️ time_range\nPosting date filter.\nLimits results based on how recently jobs were posted.\nAccepted values:\n- Any Time\n- Past 24 hours\n- Past Week\n- Past Month\n✅ Example: \"Past Week\"\n\n### 💼 job_type\nType of employment.\nUse a single value or comma-separated list.\nAccepted values:\n- Full-time\n- Part-time\n- Contract\n- Temporary\n- Internship\n- Volunteer\n- Other\n✅ Example: \"Full-time,Contract\"\n\n### 🎯 experience_level\nSeniority level of the job.\nAccepted values:\n- Internship\n- Entry level\n- Associate\n- Mid-Senior level\n- Director\n- Executive\n✅ Example: \"Mid-Senior level\"\n\n### 🌐 remote\nWorkplace type.\nAccepted values:\n- Remote\n- On-site\n- Hybrid\n- (leave blank for no preference)\n✅ Example: \"Remote\"\n\n### 🏢 company\nFilter by company name.\nOptional. Use plain text.\n✅ Example: \"Google\", \"Spotify\"\n\n## ✅ Full Example\n\n```json\n{\n  \"location\": \"New York\",\n  \"keyword\": \"UI Designer\",\n  \"country\": \"US\",\n  \"time_range\": \"Past Week\",\n  \"job_type\": \"Full-time,Contract\",\n  \"experience_level\": \"Mid-Senior level\",\n  \"remote\": \"Hybrid\",\n  \"company\": \"Spotify\"\n}\n```\n\n"},"typeVersion":1},{"id":"1d7a7bb0-1531-4516-9373-5e85a090b143","name":"On form submission - Discover Jobs","type":"n8n-nodes-base.formTrigger","position":[1700,580],"webhookId":"8d0269c7-d1fc-45a1-a411-19634a1e0b82","parameters":{"options":{},"formTitle":"Linkedin High Intent Prospects And Job Post Hunt","formFields":{"values":[{"fieldLabel":"Job Location","placeholder":"example: new york","requiredField":true},{"fieldLabel":"Keyword","placeholder":"example: CMO, AI architect","requiredField":true},{"fieldLabel":"Country (2 letters)","placeholder":"example: US,UK,IL","requiredField":true}]},"formDescription":"This form lets you customize your job search / prospecting by choosing:\n\nLocation (city or region)\n\nJob title or keywords\n\nCountry code\n\nFilters like posting date, job type, experience level, and remote options\n\nYou can also optionally narrow results by company name.\n\n🧠 Tip: Leave fields blank if you want broader results."},"typeVersion":2.2},{"id":"aea569df-eedd-441f-aba5-c3c26a50fa87","name":"HTTP Request- Post API call to Bright Data","type":"n8n-nodes-base.httpRequest","position":[2260,620],"parameters":{"url":"https://api.brightdata.com/datasets/v3/trigger","method":"POST","options":{},"jsonBody":"=[\n  {\n    \"location\": \"{{ $json['Job Location'] }}\",\n    \"keyword\": \"{{ $json.Keyword }}\",\n    \"country\": \"{{ $json['Country (2 letters)'] }}\",\n    \"time_range\": \"Past 24 hours\",\n    \"job_type\": \"Part-time\",\n    \"experience_level\": \"\",\n    \"remote\": \"\",\n    \"company\": \"\"\n  }\n] ","sendBody":true,"sendQuery":true,"sendHeaders":true,"specifyBody":"json","queryParameters":{"parameters":[{"name":"dataset_id","value":"gd_lpfll7v5hcqtkxl6l"},{"name":"endpoint","value":"https://yaron-nofluff.app.n8n.cloud/webhook-test/8c42463d-a631-4a17-a084-4bcbbb3bfc68"},{"name":"notify","value":"https://yaron-nofluff.app.n8n.cloud/webhook-test/8c42463d-a631-4a17-a084-4bcbbb3bfc68"},{"name":"format","value":"json"},{"name":"uncompressed_webhook","value":"true"},{"name":"type","value":"discover_new"},{"name":"discover_by","value":"=keyword"}]},"headerParameters":{"parameters":[{"name":"Authorization","value":"Bearer <YOUR_BRIGHT_DATA_API_KEY>"}]}},"typeVersion":4.2},{"id":"8837f055-7243-44b6-87a2-e679d75839d0","name":"Wait - Polling Bright Data","type":"n8n-nodes-base.wait","position":[2600,360],"webhookId":"8005a2b3-2195-479e-badb-d90e4240e699","parameters":{"unit":"minutes"},"executeOnce":false,"typeVersion":1.1},{"id":"1f0ebefa-42a1-450c-b30a-64edabdaedaf","name":"If - Checking status of Snapshot - if data is ready or not","type":"n8n-nodes-base.if","position":[3040,360],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"7932282b-71bb-4bbb-ab73-4978e554de7e","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.status }}","rightValue":"running"}]}},"typeVersion":2.2},{"id":"e17b4da0-3f9c-45d5-acdf-ab634acfef97","name":"HTTP Request - Getting data from Bright Data","type":"n8n-nodes-base.httpRequest","position":[3320,380],"parameters":{"url":"=https://api.brightdata.com/datasets/v3/snapshot/{{ $json.snapshot_id }}","options":{},"sendQuery":true,"sendHeaders":true,"queryParameters":{"parameters":[{"name":"format","value":"json"}]},"headerParameters":{"parameters":[{"name":"Authorization","value":"Bearer <YOUR_BRIGHT_DATA_API_KEY>"}]}},"typeVersion":4.2},{"id":"b5bd6a55-f80d-46f9-a59a-beff28de9da7","name":"Code - Cleaning Up","type":"n8n-nodes-base.code","position":[3600,400],"parameters":{"jsCode":"// Helper function to strip HTML tags\nfunction stripHtml(html) {\n  return html\n    .replace(/<[^>]+>/g, '')    // remove all HTML tags\n    .replace(/&nbsp;/g, ' ')     // decode HTML entities\n    .replace(/&[a-z]+;/g, '')    // remove other HTML entities\n    .replace(/\\s+/g, ' ')        // normalize whitespace\n    .trim();\n}\n\nreturn items.map(item => {\n  const data = item.json;\n\n  // Flatten job_poster\n  if (data.job_poster) {\n    data.job_poster_name = data.job_poster.name || '';\n    data.job_poster_title = data.job_poster.title || '';\n    data.job_poster_url = data.job_poster.url || '';\n    delete data.job_poster;\n  }\n\n  // Flatten base_salary\n  if (data.base_salary) {\n    data.salary_min = data.base_salary.min_amount || '';\n    data.salary_max = data.base_salary.max_amount || '';\n    data.salary_currency = data.base_salary.currency || '';\n    data.salary_period = data.base_salary.payment_period || '';\n    delete data.base_salary;\n  }\n\n  // Clean up job description HTML\n  if (data.job_description_formatted) {\n    data.job_description_plain = stripHtml(data.job_description_formatted);\n  }\n\n  return { json: data };\n});\n"},"typeVersion":2},{"id":"70f4a4a0-b9ce-4b7a-b232-86014a7f8a3f","name":"Google Sheets - Adding All Job Posts","type":"n8n-nodes-base.googleSheets","position":[3940,440],"parameters":{"columns":{"value":{"country_code":"={{ $json.country_code }}"},"schema":[{"id":"url","type":"string","display":true,"removed":false,"required":false,"displayName":"url","defaultMatch":false,"canBeUsedToMatch":true},{"id":"job_posting_id","type":"string","display":true,"removed":false,"required":false,"displayName":"job_posting_id","defaultMatch":false,"canBeUsedToMatch":true},{"id":"job_title","type":"string","display":true,"removed":false,"required":false,"displayName":"job_title","defaultMatch":false,"canBeUsedToMatch":true},{"id":"company_name","type":"string","display":true,"removed":false,"required":false,"displayName":"company_name","defaultMatch":false,"canBeUsedToMatch":true},{"id":"job_location","type":"string","display":true,"removed":false,"required":false,"displayName":"job_location","defaultMatch":false,"canBeUsedToMatch":true},{"id":"job_description_plain","type":"string","display":true,"removed":false,"required":false,"displayName":"job_description_plain","defaultMatch":false,"canBeUsedToMatch":true},{"id":"job_poster_name","type":"string","display":true,"removed":false,"required":false,"displayName":"job_poster_name","defaultMatch":false,"canBeUsedToMatch":true},{"id":"job_poster_title","type":"string","display":true,"removed":false,"required":false,"displayName":"job_poster_title","defaultMatch":false,"canBeUsedToMatch":true},{"id":"job_poster_url","type":"string","display":true,"removed":false,"required":false,"displayName":"job_poster_url","defaultMatch":false,"canBeUsedToMatch":true},{"id":"salary_min","type":"string","display":true,"removed":false,"required":false,"displayName":"salary_min","defaultMatch":false,"canBeUsedToMatch":true},{"id":"salary_max","type":"string","display":true,"removed":false,"required":false,"displayName":"salary_max","defaultMatch":false,"canBeUsedToMatch":true},{"id":"salary_currency","type":"string","display":true,"removed":false,"required":false,"displayName":"salary_currency","defaultMatch":false,"canBeUsedToMatch":true},{"id":"salary_period","type":"string","display":true,"removed":false,"required":false,"displayName":"salary_period","defaultMatch":false,"canBeUsedToMatch":true},{"id":"application_availability","type":"string","display":true,"removed":false,"required":false,"displayName":"application_availability","defaultMatch":false,"canBeUsedToMatch":true},{"id":"job_posted_date","type":"string","display":true,"removed":false,"required":false,"displayName":"job_posted_date","defaultMatch":false,"canBeUsedToMatch":true},{"id":"company_logo","type":"string","display":true,"removed":false,"required":false,"displayName":"company_logo","defaultMatch":false,"canBeUsedToMatch":true},{"id":"country_code","type":"string","display":true,"removed":false,"required":false,"displayName":"country_code","defaultMatch":false,"canBeUsedToMatch":true},{"id":"timestamp","type":"string","display":true,"removed":false,"required":false,"displayName":"timestamp","defaultMatch":false,"canBeUsedToMatch":true},{"id":"company_id","type":"string","display":true,"removed":false,"required":false,"displayName":"company_id","defaultMatch":false,"canBeUsedToMatch":true},{"id":"job_summary","type":"string","display":true,"removed":false,"required":false,"displayName":"job_summary","defaultMatch":false,"canBeUsedToMatch":true},{"id":"company_url","type":"string","display":true,"removed":false,"required":false,"displayName":"company_url","defaultMatch":false,"canBeUsedToMatch":true},{"id":"job_posted_time","type":"string","display":true,"removed":false,"required":false,"displayName":"job_posted_time","defaultMatch":false,"canBeUsedToMatch":true},{"id":"job_num_applicants","type":"string","display":true,"removed":false,"required":false,"displayName":"job_num_applicants","defaultMatch":false,"canBeUsedToMatch":true},{"id":"discovery_input","type":"string","display":true,"removed":false,"required":false,"displayName":"discovery_input","defaultMatch":false,"canBeUsedToMatch":true},{"id":"apply_link","type":"string","display":true,"removed":false,"required":false,"displayName":"apply_link","defaultMatch":false,"canBeUsedToMatch":true},{"id":"title_id","type":"string","display":true,"removed":false,"required":false,"displayName":"title_id","defaultMatch":false,"canBeUsedToMatch":true},{"id":"job_description_formatted","type":"string","display":true,"removed":false,"required":false,"displayName":"job_description_formatted","defaultMatch":false,"canBeUsedToMatch":true},{"id":"input","type":"string","display":true,"removed":false,"required":false,"displayName":"input","defaultMatch":false,"canBeUsedToMatch":true},{"id":"job_seniority_level","type":"string","display":true,"removed":false,"required":false,"displayName":"job_seniority_level","defaultMatch":false,"canBeUsedToMatch":true},{"id":"job_function","type":"string","display":true,"removed":false,"required":false,"displayName":"job_function","defaultMatch":false,"canBeUsedToMatch":true},{"id":"job_employment_type","type":"string","display":true,"removed":false,"required":false,"displayName":"job_employment_type","defaultMatch":false,"canBeUsedToMatch":true},{"id":"job_industries","type":"string","display":true,"removed":false,"required":false,"displayName":"job_industries","defaultMatch":false,"canBeUsedToMatch":true},{"id":"job_base_pay_range","type":"string","display":true,"removed":false,"required":false,"displayName":"job_base_pay_range","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"autoMapInputData","matchingColumns":["row_number"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{"handlingExtraData":"insertInNewColumn"},"operation":"append","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1_jbr5zBllTy_pGbogfGSvyv1_0a77I8tU-Ai7BjTAw4/edit#gid=0","cachedResultName":"input"},"documentId":{"__rl":true,"mode":"list","value":"1_jbr5zBllTy_pGbogfGSvyv1_0a77I8tU-Ai7BjTAw4","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1_jbr5zBllTy_pGbogfGSvyv1_0a77I8tU-Ai7BjTAw4/edit?usp=drivesdk","cachedResultName":"NoFluff-N8N-Sheet-Template-Job Scraping WIth Bright Data"}},"credentials":{"googleSheetsOAuth2Api":{"id":"4RJOMlGAcB9ZoYfm","name":"Google Sheets account 2"}},"typeVersion":4.3,"alwaysOutputData":true},{"id":"297d778f-afa5-4d2d-baea-3b1fb199f77c","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[1940,-40],"parameters":{"width":300,"height":880,"content":"🧠 Bright Data Trigger – Customize Your Job Query\n\nThis HTTP Request sends a POST call to Bright Data to start a new dataset snapshot based on your filters.\n\n👋 If you don’t want to use the Form Trigger,\nyou can directly adjust the filters here in this node.\n\nYou can customize:\n\n\"location\" → city, region, or keyword (e.g. \"New York\", \"Remote\")\n\n\"keyword\" → job title or role (e.g. \"CMO\", \"AI Engineer\")\n\n\"country\" → 2-letter country code (e.g. \"US\", \"UK\")\n\n\"time_range\" → \"Past 24 hours\", \"Last 7 days\", etc.\n\n\"job_type\", \"experience_level\", \"remote\", \"company\" → optional filters\n\n📌 Tip:\nUse \"Past 24 hours\" or \"Last 7 days\" for the freshest results."},"typeVersion":1},{"id":"54303791-b269-4930-85b5-33e50ae08f33","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[2320,220],"parameters":{"color":4,"width":940,"height":360,"content":"Bright Data Getting Jobs\n"},"typeVersion":1},{"id":"cccb03cb-0432-43ff-9c3a-233de510a775","name":"Edit Fields","type":"n8n-nodes-base.set","position":[1920,580],"parameters":{"options":{},"assignments":{"assignments":[{"id":"12067869-0249-4cd2-b9e2-8e4055a0d917","name":"","type":"string","value":""}]}},"typeVersion":3.4}],"pinData":{},"connections":{"Edit Fields":{"main":[[{"node":"HTTP Request- Post API call to Bright Data","type":"main","index":0}]]},"Snapshot Progress":{"main":[[{"node":"If - Checking status of Snapshot - if data is ready or not","type":"main","index":0}]]},"Code - Cleaning Up":{"main":[[{"node":"Google Sheets - Adding All Job Posts","type":"main","index":0}]]},"Wait - Polling Bright Data":{"main":[[{"node":"Snapshot Progress","type":"main","index":0}]]},"On form submission - Discover Jobs":{"main":[[{"node":"Edit Fields","type":"main","index":0}]]},"HTTP Request- Post API call to Bright Data":{"main":[[{"node":"Wait - Polling Bright Data","type":"main","index":0}]]},"HTTP Request - Getting data from Bright Data":{"main":[[{"node":"Code - Cleaning Up","type":"main","index":0}]]},"If - Checking status of Snapshot - if data is ready or not":{"main":[[{"node":"Wait - Polling Bright Data","type":"main","index":0}],[{"node":"HTTP Request - Getting data from Bright Data","type":"main","index":0}]]}}}


name: AI-Powered WhatsApp Chatbot 🤖📲 for Text, Voice, Images & PDFs with memory 🧠
author_name: Davide
author_username: n3witalia
categories: []
created_at: 2025-04-17T14:22:12.162Z
updated_at: 2025-04-17T14:22:12.162Z
url: https://n8n.io/workflows/3586
scraped_at: 2025-07-06 21:16:30
description:
  This workflow is a highly advanced multimodal AI assistant designed to operate through WhatsApp. It can understand and respond to text, images, voice messages, and PDF documents by combining OpenAI models with smart logic to adapt to the content received.

  🎯 Core Features

  📥 1. Automatic Message Type Detection
  Using the Input type node, the bot detects whether the user has sent:
  Text
  Voice messages
  Images
  Files (PDF)
  Other unsupported content

  💬 2. Smart Text Message Handling
  Text messages are processed by an OpenAI GPT-4o-mini agent with a customized system prompt.
  Replies are concise, accurate, and formatted for mobile readability.

  🖼️ 3. Image Analysis & Description
  Images are downloaded, converted to base64, and analyzed by an image-aware AI model.
  The output is a rich, structured description, designed for visually impaired users or visual content interpretation.

  🎙️ 4. Voice Message Transcription & Reply
  Audio messages are downloaded and transcribed using OpenAI Whisper.
  The transcribed text is analyzed and answered by the AI.
  Optionally, the AI reply can be converted back to voice using OpenAI's text-to-speech, and sent as an audio message.

  📄 5. PDF Document Extraction & Summary
  Only PDFs are allowed (filtered via MIME type).
  The document’s content is extracted and combined with the user's message.
  The AI then provides a relevant summary or answer.

  🧠 6. Contextual Memory
  Each user has a personalized session ID with a memory window of 10 interactions.
  This ensures a more natural and contextual conversation flow.

  How It Works  

  Thisworkflow is designed to handle incoming WhatsApp messages and process different types of inputs (text, audio, images, and PDF documents) using AI-powered analysis. Here’s how it functions:  

  Trigger: The workflow starts with the **WhatsApp Trigger node, which listens for incoming messages (text, audio, images, or documents).  
  Input Routing: The **Input type (Switch node) checks the message type and routes it to the appropriate processing branch:  
    Text: Directly forwards the message to the AI agent for response generation.  
    Audio: Downloads the audio file, transcribes it using OpenAI, and sends the transcription to the AI agent.  
    Image: Downloads the image, analyzes it with OpenAI’s GPT-4 model, and generates a detailed description.  
    PDF Document: Downloads the file, extracts text, and processes it with the AI agent.  
    Unsupported Formats: Sends an error message if the input is not supported.  
  AI Processing: The **AI Agent1 node, powered by OpenAI, processes the input (text, transcribed audio, image description, or PDF content) and generates a response.  
  Response Handling**:  
    For audio inputs, the AI’s response is converted back into speech (using OpenAI’s TTS) and sent as a voice message.  
    For other inputs, the response is sent as a text message via WhatsApp.  
  Memory: The **Simple Memory node maintains conversation context for follow-up interactions.  

  Setup Steps  
  To deploy this workflow in n8n, follow these steps:  

  Configure WhatsApp API Credentials:  
     Set up WhatsApp Business API credentials (Meta Developer Account).  
     Add the credentials in the WhatsApp Trigger, Get Image/Audio/File URL, and Send Message nodes.  

  Set Up OpenAI Integration:  
     Provide an OpenAI API key in the Analyze Image, Transcribe Audio, Generate Audio Response, and AI Agent1 nodes.  

   Adjust Input Handling (Optional):  
     Modify the Switch node ("Input type") to handle additional message types if needed.  
     Update the "Only PDF File" IF node to support other document formats.  

  Test & Deploy:  
     Activate the workflow and test with different message types (text, audio, image, PDF).  
     Ensure responses are correctly generated and sent back via WhatsApp.  

  Need help customizing?  
  Contact me for consulting and support or add me on Linkedin. 

nodes_used:
  ["n8n-nodes-base.httpRequest","n8n-nodes-base.whatsApp","n8n-nodes-base.code","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.lmChatOpenAi","@n8n/n8n-nodes-langchain.memoryBufferWindow","@n8n/n8n-nodes-langchain.openAi"]

workflow_json:
  {"id":"zMtPPjJ80JJznrJP","meta":{"instanceId":"a4bfc93e975ca233ac45ed7c9227d84cf5a2329310525917adaf3312e10d5462","templateCredsSetupCompleted":true},"name":"AI-Powered WhatsApp Chatbot for Text, Voice, Images & PDFs","tags":[],"nodes":[{"id":"38246f5d-0cf4-49ed-957e-0189243d0dec","name":"WhatsApp Trigger","type":"n8n-nodes-base.whatsAppTrigger","position":[-700,80],"webhookId":"d3978cae-2aca-4553-8ac7-ab89068deabc","parameters":{"options":{},"updates":["messages"]},"credentials":{"whatsAppTriggerApi":{"id":"gylriO2te7NRPXxN","name":"WhatsApp OAuth account"}},"typeVersion":1},{"id":"4cc0b70b-3ecc-4415-af2f-e50d4f302786","name":"Download Image","type":"n8n-nodes-base.httpRequest","position":[720,120],"parameters":{"url":"={{ $json.url }}","options":{},"authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"FDP9FxauzJt9rkjr","name":"WhatsApp"}},"typeVersion":4.2},{"id":"528984be-b9ad-41c7-8b2e-ccbf275f7805","name":"Analyze Image","type":"@n8n/n8n-nodes-langchain.openAi","position":[960,120],"parameters":{"text":"=You are an advanced image description AI assistant . Your primary function is to provide detailed, accurate descriptions of images submitted through WhatsApp.\n\nCORE FUNCTIONALITY:\n- When presented with an image, you will analyze it thoroughly and provide a comprehensive description in English.\n- Your descriptions should capture both the obvious and subtle elements within the image.\n\nIMAGE DESCRIPTION GUIDELINES:\n- Begin with a broad overview of what the image contains\n- Describe key subjects, people, objects, and their relationships\n- Note significant visual elements such as colors, lighting, composition, and perspective\n- Identify any text visible in the image\n- Describe the setting or environment\n- Mention any notable actions or events taking place\n- Comment on mood, tone, or atmosphere when relevant\n- If applicable, identify landmarks, famous people, or cultural references\n\nRESPONSE FORMAT:\n- Start with \"Image Description:\" followed by your analysis\n- Structure your description in a logical manner (general to specific)\n- Use clear, precise language appropriate for visual description\n- Format longer descriptions with paragraphs to enhance readability\n- End with any notable observations that might require special attention\n\nLIMITATIONS:\n- If the image is blurry, low resolution, or difficult to interpret, acknowledge these limitations\n- If an image contains potentially sensitive content, provide a factual description without judgment\n- Do not make assumptions about elements that cannot be clearly determined\n\nYour descriptions should be informative, objective, and thorough, enabling someone who cannot see the image to form an accurate mental picture of its contents.","modelId":{"__rl":true,"mode":"list","value":"gpt-4o-mini","cachedResultName":"GPT-4O-MINI"},"options":{"detail":"auto"},"resource":"image","inputType":"base64","operation":"analyze"},"credentials":{"openAiApi":{"id":"4zwP0MSr8zkNvvV9","name":"OpenAi account"}},"typeVersion":1.8},{"id":"b8898138-f987-4ef7-a5c1-d6d6b9c815f0","name":"Download Audio","type":"n8n-nodes-base.httpRequest","position":[720,-180],"parameters":{"url":"={{ $json.url }}","options":{},"authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"FDP9FxauzJt9rkjr","name":"WhatsApp"}},"typeVersion":4.2},{"id":"e68bea55-f43a-4143-afca-1348b35e5879","name":"Transcribe Audio","type":"@n8n/n8n-nodes-langchain.openAi","position":[960,-180],"parameters":{"options":{},"resource":"audio","operation":"transcribe"},"credentials":{"openAiApi":{"id":"4zwP0MSr8zkNvvV9","name":"OpenAi account"}},"typeVersion":1.8},{"id":"1c0aa0c3-cee4-40f1-9e13-9365cc06443a","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[160,1440],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"credentials":{"openAiApi":{"id":"4zwP0MSr8zkNvvV9","name":"OpenAi account"}},"typeVersion":1.2},{"id":"d2215cf8-49e1-433b-b9c3-a219e6432cba","name":"AI Agent1","type":"@n8n/n8n-nodes-langchain.agent","position":[160,1220],"parameters":{"text":"={{ $json.text }}","options":{"systemMessage":"You are an intelligent assistant. Your purpose is to analyze various types of input and provide helpful, accurate responses.\n\nCAPABILITIES:\n- Process and respond to text messages\n- Analyze uploaded files\n- Interpret and describe images\n- Transcribe and understand voice messages\n\nINPUT HANDLING:\n1. For text messages: Analyze the content, understand the intent, and provide a relevant response.\n2. For file analysis: Examine the file content, extract key information, and summarize important points also based on the questions asked.\n3. For image analysis: Describe what you see in the image, identify key elements, and respond to any questions about the image.\n4. For voice messages: Transcribe the audio, understand the message, and respond appropriately.\n\nRESPONSE GUIDELINES:\n- Be concise but thorough\n- Prioritize accuracy over speculation\n- Maintain a professional and helpful tone\n- When uncertain, acknowledge limitations\n- Format responses for easy reading on mobile devices\n- Include actionable information when appropriate\n\nLIMITATIONS:\n- Mention if you're unable to process certain file formats\n- Indicate if an image is unclear or if details are difficult to discern\n- Note if audio quality impacts transcription accuracy\n\nSECURITY & PRIVACY:\n- Do not store or remember sensitive information shared in files, images, or voice notes\n- Do not share personal information across different user interactions\n- Inform users about data privacy limitations when relevant\n\nAnalyze all inputs carefully before responding. Your goal is to provide value through accurate information and helpful assistance."},"promptType":"define"},"typeVersion":1.8},{"id":"103825d0-8521-43c7-8246-9cc1faca42e1","name":"Download File","type":"n8n-nodes-base.httpRequest","position":[720,460],"parameters":{"url":"={{ $json.url }}","options":{},"authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"FDP9FxauzJt9rkjr","name":"WhatsApp"}},"typeVersion":4.2},{"id":"98077f98-6dcf-4932-9363-19bf1fdc299e","name":"Extract from File","type":"n8n-nodes-base.extractFromFile","position":[980,460],"parameters":{"options":{},"operation":"pdf"},"typeVersion":1},{"id":"fefc8b87-d64e-4ff9-9f62-1ac3af2bf17e","name":"Simple Memory","type":"@n8n/n8n-nodes-langchain.memoryBufferWindow","position":[300,1440],"parameters":{"sessionKey":"=memory_{{ $('WhatsApp Trigger').item.json.contacts[0].wa_id }}","sessionIdType":"customKey","contextWindowLength":10},"typeVersion":1.3},{"id":"83ac997d-6ba0-4eb7-bd6c-80671f03c56c","name":"Get File Url","type":"n8n-nodes-base.whatsApp","position":[500,460],"webhookId":"280bd5de-32d7-4d8f-93d2-e91e3b0bc161","parameters":{"resource":"media","operation":"mediaUrlGet","mediaGetId":"={{ $('WhatsApp Trigger').item.json.messages[0].document.id }}"},"credentials":{"whatsAppApi":{"id":"HDUOWQXeRXMVjo0Z","name":"WhatsApp account"}},"typeVersion":1},{"id":"56b23f60-57c3-4ea7-a4e8-64029a2e44c1","name":"Only PDF File","type":"n8n-nodes-base.if","position":[220,480],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"f52d2aaa-e0b2-45e5-8c4b-ceef42182a0d","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.messages[0].document.mime_type }}","rightValue":"application/pdf"}]}},"typeVersion":2.2},{"id":"fa733b7b-16a7-4a9b-86b3-88395535ecd5","name":"Fix mimeType for Audio","type":"n8n-nodes-base.code","position":[1040,1080],"parameters":{"jsCode":"for (const item of $input.all()) {\n  if (item.binary) {\n    const binaryPropertyNames = Object.keys(item.binary);\n    for (const propName of binaryPropertyNames) {\n      if (item.binary[propName].mimeType === 'audio/mp3') {\n        item.binary[propName].mimeType = 'audio/mpeg';\n      }\n    }\n  }\n}\n\nreturn $input.all();"},"typeVersion":2},{"id":"0d99c2fa-945b-487a-b929-742e8b1b6859","name":"Send message","type":"n8n-nodes-base.whatsApp","position":[840,1360],"webhookId":"23834751-5066-48ba-8e19-549680df2b27","parameters":{"textBody":"={{ $json.output }}","operation":"send","phoneNumberId":"470271332838881","additionalFields":{},"recipientPhoneNumber":"={{ $('WhatsApp Trigger').item.json.messages[0].from }}"},"credentials":{"whatsAppApi":{"id":"HDUOWQXeRXMVjo0Z","name":"WhatsApp account"}},"typeVersion":1},{"id":"046328e9-e948-479c-ac42-567877350f1e","name":"Send audio","type":"n8n-nodes-base.whatsApp","position":[1260,1080],"webhookId":"d18b2c98-84e4-43cf-a532-0c47d5161684","parameters":{"mediaPath":"useMedian8n","operation":"send","messageType":"audio","phoneNumberId":"470271332838881","additionalFields":{},"recipientPhoneNumber":"={{ $('Input type').item.json.contacts[0].wa_id }}"},"credentials":{"whatsAppApi":{"id":"HDUOWQXeRXMVjo0Z","name":"WhatsApp account"}},"typeVersion":1},{"id":"aa20a408-42ab-4011-9cea-331e23cda4ce","name":"Incorrect format","type":"n8n-nodes-base.whatsApp","position":[500,700],"webhookId":"23834751-5066-48ba-8e19-549680df2b27","parameters":{"textBody":"=Sorry but you can only send PDF files","operation":"send","phoneNumberId":"470271332838881","additionalFields":{},"recipientPhoneNumber":"={{ $('WhatsApp Trigger').item.json.messages[0].from }}"},"credentials":{"whatsAppApi":{"id":"HDUOWQXeRXMVjo0Z","name":"WhatsApp account"}},"typeVersion":1},{"id":"23b3750d-3638-4fd0-bab8-6082f53f19f9","name":"Text","type":"n8n-nodes-base.set","position":[1240,-520],"parameters":{"options":{},"assignments":{"assignments":[{"id":"c53cd9f9-77c1-4331-98ff-bfc9bdf95a3c","name":"text","type":"string","value":"={{ $('WhatsApp Trigger').item.json.messages[0].text.body }}"}]}},"typeVersion":3.4},{"id":"435c020b-826b-4946-b19e-f9663f4f9f23","name":"Audio","type":"n8n-nodes-base.set","position":[1240,-180],"parameters":{"options":{},"assignments":{"assignments":[{"id":"219577d5-b028-48fc-90be-980f4171ab68","name":"text","type":"string","value":"={{ $json.text }}"}]}},"typeVersion":3.4},{"id":"0139bb33-651e-4f37-901d-ccc705c9833a","name":"Image","type":"n8n-nodes-base.set","position":[1220,120],"parameters":{"options":{},"assignments":{"assignments":[{"id":"67552183-de2e-494a-878e-c2948e8cb6bb","name":"text","type":"string","value":"=User request on the image:\n{{ \"Describe the following image\" || $('WhatsApp Trigger').item.json.messages[0].image.caption }}\n\nImage description:\n{{ $json.content }}"}]}},"typeVersion":3.4},{"id":"d66b7190-f83b-483e-b3f3-8c220e2c815f","name":"File","type":"n8n-nodes-base.set","position":[1240,460],"parameters":{"options":{},"assignments":{"assignments":[{"id":"67552183-de2e-494a-878e-c2948e8cb6bb","name":"text","type":"string","value":"=User request on the file:\n{{ \"Describe this file\" || $('Only PDF File').item.json.messages[0].document.caption }}\n\nFile content:\n{{ $json.text }}"}]}},"typeVersion":3.4},{"id":"20239933-418c-436f-b15b-c293043a0328","name":"Not supported","type":"n8n-nodes-base.whatsApp","position":[-260,360],"webhookId":"23834751-5066-48ba-8e19-549680df2b27","parameters":{"textBody":"=You can only send text messages, images, audio files and PDF documents.","operation":"send","phoneNumberId":"470271332838881","additionalFields":{},"recipientPhoneNumber":"={{ $('WhatsApp Trigger').item.json.messages[0].from }}"},"credentials":{"whatsAppApi":{"id":"HDUOWQXeRXMVjo0Z","name":"WhatsApp account"}},"typeVersion":1},{"id":"117fd705-1f64-4bcc-88db-357df679fa3d","name":"Get Image Url","type":"n8n-nodes-base.whatsApp","position":[480,120],"webhookId":"280bd5de-32d7-4d8f-93d2-e91e3b0bc161","parameters":{"resource":"media","operation":"mediaUrlGet","mediaGetId":"={{ $('WhatsApp Trigger').item.json.messages[0].image.id }}"},"credentials":{"whatsAppApi":{"id":"HDUOWQXeRXMVjo0Z","name":"WhatsApp account"}},"typeVersion":1},{"id":"3bf7364c-6263-4825-aec5-693adaed7d03","name":"Get Audio Url","type":"n8n-nodes-base.whatsApp","position":[460,-180],"webhookId":"87caa300-7204-47b5-959a-94f4a8fbf8cf","parameters":{"resource":"media","operation":"mediaUrlGet","mediaGetId":"={{ $('WhatsApp Trigger').item.json.messages[0].audio.id }}"},"credentials":{"whatsAppApi":{"id":"HDUOWQXeRXMVjo0Z","name":"WhatsApp account"}},"typeVersion":1},{"id":"b23f8467-480a-45c1-a7df-e512290a8e13","name":"Generate Audio Response","type":"@n8n/n8n-nodes-langchain.openAi","position":[840,1080],"parameters":{"input":"={{ $('AI Agent1').item.json.output }}","voice":"onyx","options":{},"resource":"audio"},"credentials":{"openAiApi":{"id":"4zwP0MSr8zkNvvV9","name":"OpenAi account"}},"typeVersion":1.8},{"id":"0b139e60-fbf3-43ae-ae3f-40588f135443","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[120,-560],"parameters":{"width":1340,"height":240,"content":"## Text"},"typeVersion":1},{"id":"3622ad4c-79c7-479f-a050-ff21d3077c77","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[120,-240],"parameters":{"width":1340,"height":240,"content":"## Voice"},"typeVersion":1},{"id":"1f35e179-22d1-4019-a807-21803df51a46","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[120,80],"parameters":{"width":1340,"height":240,"content":"## Image"},"typeVersion":1},{"id":"314b8ae2-e518-44a3-80a5-dc8482ab1fa9","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[120,420],"parameters":{"width":1340,"height":240,"content":"## Document"},"typeVersion":1},{"id":"a55cc899-3490-4b7c-b793-4f20605fc711","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[120,960],"parameters":{"color":5,"width":1340,"height":600,"content":"## Response"},"typeVersion":1},{"id":"f37e975b-c112-4af8-badd-1fdbdb90d2f5","name":"From audio to audio?","type":"n8n-nodes-base.if","position":[580,1220],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"b9d1d759-f585-4791-a743-b9d72951e77c","operator":{"type":"object","operation":"exists","singleValue":true},"leftValue":"={{ $('WhatsApp Trigger').item.json.messages[0].audio }}","rightValue":""}]}},"typeVersion":2.2},{"id":"864be43a-e280-4c6d-bab4-878b88304807","name":"Input type","type":"n8n-nodes-base.switch","position":[-420,40],"parameters":{"rules":{"values":[{"outputKey":"Text","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"08fd0c80-307e-4f45-b1de-35192ee4ec5e","operator":{"type":"string","operation":"exists","singleValue":true},"leftValue":"={{ $json.messages[0].text.body }}","rightValue":""}]},"renameOutput":true},{"outputKey":"Voice","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"b7b64446-f1ea-4622-990c-22f3999a8269","operator":{"type":"object","operation":"exists","singleValue":true},"leftValue":"={{ $json.messages[0].audio }}","rightValue":""}]},"renameOutput":true},{"outputKey":"Image","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"202af928-a324-411a-bf15-68a349e7bf9e","operator":{"type":"object","operation":"exists","singleValue":true},"leftValue":"={{ $json.messages[0].image }}","rightValue":""}]},"renameOutput":true},{"outputKey":"Document","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"c63299e9-6069-4bc6-afb9-7beebf6e3d69","operator":{"type":"object","operation":"exists","singleValue":true},"leftValue":"={{ $json.messages[0].document }}","rightValue":""}]},"renameOutput":true}]},"options":{"fallbackOutput":"extra"}},"typeVersion":3.2},{"id":"cf327372-d2cc-40db-a057-9bfb10d6a520","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[-1580,-1140],"parameters":{"color":3,"width":780,"height":2680,"content":"How to obtain Whatsapp API?\n\n\n### ✅ Prerequisites\nBefore you begin, make sure you have:\n- A **Meta Business Account**\n- A **Facebook Developer Account**\n- A **Verified Business**\n- A **Phone Number** to link to WhatsApp\n- Access to **Meta's Graph API Explorer** or **Meta for Developers portal**\n\n---\n\n### 🪜 STEP 1: Create a Meta App\n\n1. Go to [https://developers.facebook.com/apps](https://developers.facebook.com/apps)\n2. Click **“Create App”**\n3. Choose **\"Business\"** as the app type, then click **Next**\n4. Give your app a name and enter a contact email\n5. Choose your Business Account (or create one)\n6. Click **Create App**\n\n---\n\n### 🪜 STEP 2: Add WhatsApp Product\n\n1. In your app dashboard, scroll down to **\"Add a Product\"**\n2. Find **\"WhatsApp\"** and click **“Set Up”**\n3. Link your **Business Manager Account**\n\n---\n\n### 🪜 STEP 3: Create a WhatsApp Business Account (if needed)\n\n1. If you haven’t already, go to [https://business.facebook.com/](https://business.facebook.com/)\n2. Click **“Create Account”**, and complete your business information\n3. Go to **Business Settings > Accounts > WhatsApp Accounts**\n4. Add a **Phone Number** (you'll receive a verification code)\n\n---\n\n### 🪜 STEP 4: Generate a Temporary Access Token (for development)\n\n1. In the **App Dashboard**, go to **WhatsApp > Getting Started**\n2. Choose your test phone number\n3. Copy the **temporary access token** (valid for 24 hours)\n4. Copy the **Phone Number ID** and **WhatsApp Business Account ID**\n\n✅ Save these 3 values:\n- **Access Token**\n- **Phone Number ID**\n- **WABA ID**\n\n📝 Tip: For production, you will later need to create a **permanent token** (see step 7).\n\n---\n\n### 🪜 STEP 5: Set Up a Webhook URL (n8n)\n\n1. In n8n, set up a **Webhook node** (or use the `WhatsApp Trigger` node)\n2. Copy the webhook URL\n3. In the Meta Developer Dashboard:\n   - Go to **WhatsApp > Configuration**\n   - Click **“Edit Callback URL”**\n   - Paste your n8n webhook URL and add a random **verify token**\n4. In n8n, configure your webhook to respond to the verification request\n\n---\n\n### 🪜 STEP 6: Subscribe to Webhook Fields\n\n1. Still under **WhatsApp > Configuration**, click **\"Manage Subscriptions\"**\n2. Enable:\n   - `messages`\n   - `message_status`\n   - (Optionally `message_template_status_update`)\n\n---\n\n### 🪜 STEP 7: (Optional but recommended) Generate a Permanent Token\n\n1. Go to [https://developers.facebook.com/tools/access_token/](https://developers.facebook.com/tools/access_token/)\n2. Select your app\n3. Click **Get Token > System User Token**\n4. Select the permissions:\n   - `whatsapp_business_management`\n   - `whatsapp_business_messaging`\n   - `business_management`\n5. Click **Generate Token**\n6. Copy and securely store this token\n\n---\n\n### 🪜 STEP 8: Configure Credentials in n8n\n\n1. Go to **n8n > Settings > Credentials**\n2. Create new credentials of type **HTTP Header Auth**\n   - **Name:** WhatsApp\n   - **Header Name:** `Authorization`\n   - **Value:** `Bearer <your_access_token>`\n3. Save\n\nThen, in your workflows:\n- Use the HTTP Request node or WhatsApp node\n- Set the `phone_number_id` in the node parameters\n- Connect it to your WhatsApp credential\n\n---\n\n### 🧪 STEP 9: Test the Connection\n\n1. Use a WhatsApp number to send a message to your business phone\n2. Your n8n workflow should be triggered\n3. You can now send and receive messages programmatically 🎉\n"},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"4dfe4c80-3a9a-4292-bcb2-3f68bbea5a3a","connections":{"File":{"main":[[{"node":"AI Agent1","type":"main","index":0}]]},"Text":{"main":[[{"node":"AI Agent1","type":"main","index":0}]]},"Audio":{"main":[[{"node":"AI Agent1","type":"main","index":0}]]},"Image":{"main":[[{"node":"AI Agent1","type":"main","index":0}]]},"AI Agent1":{"main":[[{"node":"From audio to audio?","type":"main","index":0}]]},"Input type":{"main":[[{"node":"Text","type":"main","index":0}],[{"node":"Get Audio Url","type":"main","index":0}],[{"node":"Get Image Url","type":"main","index":0}],[{"node":"Only PDF File","type":"main","index":0}],[{"node":"Not supported","type":"main","index":0}]]},"Get File Url":{"main":[[{"node":"Download File","type":"main","index":0}]]},"Analyze Image":{"main":[[{"node":"Image","type":"main","index":0}]]},"Download File":{"main":[[{"node":"Extract from File","type":"main","index":0}]]},"Get Audio Url":{"main":[[{"node":"Download Audio","type":"main","index":0}]]},"Get Image Url":{"main":[[{"node":"Download Image","type":"main","index":0}]]},"Only PDF File":{"main":[[{"node":"Get File Url","type":"main","index":0}],[{"node":"Incorrect format","type":"main","index":0}]]},"Simple Memory":{"ai_memory":[[{"node":"AI Agent1","type":"ai_memory","index":0}]]},"Download Audio":{"main":[[{"node":"Transcribe Audio","type":"main","index":0}]]},"Download Image":{"main":[[{"node":"Analyze Image","type":"main","index":0}]]},"Transcribe Audio":{"main":[[{"node":"Audio","type":"main","index":0}]]},"WhatsApp Trigger":{"main":[[{"node":"Input type","type":"main","index":0}]]},"Extract from File":{"main":[[{"node":"File","type":"main","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"AI Agent1","type":"ai_languageModel","index":0}]]},"From audio to audio?":{"main":[[{"node":"Generate Audio Response","type":"main","index":0}],[{"node":"Send message","type":"main","index":0}]]},"Fix mimeType for Audio":{"main":[[{"node":"Send audio","type":"main","index":0}]]},"Generate Audio Response":{"main":[[{"node":"Fix mimeType for Audio","type":"main","index":0}]]}}}


name: Extract Business Leads from Google Maps with Dumpling AI to Google Sheets
author_name: Yang
author_username: yang
nodes_used: ["n8n-nodes-base.googleSheets","n8n-nodes-base.httpRequest"]
categories: []
created_at: 2025-04-17T20:51:09.545Z
updated_at: 2025-04-17T20:51:09.545Z
url: https://n8n.io/workflows/3593
scraped_at: 2025-07-06 21:16:30
description:
  Who is this for?

  This workflow is built for marketers, sales teams, agencies, virtual assistants, and anyone who regularly researches or contacts local businesses. It's ideal for building lead lists, tracking competitors, or creating location-specific outreach campaigns.

  What problem is this workflow solving?

  Instead of manually searching Google Maps and copying business info into spreadsheets, this automation pulls structured business data (e.g. restaurants, gyms, service providers) and logs it directly into Google Sheets. It saves hours of work and ensures cleaner, more usable data.

  What this workflow does

  The workflow takes a Google Maps search query (like "best restaurants in New York") and sends it to Dumpling AI. It returns a list of places including their name, address, website, phone number, rating, and more. Each result is split into a row and automatically added to a Google Sheet.

  Setup

  Dumpling AI  
     Sign up at Dumpling AI  
     Generate your API key  
     In the HTTP Request node, select Header Auth and paste your key in the Authorization field

  Google Sheets  
     Create a sheet with tab name Leads  
     Add the following column headers to row 1:  
       Name, Address, Phone number, Website, Rating, Price Level, Type, Booking Link, Position  
     Connect your Google Sheets account and link this sheet in the node

  Customize the Query  
     In the HTTP node, replace the query string (e.g., "best+restaurants+in+New+York") with your own search term

  Run It  
     Use the manual trigger to test  
     Optionally swap in a Schedule or Webhook node to run it automatically

  How to customize this workflow to your needs

  Change the search query to target different cities or business types  
  Use filters to only save leads with a minimum rating or price level  
  Add GPT to summarize listings or qualify leads  
  Swap Google Sheets for Airtable or a CRM system for deeper integration

workflow_json:
  {"id":"YZpFvpXOTYkBpiUU","meta":{"instanceId":"a1ae5c8dc6c65e674f9c3947d083abcc749ef2546dff9f4ff01de4d6a36ebfe6"},"name":"Extract Business Leads from Google Maps with Dumpling AI to Google Sheets","tags":[{"id":"TlcNkmb96fUfZ2eA","name":"Tutorials","createdAt":"2025-04-15T17:02:00.249Z","updatedAt":"2025-04-15T17:02:00.249Z"}],"nodes":[{"id":"3a49e594-6c62-4128-825e-99cdfd7e6ed5","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-660,-200],"parameters":{"width":600,"height":700,"content":"#### 🔍 Workflow Goal\nAutomatically search Google Maps using Dumpling AI based on a keyword (e.g., best restaurants in New York), extract results, and log them into a structured Google Sheet.\n\n## 🚀 Workflow Steps\n1. **Manual Trigger**\n   - Starts the workflow when testing manually.\n\n2. **Dumpling AI Google Search**\n   - Sends a POST request to Dumpling AI to search for locations on Google Maps based on your query.\n\n3. **Split Out Node**\n   - Breaks the `places[]` array into individual items so each result can be handled separately.\n\n4. **Google Sheets Node**\n   - Appends each place’s data (name, address, phone, website, rating, etc.) into a specific tab of your Google Sheets.\n\n##### 🧠 Notes\n- The search query is currently set to: `\"best+restaurants+in+New+York\"`\n- Output columns include rating, price level, website, phone, booking links, etc.\n- Each run consumes Dumpling AI credits per query.\n- You can customize search keywords or location in the HTTP Request body.\n\n#### ✅ Tip\nTo automate this regularly, change the trigger node to a **Schedule Trigger** and add dynamic query input using a **Set** or **Webhook** node.\n\n"},"typeVersion":1},{"id":"0a4ee00a-19cf-4d1e-a145-b5c5619ce636","name":"Trigger: Manual Test Run","type":"n8n-nodes-base.manualTrigger","position":[0,120],"parameters":{},"typeVersion":1},{"id":"26fdb640-93a0-4312-beaf-4c07fff87751","name":"Search Google Maps via Dumpling AI","type":"n8n-nodes-base.httpRequest","position":[220,120],"parameters":{"url":"https://app.dumplingai.com/api/v1/search-maps","method":"POST","options":{},"jsonBody":"={\n  \"query\": \"best+restaurants+in+New+York\", \n  \"language\": \"en\"\n}","sendBody":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"xamyMqCpAech5BeT","name":"Header Auth account"}},"typeVersion":4.2},{"id":"d3fafc2c-0b9d-4e83-83aa-de24d11fc0e1","name":"Split Places List for Processing","type":"n8n-nodes-base.splitOut","position":[440,120],"parameters":{"options":{},"fieldToSplitOut":"places"},"typeVersion":1},{"id":"83b48532-b1fb-4ab3-9596-6e96526bfd49","name":"Save Results to Google Sheet (Place Info)","type":"n8n-nodes-base.googleSheets","position":[660,120],"parameters":{"columns":{"value":{"type":"={{ $json.type }}","Name ":"={{ $json.title }}","rating":"={{ $json.rating }}","Address":"={{ $json.address }}","Website":"={{ $json.website }}","Position":"={{ $json.position }}","priceLevel":"={{ $json.priceLevel }}","Booking Link":"={{ $json.bookingLinks[0] }}","Phone number":"={{ $json.phoneNumber }}"},"schema":[{"id":"Name ","type":"string","display":true,"required":false,"displayName":"Name ","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Address","type":"string","display":true,"required":false,"displayName":"Address","defaultMatch":false,"canBeUsedToMatch":true},{"id":"rating","type":"string","display":true,"required":false,"displayName":"rating","defaultMatch":false,"canBeUsedToMatch":true},{"id":"priceLevel","type":"string","display":true,"required":false,"displayName":"priceLevel","defaultMatch":false,"canBeUsedToMatch":true},{"id":"type","type":"string","display":true,"required":false,"displayName":"type","defaultMatch":false,"canBeUsedToMatch":true},{"id":"I use an HTTP request in n8n, I returned up to 10","type":"string","display":true,"removed":false,"required":false,"displayName":"I use an HTTP request in n8n, I returned up to 10","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Booking Link","type":"string","display":true,"required":false,"displayName":"Booking Link","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Website","type":"string","display":true,"removed":false,"required":false,"displayName":"Website","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Phone number","type":"string","display":true,"removed":false,"required":false,"displayName":"Phone number","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Position","type":"string","display":true,"removed":false,"required":false,"displayName":"Position","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"append","sheetName":{"__rl":true,"mode":"list","value":"","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1pb4WLqv2EruLM1z9-utehcINolSj0vlUqZionyLoRUs/edit#gid=1069765279","cachedResultName":"Google Maps"},"documentId":{"__rl":true,"mode":"list","value":"","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1pb4WLqv2EruLM1z9-utehcINolSj0vlUqZionyLoRUs/edit?usp=drivesdk","cachedResultName":"Places"}},"credentials":{"googleSheetsOAuth2Api":{"id":"GaJqJHuS5mQxap7q","name":"Google Sheets account"}},"typeVersion":4.5}],"active":false,"pinData":{"Search Google Maps via Dumpling AI":[{"json":{"ll":"@40.7381076,-73.9928178,13z","places":[{"cid":"14366891226444778354","fid":"0x89c25993862d9fab:0xc76173738eeacb72","type":"French restaurant","title":"Boucherie West Village","types":["French restaurant"],"rating":4.7,"address":"99 7th Ave S, New York, NY 10014","placeId":"ChIJq58thpNZwokRcsvqjnNzYcc","website":"https://www.boucherieus.com/","latitude":40.733047,"position":1,"longitude":-74.0028772,"priceLevel":"$50–100","description":"Two-floor bistro serving dry-aged steaks and other French fare, with a bar that's strong on absinthe.","phoneNumber":"(212) 837-1616","ratingCount":6138,"bookingLinks":["https://www.opentable.com/restaurant/profile/346609?ref=1068","https://www.google.com/maps/reserve/v/dine/c/ECNC2O-BTkI?source=pa&opi=79508299"],"openingHours":{"Friday":"11 AM–12 AM","Monday":"11 AM–12 AM","Sunday":"10 AM–12 AM","Tuesday":"11 AM–12 AM","Saturday":"10 AM–12 AM","Thursday":"11 AM–12 AM","Wednesday":"11 AM–12 AM"},"thumbnailUrl":"https://lh3.googleusercontent.com/p/AF1QipOIjrjzX_gCxhEnqpn_1KwaVrrTIdgTOZv9FrJY"},{"cid":"13799948123386944265","fid":"0x89c259892cccb7b7:0xbf8343b3f54c1b09","type":"French restaurant","title":"Balthazar","types":["French restaurant","Bakery","Seafood restaurant"],"rating":4.4,"address":"80 Spring St, New York, NY 10012","placeId":"ChIJt7fMLIlZwokRCRtM9bNDg78","website":"http://www.balthazarny.com/","latitude":40.722668,"position":2,"longitude":-73.99822979999999,"priceLevel":"$50–100","description":"Iconic French brasserie with steak frites, brunch & pastries in a classy space with red banquettes.","phoneNumber":"(212) 965-1414","ratingCount":7020,"bookingLinks":["https://resy.com/cities/new-york-ny/venues/balthazar-nyc?rwg_token=AAiGsoaFc5Wv1TTL-PUVXIuvsKOdGTH7uz27wICtr-QZZbjYmtOgFXVt1boLwB31S7tdch1sPVym_QaoNS3VfiwZhmQrQOLWbA%3D%3D"],"openingHours":{"Friday":"8 AM–12 AM","Monday":"8 AM–12 AM","Sunday":"9 AM–12 AM","Tuesday":"8 AM–12 AM","Saturday":"9 AM–12 AM","Thursday":"8 AM–12 AM","Wednesday":"8 AM–12 AM"},"thumbnailUrl":"https://lh3.googleusercontent.com/p/AF1QipMPYp_acWrBa6fa2F0TsosyYI-wDt_rL9wFVcvC"},{"cid":"3132777853886366741","fid":"0x89c259a1820824bd:0x2b79dcdc251b8415","type":"Restaurant","title":"Gramercy Tavern","types":["Restaurant","American restaurant","Bar","Fine dining restaurant","Lunch restaurant","New American restaurant"],"rating":4.6,"address":"42 E 20th St, New York, NY 10003","placeId":"ChIJvSQIgqFZwokRFYQbJdzceSs","website":"http://www.gramercytavern.com/?utm_source=GoogleBusinessProfile&utm_medium=Website&utm_campaign=MapLabs","latitude":40.7384555,"position":3,"longitude":-73.98850639999999,"priceLevel":"$100+","description":"Danny Meyer's Flatiron District tavern with a fixed-price-only dining room & a bustling bar area.","phoneNumber":"(212) 477-0777","ratingCount":4319,"openingHours":{"Friday":"11:30 AM–10:30 PM","Monday":"11:30 AM–10:30 PM","Sunday":"11:30 AM–10:30 PM","Tuesday":"11:30 AM–10:30 PM","Saturday":"11:30 AM–10:30 PM","Thursday":"11:30 AM–10:30 PM","Wednesday":"11:30 AM–10:30 PM"},"thumbnailUrl":"https://lh3.googleusercontent.com/p/AF1QipP-6Q-5hmlzRWjc4E5FDa7K2OeNqJS3BxQMp_ln"},{"cid":"7298340055988969067","fid":"0x89c25947ea10b457:0x6548e99cd73a1e6b","type":"French restaurant","title":"Le Bernardin","types":["French restaurant","Fine dining restaurant","Restaurant"],"rating":4.6,"address":"155 W 51st St, New York, NY 10019","placeId":"ChIJV7QQ6kdZwokRax4615zpSGU","website":"https://www.le-bernardin.com/home","latitude":40.7614218,"position":4,"longitude":-73.9817558,"priceLevel":"$100+","description":"Elite French restaurant offers chef Eric Ripert's refined seafood, expert service & luxurious decor.","phoneNumber":"(212) 554-1515","ratingCount":3762,"openingHours":{"Friday":"12–2:30 PM, 5–11 PM","Monday":"12–2:30 PM, 5–10:30 PM","Sunday":"Closed","Tuesday":"12–2:30 PM, 5–10:30 PM","Saturday":"5–11 PM","Thursday":"12–2:30 PM, 5–10:30 PM","Wednesday":"12–2:30 PM, 5–10:30 PM"},"thumbnailUrl":"https://lh3.googleusercontent.com/p/AF1QipMC-dJ9gfcpFIX8PS-8yPYhjCMfjl6q35zAn1t8"},{"cid":"3442553861032018645","fid":"0x89c259a1ec5f5573:0x2fc6687f46f682d5","type":"French restaurant","title":"Boucherie Union Square","types":["French restaurant","Steak house"],"rating":4.7,"address":"225 Park Ave S, New York, NY 10003","placeId":"ChIJc1Vf7KFZwokR1YL2Rn9oxi8","website":"https://www.boucherieus.com/","latitude":40.7372552,"position":5,"longitude":-73.9882246,"priceLevel":"$50–100","description":"Bistro for dry-aged steaks and other French fare, with a bar that's strong on absinthe.","phoneNumber":"(212) 353-0200","ratingCount":3890,"bookingLinks":["https://www.opentable.com/restaurant/profile/1004143?ref=1068","https://www.google.com/maps/reserve/v/dine/c/4rmpVcuKUVY?source=pa&opi=79508299"],"openingHours":{"Friday":"11 AM–12 AM","Monday":"11 AM–12 AM","Sunday":"11 AM–12 AM","Tuesday":"11 AM–12 AM","Saturday":"11 AM–12 AM","Thursday":"11 AM–12 AM","Wednesday":"11 AM–12 AM"},"thumbnailUrl":"https://lh3.googleusercontent.com/p/AF1QipOa4JTlKpkY1_xlxnfahmd6H2FquTfCHzJJWto7"},{"cid":"5472139628830047106","fid":"0x89c2598c596508a3:0x4bf0f1fff1c0bb82","type":"Italian restaurant","title":"Piccola Cucina Osteria Siciliana","types":["Italian restaurant","Sicilian restaurant"],"rating":4.6,"address":"196 Spring St, New York, NY 10012","placeId":"ChIJowhlWYxZwokRgrvA8f_x8Es","website":"http://www.piccolacucinagroup.com/","latitude":40.7250308,"position":6,"longitude":-74.0032774,"priceLevel":"$30–50","description":"Simple Italian outpost serving salads & homestyle pastas along with an extensive wine list.","phoneNumber":"(646) 478-7488","ratingCount":2199,"bookingLinks":["https://www.opentable.com/restaurant/profile/105838?ref=1068","https://www.google.com/maps/reserve/v/dine/c/Psao8Sv98GA?source=pa&opi=79508299"],"openingHours":{"Friday":"11:30 AM–11 PM","Monday":"11:30 AM–11 PM","Sunday":"11:30 AM–11 PM","Tuesday":"11:30 AM–11 PM","Saturday":"11:30 AM–11 PM","Thursday":"11:30 AM–11 PM","Wednesday":"11:30 AM–11 PM"},"thumbnailUrl":"https://lh3.googleusercontent.com/p/AF1QipMk3ppXOP_aW2Yrb-krDInf1tjUY6K8adRhg5XT"},{"cid":"12751425680490052044","fid":"0x89c258fbc4a06f31:0xb0f62a18b16739cc","type":"Restaurant","title":"The Modern","types":["Restaurant","American restaurant","Fine dining restaurant","French restaurant","Lunch restaurant","New American restaurant"],"rating":4.6,"address":"9 W 53rd St, New York, NY 10019","placeId":"ChIJMW-gxPtYwokRzDlnsRgq9rA","website":"https://www.themodernnyc.com/?utm_source=GoogleBusinessProfile&utm_medium=Website&utm_campaign=MapLabs","latitude":40.761081,"position":7,"longitude":-73.976753,"priceLevel":"$100+","description":"French/New American fare in a modernist space with garden views at the Museum of Modern Art.","phoneNumber":"(212) 333-1220","ratingCount":2477,"bookingLinks":["https://resy.com/cities/new-york-ny/venues/the-modern?rwg_token=AAiGsobdabLYAQWI0wKR3bXQzJR2xZTshjVp3Uxere391AzDkVal9-Ur8wUduvr_d8bjXUYgsQ2UBTV3fUaQ4cK8AL4sIDHf9g%3D%3D","https://www.google.com/maps/reserve/v/dine/c/IqhMF1j7prg?source=pa&opi=79508299"],"openingHours":{"Friday":"12–2 PM, 5–9 PM","Monday":"12–2 PM, 5:30–9 PM","Sunday":"12–2 PM","Tuesday":"12–2 PM, 5:30–9 PM","Saturday":"12–2 PM, 5–9 PM","Thursday":"12–2 PM, 5:30–9 PM","Wednesday":"12–2 PM, 5:30–9 PM"},"thumbnailUrl":"https://lh3.googleusercontent.com/p/AF1QipPFegcqnHSeW_Ngyd9kDff_bofmJx6cA0Woh95o"},{"cid":"12769026215543562150","fid":"0x89c259941967edc9:0xb134b1b0991fdfa6","type":"French restaurant","title":"Petite Boucherie","types":["French restaurant"],"rating":4.7,"address":"First Floor, 14 Christopher St, New York, NY 10014","placeId":"ChIJye1nGZRZwokRpt8fmbCxNLE","website":"https://www.boucherieus.com/","latitude":40.733870599999996,"position":8,"longitude":-74.0004319,"priceLevel":"$50–100","description":"Parisian-style cafe serving comforting French fare in a snug space with an open kitchen.","phoneNumber":"(646) 756-4145","ratingCount":1787,"bookingLinks":["https://www.opentable.com/restaurant/profile/157048?ref=1068","https://www.google.com/maps/reserve/v/dine/c/E_LrlO_LqlY?source=pa&opi=79508299"],"openingHours":{"Friday":"11 AM–12 AM","Monday":"11 AM–12 AM","Sunday":"10 AM–12 AM","Tuesday":"11 AM–12 AM","Saturday":"10 AM–12 AM","Thursday":"11 AM–12 AM","Wednesday":"11 AM–12 AM"},"thumbnailUrl":"https://lh3.googleusercontent.com/p/AF1QipO9zp1up2rYreJpE-GCYOSwGAiFxyl_iQO2No91"},{"cid":"6967162704871465124","fid":"0x89c25bc797d635a1:0x60b055910436a0a4","type":"Restaurant","title":"Manhatta","types":["Restaurant","Bar","Cocktail bar","Event venue","Fine dining restaurant","New American restaurant","Wine bar"],"rating":4.7,"address":"28 Liberty St 60th floor, New York, NY 10005","placeId":"ChIJoTXWl8dbwokRpKA2BJFVsGA","website":"https://www.manhattarestaurant.com/?utm_source=GoogleBusinessProfile&utm_medium=Website&utm_campaign=MapLabs","latitude":40.707997399999996,"position":9,"longitude":-74.00888259999999,"priceLevel":"$100+","description":"Set on the 60th floor, this ritzy, high-end restaurant features New American cuisine and city views.","phoneNumber":"(212) 230-5788","ratingCount":2764,"bookingLinks":["https://www.google.com/maps/reserve/v/dine/c/pyjjUZqJ9lQ?source=pa&opi=79508299"],"openingHours":{"Friday":"11:30 AM–10:30 PM","Monday":"11:30 AM–9:30 PM","Sunday":"11:30 AM–9:30 PM","Tuesday":"11:30 AM–9:30 PM","Saturday":"11:30 AM–10:30 PM","Thursday":"11:30 AM–9:30 PM","Wednesday":"11:30 AM–9:30 PM"},"thumbnailUrl":"https://lh3.googleusercontent.com/p/AF1QipObmWt-zmje4apfGS8o6xO7AQ2Y38KE_0Nzlo3L"},{"cid":"8813431814842646952","fid":"0x89c25986daaa7ce7:0x7a4f998a3fd281a8","type":"American restaurant","title":"Russ & Daughters Cafe","types":["American restaurant","Breakfast restaurant","Brunch restaurant","Jewish restaurant","Lunch restaurant","Restaurant"],"rating":4.6,"address":"127 Orchard St, New York, NY 10002","placeId":"ChIJ53yq2oZZwokRqIHSP4qZT3o","website":"https://russanddaughterscafe.com/","latitude":40.7196181,"position":10,"longitude":-73.9895779,"priceLevel":"$20–30","description":"From a legendary appetizing shop comes this retro, full-service outpost serving Jewish comfort food.","phoneNumber":"(212) 475-4881","ratingCount":3319,"openingHours":{"Friday":"8:30 AM–3:30 PM","Monday":"8:30 AM–2:30 PM","Sunday":"8:30 AM–3:30 PM","Tuesday":"8:30 AM–2:30 PM","Saturday":"8:30 AM–3:30 PM","Thursday":"8:30 AM–2:30 PM","Wednesday":"8:30 AM–2:30 PM"},"thumbnailUrl":"https://lh3.googleusercontent.com/p/AF1QipPCCdN4u4VxmoNVS3aFIXzgR3lvU2XOcmHf_our"},{"cid":"2975234135803511093","fid":"0x89c25996bd0915fd:0x294a27aedc2f4135","type":"Italian restaurant","title":"OLIO E PIÙ","types":["Italian restaurant","Restaurant"],"rating":4.7,"address":"3 Greenwich Ave, New York, NY 10014","placeId":"ChIJ_RUJvZZZwokRNUEv3K4nSik","website":"https://www.olioepiu.com/","latitude":40.7338208,"position":11,"longitude":-73.99979309999999,"priceLevel":"$50–100","description":"Naples meets NYC at this trattoria with thin-crust pizza, Italian wines & ample sidewalk seating.","phoneNumber":"(212) 243-6546","ratingCount":8301,"bookingLinks":["https://www.opentable.com/restaurant/profile/55837?ref=1068","https://www.google.com/maps/reserve/v/dine/c/2Ujk-qKjG0Y?source=pa&opi=79508299"],"openingHours":{"Friday":"11 AM–12 AM","Monday":"11 AM–12 AM","Sunday":"10 AM–12 AM","Tuesday":"11 AM–12 AM","Saturday":"10 AM–12 AM","Thursday":"11 AM–12 AM","Wednesday":"11 AM–12 AM"},"thumbnailUrl":"https://lh3.googleusercontent.com/p/AF1QipNdy8VOWBkFpkuFzY4WdZ0v7TRcquFXviC1hFyW"},{"cid":"5618924015427954654","fid":"0x89c2585492286ae9:0x4dfa6d9f277ea7de","type":"Taco restaurant","title":"LOS TACOS No.1","types":["Taco restaurant","Mexican restaurant"],"rating":4.8,"address":"229 W 43rd St, New York, NY 10036","placeId":"ChIJ6WooklRYwokR3qd-J59t-k0","website":"http://www.lostacos1.com/","latitude":40.757321399999995,"position":12,"longitude":-73.98765399999999,"priceLevel":"$10–20","description":"Small pit stop with standing tables serving authentic Mexican street food.","ratingCount":12659,"openingHours":{"Friday":"11 AM–11 PM","Monday":"11 AM–11 PM","Sunday":"11 AM–9 PM","Tuesday":"11 AM–11 PM","Saturday":"11 AM–11 PM","Thursday":"11 AM–11 PM","Wednesday":"11 AM–11 PM"},"thumbnailUrl":"https://lh3.googleusercontent.com/p/AF1QipPaLR3wTNi8SIIqvDFYGFJ-nG_sAiR6sZCOFqOZ"},{"cid":"16472713729583313083","fid":"0x89c259937f4eb1af:0xe49ad5dc628370bb","type":"Italian restaurant","title":"Via Carota","types":["Italian restaurant"],"rating":4.4,"address":"51 Grove St, New York, NY 10014","placeId":"ChIJr7FOf5NZwokRu3CDYtzVmuQ","website":"http://viacarota.com/","latitude":40.7331437,"position":13,"longitude":-74.0036671,"priceLevel":"$50–100","description":"Italian trattoria serving traditional plates & apéritifs in a rustic, cozy space.","phoneNumber":"(212) 255-1962","ratingCount":2842,"openingHours":{"Friday":"10 AM–11 PM","Monday":"11 AM–11 PM","Sunday":"10 AM–11 PM","Tuesday":"11 AM–11 PM","Saturday":"10 AM–11 PM","Thursday":"11 AM–11 PM","Wednesday":"11 AM–11 PM"},"thumbnailUrl":"https://lh3.googleusercontent.com/p/AF1QipOpMXlOGFvZovcoxb-XjqCV2kdYQHODTlpUbc8I"},{"cid":"9312603855358623759","fid":"0x89c259f337272b95:0x813d03ddbc95800f","type":"American restaurant","title":"RH Rooftop Restaurant at RH New York","types":["American restaurant","Restaurant"],"rating":4.4,"address":"9 9th Ave, New York, NY 10014","placeId":"ChIJlSsnN_NZwokRD4CVvN0DPYE","website":"http://www.rh.com/newyork/restaurant","latitude":40.73985,"position":14,"longitude":-74.00639,"priceLevel":"$50–100","description":"Glamorous rooftop restaurant offering American fare amid chandeliers, greenery, and skyline views.","phoneNumber":"(212) 217-2210","ratingCount":2176,"bookingLinks":["https://www.opentable.com/restaurant/profile/1050247?ref=1068","https://www.google.com/maps/reserve/v/dine/c/YEEToh7bBlo?source=pa&opi=79508299"],"openingHours":{"Friday":"11:30 AM–9 PM","Monday":"11:30 AM–9 PM","Sunday":"10 AM–9 PM","Tuesday":"11:30 AM–9 PM","Saturday":"10 AM–9 PM","Thursday":"11:30 AM–9 PM","Wednesday":"11:30 AM–9 PM"},"thumbnailUrl":"https://lh3.googleusercontent.com/p/AF1QipNrIo_odwUa7D5xnOrEfdeOq7vGMprNLMPnyOhT"},{"cid":"18303949408079626176","fid":"0x89c25b5ac3fc353f:0xfe04b102174ebfc0","type":"Taco restaurant","title":"LOS TACOS No.1","types":["Taco restaurant","Restaurant"],"rating":4.7,"address":"75 9th Ave, New York, NY 10011","placeId":"ChIJPzX8w1pbwokRwL9OFwKxBP4","website":"https://www.lostacos1.com/","latitude":40.742252099999995,"position":15,"longitude":-74.0059635,"priceLevel":"$10–20","description":"Bustling taqueria serving tacos, quesadillas & aguas frescas in a street-style setup (no seating).","ratingCount":4772,"openingHours":{"Friday":"11 AM–10 PM","Monday":"11 AM–10 PM","Sunday":"11 AM–9 PM","Tuesday":"11 AM–10 PM","Saturday":"11 AM–10 PM","Thursday":"11 AM–10 PM","Wednesday":"11 AM–10 PM"},"thumbnailUrl":"https://lh3.googleusercontent.com/p/AF1QipPqkAkh_eP9f-WUBiRoN-_nlyKVWCSTUp-47dpu"},{"cid":"1412917795118885020","fid":"0x89c2598c5dde0695:0x139bb13faae3a89c","type":"Italian restaurant","title":"Piccola Cucina Estiatorio","types":["Italian restaurant","Seafood market"],"rating":4.7,"address":"75 Thompson St, New York, NY 10012","placeId":"ChIJlQbeXYxZwokRnKjjqj-xmxM","website":"http://www.piccolacucinagroup.com/","latitude":40.7246336,"position":16,"longitude":-74.00297619999999,"priceLevel":"$30–50","phoneNumber":"(646) 781-9183","ratingCount":1660,"bookingLinks":["https://www.opentable.com/restaurant/profile/343939?ref=1068","https://www.google.com/maps/reserve/v/dine/c/pcvDAa-RKIU?source=pa&opi=79508299"],"openingHours":{"Friday":"11:30 AM–12 AM","Monday":"11:30 AM–11 PM","Sunday":"11:30 AM–11 PM","Tuesday":"11:30 AM–11 PM","Saturday":"11:30 AM–12 AM","Thursday":"11:30 AM–11 PM","Wednesday":"11:30 AM–11 PM"},"thumbnailUrl":"https://lh3.googleusercontent.com/p/AF1QipNoIV4fOazNCv4q04hA-CLCxMmuV9q3-ua81HR8"},{"cid":"6783566240304368229","fid":"0x89c258f62fec73a7:0x5e24118dffac8a65","type":"Fine dining restaurant","title":"Per Se","types":["Fine dining restaurant","French restaurant"],"rating":4.5,"address":"10 Columbus Cir, New York, NY 10019","placeId":"ChIJp3PsL_ZYwokRZYqs_40RJF4","website":"https://www.thomaskeller.com/perseny","latitude":40.768217799999995,"position":17,"longitude":-73.9828988,"priceLevel":"$100+","description":"Chef Thomas Keller's New American restaurant offers luxe fixed-price menus, with Central Park views.","phoneNumber":"(212) 823-9335","ratingCount":1863,"openingHours":{"Friday":"4:30–8:30 PM","Monday":"4:30–8:30 PM","Sunday":"4:30–8:30 PM","Tuesday":"4:30–8:30 PM","Saturday":"4:30–8:30 PM","Thursday":"4:30–8:30 PM","Wednesday":"4:30–8:30 PM"},"thumbnailUrl":"https://lh3.googleusercontent.com/p/AF1QipO7nQNiCyD5Fw4CUQ17RSfRfjX-pDQkD26wXJHy"},{"cid":"3538632692129109557","fid":"0x89c258f6339d1b6f:0x311bbfaf5cf09635","type":"American restaurant","title":"ROBERT","types":["American restaurant"],"rating":4.5,"address":"2 Columbus Cir, New York, NY 10019","placeId":"ChIJbxudM_ZYwokRNZbwXK-_GzE","website":"https://robertnyc.com/","latitude":40.767438,"position":18,"longitude":-73.9819871,"priceLevel":"$$$","description":"New American fare & city views in an arty space on the top-floor of the Museum of Arts & Design.","phoneNumber":"(212) 299-7730","ratingCount":1719,"bookingLinks":["https://www.opentable.com/r/robert-new-york"],"openingHours":{"Friday":"12–11 PM","Monday":"12–10 PM","Sunday":"11 AM–11 PM","Tuesday":"12–10 PM","Saturday":"11 AM–11 PM","Thursday":"12–10 PM","Wednesday":"12–10 PM"},"thumbnailUrl":"https://lh3.googleusercontent.com/p/AF1QipMn17D7rwlR14fK8bCmgxV_UqzsK4fBzNP6fFaw"},{"cid":"3545819340560108778","fid":"0x89c2598f7ff4aa09:0x313547e757cb8cea","type":"Restaurant","title":"Katz's Delicatessen","types":["Restaurant","American restaurant","Jewish restaurant","Deli","Sandwich shop"],"rating":4.5,"address":"205 E Houston St, New York, NY 10002","placeId":"ChIJCar0f49ZwokR6ozLV-dHNTE","website":"https://katzsdelicatessen.com/","latitude":40.722232999999996,"position":19,"longitude":-73.98742899999999,"priceLevel":"$20–30","description":"No-frills deli with theatrically cranky service serving mile-high sandwiches since 1888.","phoneNumber":"(212) 254-2246","ratingCount":44962,"openingHours":{"Friday":"8 AM–11:30 PM","Monday":"8 AM–11 PM","Sunday":"12 AM–11 PM","Tuesday":"8 AM–11 PM","Saturday":"Open 24 hours","Thursday":"8 AM–11 PM","Wednesday":"8 AM–11 PM"},"thumbnailUrl":"https://lh3.googleusercontent.com/p/AF1QipNedb29MPPEqzCoheQ79l26VPnn6dcTGtcvF4w7"},{"cid":"1614607817747620329","fid":"0x89c25a1f689722d3:0x16683d41746a61e9","type":"Cajun restaurant","title":"1803 NYC","types":["Cajun restaurant","Bar","Brunch restaurant","Creole restaurant","Event venue","Live music venue","Lunch restaurant","Restaurant","Seafood restaurant","Soul food restaurant"],"rating":4.5,"address":"82 Reade St, New York, NY 10007","placeId":"ChIJ0yKXaB9awokR6WFqdEE9aBY","website":"https://1803nyc.com/","latitude":40.7154539,"position":20,"longitude":-74.00733009999999,"priceLevel":"$30–50","description":"Elevated Cajun-Creole food and drinks served in a New Orleans's French quarters-inspired restaurant.","phoneNumber":"(212) 267-3000","ratingCount":1791,"bookingLinks":["https://1803nyc.com/#reservation","https://resy.com/cities/new-york-ny/venues/1803?rwg_token=AAiGsoZQZUVMZ4dhDz6Sg9qsvG6tjLIhQZvXBSU9opEklGTc20X2Oby6LmmRgAp1IrhjAUd79G_k3s0VP3tEuEu5J_T1DCCazwmMhQpGVRyVaiJWH8RBrM0%3D","https://www.google.com/maps/reserve/v/dine/c/knKVX6xdexM?source=pa&opi=79508299"],"openingHours":{"Friday":"11:30 AM–11 PM","Monday":"11:30 AM–11 PM","Sunday":"11 AM–11 PM","Tuesday":"11:30 AM–11 PM","Saturday":"11 AM–12 AM","Thursday":"11:30 AM–11 PM","Wednesday":"11:30 AM–11 PM"},"thumbnailUrl":"https://lh3.googleusercontent.com/p/AF1QipMD6CTvhAgGtyrqyIkqwTB_iiJh1FKAdDcV_XKA"}],"credits":3,"searchParameters":{"q":"best+restaurants+in+New+York","hl":"en","type":"maps","engine":"google"}}}],"Save Results to Google Sheet (Place Info)":[{"json":{"type":"French restaurant","Name ":"Boucherie West Village","rating":4.7,"Address":"99 7th Ave S, New York, NY 10014","Website":"https://www.boucherieus.com/","Position":1,"priceLevel":"$50–100","Description":"Two-floor bistro serving dry-aged steaks and other French fare, with a bar that's strong on absinthe.","Booking Link":"https://www.opentable.com/restaurant/profile/346609?ref=1068","Phone number":"(212) 837-1616"}},{"json":{"type":"French restaurant","Name ":"Balthazar","rating":4.4,"Address":"80 Spring St, New York, NY 10012","Website":"http://www.balthazarny.com/","Position":2,"priceLevel":"$50–100","Description":"Iconic French brasserie with steak frites, brunch & pastries in a classy space with red banquettes.","Booking Link":"https://resy.com/cities/new-york-ny/venues/balthazar-nyc?rwg_token=AAiGsoaFc5Wv1TTL-PUVXIuvsKOdGTH7uz27wICtr-QZZbjYmtOgFXVt1boLwB31S7tdch1sPVym_QaoNS3VfiwZhmQrQOLWbA%3D%3D","Phone number":"(212) 965-1414"}},{"json":{"type":"Restaurant","Name ":"Gramercy Tavern","rating":4.6,"Address":"42 E 20th St, New York, NY 10003","Website":"http://www.gramercytavern.com/?utm_source=GoogleBusinessProfile&utm_medium=Website&utm_campaign=MapLabs","Position":3,"priceLevel":"$100+","Description":"Danny Meyer's Flatiron District tavern with a fixed-price-only dining room & a bustling bar area.","Phone number":"(212) 477-0777"}},{"json":{"type":"French restaurant","Name ":"Le Bernardin","rating":4.6,"Address":"155 W 51st St, New York, NY 10019","Website":"https://www.le-bernardin.com/home","Position":4,"priceLevel":"$100+","Description":"Elite French restaurant offers chef Eric Ripert's refined seafood, expert service & luxurious decor.","Phone number":"(212) 554-1515"}},{"json":{"type":"French restaurant","Name ":"Boucherie Union Square","rating":4.7,"Address":"225 Park Ave S, New York, NY 10003","Website":"https://www.boucherieus.com/","Position":5,"priceLevel":"$50–100","Description":"Bistro for dry-aged steaks and other French fare, with a bar that's strong on absinthe.","Booking Link":"https://www.opentable.com/restaurant/profile/1004143?ref=1068","Phone number":"(212) 353-0200"}},{"json":{"type":"Italian restaurant","Name ":"Piccola Cucina Osteria Siciliana","rating":4.6,"Address":"196 Spring St, New York, NY 10012","Website":"http://www.piccolacucinagroup.com/","Position":6,"priceLevel":"$30–50","Description":"Simple Italian outpost serving salads & homestyle pastas along with an extensive wine list.","Booking Link":"https://www.opentable.com/restaurant/profile/105838?ref=1068","Phone number":"(646) 478-7488"}},{"json":{"type":"Restaurant","Name ":"The Modern","rating":4.6,"Address":"9 W 53rd St, New York, NY 10019","Website":"https://www.themodernnyc.com/?utm_source=GoogleBusinessProfile&utm_medium=Website&utm_campaign=MapLabs","Position":7,"priceLevel":"$100+","Description":"French/New American fare in a modernist space with garden views at the Museum of Modern Art.","Booking Link":"https://resy.com/cities/new-york-ny/venues/the-modern?rwg_token=AAiGsobdabLYAQWI0wKR3bXQzJR2xZTshjVp3Uxere391AzDkVal9-Ur8wUduvr_d8bjXUYgsQ2UBTV3fUaQ4cK8AL4sIDHf9g%3D%3D","Phone number":"(212) 333-1220"}},{"json":{"type":"French restaurant","Name ":"Petite Boucherie","rating":4.7,"Address":"First Floor, 14 Christopher St, New York, NY 10014","Website":"https://www.boucherieus.com/","Position":8,"priceLevel":"$50–100","Description":"Parisian-style cafe serving comforting French fare in a snug space with an open kitchen.","Booking Link":"https://www.opentable.com/restaurant/profile/157048?ref=1068","Phone number":"(646) 756-4145"}},{"json":{"type":"Restaurant","Name ":"Manhatta","rating":4.7,"Address":"28 Liberty St 60th floor, New York, NY 10005","Website":"https://www.manhattarestaurant.com/?utm_source=GoogleBusinessProfile&utm_medium=Website&utm_campaign=MapLabs","Position":9,"priceLevel":"$100+","Description":"Set on the 60th floor, this ritzy, high-end restaurant features New American cuisine and city views.","Booking Link":"https://www.google.com/maps/reserve/v/dine/c/pyjjUZqJ9lQ?source=pa&opi=79508299","Phone number":"(212) 230-5788"}},{"json":{"type":"American restaurant","Name ":"Russ & Daughters Cafe","rating":4.6,"Address":"127 Orchard St, New York, NY 10002","Website":"https://russanddaughterscafe.com/","Position":10,"priceLevel":"$20–30","Description":"From a legendary appetizing shop comes this retro, full-service outpost serving Jewish comfort food.","Phone number":"(212) 475-4881"}},{"json":{"type":"Italian restaurant","Name ":"OLIO E PIÙ","rating":4.7,"Address":"3 Greenwich Ave, New York, NY 10014","Website":"https://www.olioepiu.com/","Position":11,"priceLevel":"$50–100","Description":"Naples meets NYC at this trattoria with thin-crust pizza, Italian wines & ample sidewalk seating.","Booking Link":"https://www.opentable.com/restaurant/profile/55837?ref=1068","Phone number":"(212) 243-6546"}},{"json":{"type":"Taco restaurant","Name ":"LOS TACOS No.1","rating":4.8,"Address":"229 W 43rd St, New York, NY 10036","Website":"http://www.lostacos1.com/","Position":12,"priceLevel":"$10–20","Description":"Small pit stop with standing tables serving authentic Mexican street food."}},{"json":{"type":"Italian restaurant","Name ":"Via Carota","rating":4.4,"Address":"51 Grove St, New York, NY 10014","Website":"http://viacarota.com/","Position":13,"priceLevel":"$50–100","Description":"Italian trattoria serving traditional plates & apéritifs in a rustic, cozy space.","Phone number":"(212) 255-1962"}},{"json":{"type":"American restaurant","Name ":"RH Rooftop Restaurant at RH New York","rating":4.4,"Address":"9 9th Ave, New York, NY 10014","Website":"http://www.rh.com/newyork/restaurant","Position":14,"priceLevel":"$50–100","Description":"Glamorous rooftop restaurant offering American fare amid chandeliers, greenery, and skyline views.","Booking Link":"https://www.opentable.com/restaurant/profile/1050247?ref=1068","Phone number":"(212) 217-2210"}},{"json":{"type":"Taco restaurant","Name ":"LOS TACOS No.1","rating":4.7,"Address":"75 9th Ave, New York, NY 10011","Website":"https://www.lostacos1.com/","Position":15,"priceLevel":"$10–20","Description":"Bustling taqueria serving tacos, quesadillas & aguas frescas in a street-style setup (no seating)."}},{"json":{"type":"Italian restaurant","Name ":"Piccola Cucina Estiatorio","rating":4.7,"Address":"75 Thompson St, New York, NY 10012","Website":"http://www.piccolacucinagroup.com/","Position":16,"priceLevel":"$30–50","Booking Link":"https://www.opentable.com/restaurant/profile/343939?ref=1068","Phone number":"(646) 781-9183"}},{"json":{"type":"Fine dining restaurant","Name ":"Per Se","rating":4.5,"Address":"10 Columbus Cir, New York, NY 10019","Website":"https://www.thomaskeller.com/perseny","Position":17,"priceLevel":"$100+","Description":"Chef Thomas Keller's New American restaurant offers luxe fixed-price menus, with Central Park views.","Phone number":"(212) 823-9335"}},{"json":{"type":"American restaurant","Name ":"ROBERT","rating":4.5,"Address":"2 Columbus Cir, New York, NY 10019","Website":"https://robertnyc.com/","Position":18,"priceLevel":"$$$","Description":"New American fare & city views in an arty space on the top-floor of the Museum of Arts & Design.","Booking Link":"https://www.opentable.com/r/robert-new-york","Phone number":"(212) 299-7730"}},{"json":{"type":"Restaurant","Name ":"Katz's Delicatessen","rating":4.5,"Address":"205 E Houston St, New York, NY 10002","Website":"https://katzsdelicatessen.com/","Position":19,"priceLevel":"$20–30","Description":"No-frills deli with theatrically cranky service serving mile-high sandwiches since 1888.","Phone number":"(212) 254-2246"}},{"json":{"type":"Cajun restaurant","Name ":"1803 NYC","rating":4.5,"Address":"82 Reade St, New York, NY 10007","Website":"https://1803nyc.com/","Position":20,"priceLevel":"$30–50","Description":"Elevated Cajun-Creole food and drinks served in a New Orleans's French quarters-inspired restaurant.","Booking Link":"https://1803nyc.com/#reservation","Phone number":"(212) 267-3000"}}]},"settings":{"executionOrder":"v1"},"versionId":"171ef405-bac6-42c0-a3c3-c28cb49ff21a","connections":{"Trigger: Manual Test Run":{"main":[[{"node":"Search Google Maps via Dumpling AI","type":"main","index":0}]]},"Split Places List for Processing":{"main":[[{"node":"Save Results to Google Sheet (Place Info)","type":"main","index":0}]]},"Search Google Maps via Dumpling AI":{"main":[[{"node":"Split Places List for Processing","type":"main","index":0}]]}}}


name: Generate Monthly Financial Reports with Gemini AI, SQL, and Outlook
author_name: Amjid Ali
author_username: amjid
categories: []
created_at: 2025-04-19T20:25:03.594Z
updated_at: 2025-04-19T20:25:03.594Z
url: https://n8n.io/workflows/3617
scraped_at: 2025-07-06 21:16:30
description:
  🚀 AI-Powered Business Performance Reporting Automation

  Unlock executive-level insights with ZERO manual work!  
  This n8n template empowers you to automate your entire monthly business performance reporting using dynamic SQL queries, AI-driven analysis, and beautiful HTML dashboards — all delivered directly to your inbox.

  🎯 What This Automation Does

  📆 Triggers automatically every month (5th of each month)
  🧮 Fetches financial data from SQL (ERPNext or any database)
  🔁 Loops over cost centers to analyze each business unit individually
  📊 Generates Profit & Loss reports, WIP, Employee stats, and vertical breakdowns
  🤖 Uses Google Gemini 2.5 AI to perform advanced financial analysis
  💌 Delivers a polished HTML report to your email inbox
  🔧 Fully modular – replace data source with Excel, Google Sheets, or APIs

  🧑‍🏫 Step-by-Step Video Tutorial

  🎥 Watch the full tutorial on YouTube:  
    
  📌 Learn how each node works and see the AI-generated report in action.

  🌐 Useful Links

  🔗 Sign up for n8n Cloud (recommended for non-tech users):  
    👉 https://n8n.syncbricks.com

  📘 Download the step-by-step Guidebook (Free):  
    👉 https://lms.syncbricks.com/books/n8n

  📚 Explore the full course on n8n (includes templates, workflows, and AI integrations):  
    👉 https://lms.syncbricks.com/courses/n8n

  🛠 Requirements

  ✅ n8n (Self-hosted or Cloud)
  ✅ SQL Database (MySQL / PostgreSQL / ERPNext)
  ✅ Microsoft Outlook or Gmail (to send the report)
  ✅ Gemini API Key (for AI analysis)
  ✅ Basic understanding of your data schema

  💡 Why Use This Template?

  ⏱ Saves 2-3 days of manual work every month
  📈 Improves financial visibility across business units
  🤝 Great for CFOs, COOs, Finance Analysts, and BI teams
  🔄 Scales across multiple divisions and companies
  🧠 Leverages AI for actionable insights and recommendations

  🧩 Customize It Your Way

  Replace the SQL nodes with:
    Excel / Google Sheets
    Airtable / APIs
    Custom Applications

  Swap the AI model:
    OpenAI GPT
    Claude
    DeepSeek

  Adjust the report structure or HTML style

  🙌 Get Started Now

  🎯 Import the JSON template → Connect your data → Receive business insights via email.  
  Don’t let manual reporting slow down your decision-making.

  👉 Sign up for n8n Cloud  
  👉 Learn n8n with Amjid  
  👉 Download Guide

  Created by Amjid Ali | SyncBricks™ – Automation for Everyone

nodes_used:
  ["n8n-nodes-base.mySql","n8n-nodes-base.microsoftOutlook","n8n-nodes-base.code","n8n-nodes-base.html","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.toolCalculator","@n8n/n8n-nodes-langchain.lmChatGoogleGemini","@n8n/n8n-nodes-langchain.toolThink"]

workflow_json:
  {"meta":{"instanceId":"32d80f55a35a7b57f8e47a2ac19558d9f5bcec983a5519d9c29ba713ff4f12c7"},"nodes":[{"id":"fdd55253-5cb6-4b1f-9c93-6915f254f700","name":"Schedule Trigger","type":"n8n-nodes-base.scheduleTrigger","position":[-60,-240],"parameters":{"rule":{"interval":[{"field":"months","triggerAtDayOfMonth":5}]}},"typeVersion":1.2},{"id":"c8d6064a-3fd7-478d-891c-6ade336daa1f","name":"YTD vs Prevoius Month1","type":"n8n-nodes-base.mySql","onError":"continueRegularOutput","position":[640,0],"parameters":{"query":"SELECT\n  --  budget_data.fiscal_year AS `Year`,\n  --  budget_data.cost_center AS `Cost Center`,\n    budget_data.budget_group AS `Budget Group`,\n--    budget_data.sort_order AS `Sort Order`,\n\n    -- YTD Totals up to previous month (up to dynamic month)\n    SUM(budget_data.budget_amount) AS `Budget YTD`,\n    SUM(COALESCE(actual_data.actual_amount, 0)) AS `Actual YTD`,\n    SUM(COALESCE(actual_data.actual_amount, 0)) - SUM(budget_data.budget_amount) AS `Variance YTD`,\n\n    -- Previous Month Totals Only\n    SUM(CASE WHEN budget_data.budget_month = {{ $('PreviousMonth').item.json.previousMonth }} THEN budget_data.budget_amount ELSE 0 END) AS `Budget PM`,\n    SUM(CASE WHEN budget_data.budget_month = {{ $('PreviousMonth').item.json.previousMonth }} THEN COALESCE(actual_data.actual_amount, 0) ELSE 0 END) AS `Actual PM`,\n    SUM(CASE WHEN budget_data.budget_month = {{ $('PreviousMonth').item.json.previousMonth }} THEN COALESCE(actual_data.actual_amount, 0) ELSE 0 END) -\n    SUM(CASE WHEN budget_data.budget_month = {{ $('PreviousMonth').item.json.previousMonth }} THEN budget_data.budget_amount ELSE 0 END) AS `Variance PM`\n\nFROM\n    (\n        SELECT\n            bg.budget_group_name AS budget_group,\n            bg.sort_order,\n            bgd.fiscal_year,\n            bgd.budget_month,\n            bgd.cost_center,\n            CAST(bgd.budget_amount AS DECIMAL(18,6)) AS budget_amount\n        FROM\n            `tabBudget Group Detail` bgd\n        JOIN\n            `tabBudget Group` bg ON bg.name = bgd.parent\n        WHERE\n            bgd.fiscal_year = {{ $('PreviousMonth').item.json.year }}\n            AND bgd.budget_month <= {{ $('PreviousMonth').item.json.previousMonth }}\n            AND bgd.cost_center = '{{ $json.CostCenter }}'\n    ) AS budget_data\n\nLEFT JOIN (\n    SELECT\n        acc.budget_group AS budget_group,\n        YEAR(gl.posting_date) AS fiscal_year,\n        MONTH(gl.posting_date) AS budget_month,\n        gl.cost_center,\n        SUM(\n            CASE \n                WHEN acc.root_type = 'Income' THEN gl.credit - gl.debit\n                WHEN acc.root_type = 'Expense' THEN gl.debit - gl.credit\n                ELSE 0\n            END\n        ) AS actual_amount\n    FROM\n        `tabGL Entry` gl\n    JOIN\n        `tabAccount` acc ON gl.account = acc.name\n    WHERE\n        acc.budget_group IS NOT NULL\n        AND acc.root_type IN ('Income', 'Expense')\n        AND gl.docstatus = 1\n        AND YEAR(gl.posting_date) = {{ $('PreviousMonth').item.json.year }}\n        AND MONTH(gl.posting_date) <= {{ $('PreviousMonth').item.json.previousMonth }}\n        AND gl.cost_center = '{{ $('Filter').item.json['Cost Center'] }}'\n    GROUP BY\n        acc.budget_group,\n        YEAR(gl.posting_date),\n        MONTH(gl.posting_date),\n        gl.cost_center\n) AS actual_data\nON\n    budget_data.budget_group = actual_data.budget_group AND\n    budget_data.fiscal_year = actual_data.fiscal_year AND\n    budget_data.budget_month = actual_data.budget_month AND\n    budget_data.cost_center = actual_data.cost_center\n\nGROUP BY\n    budget_data.fiscal_year,\n    budget_data.cost_center,\n    budget_data.budget_group,\n    budget_data.sort_order\n\nORDER BY\n    budget_data.cost_center,\n    budget_data.sort_order,\n    budget_data.budget_group;\n","options":{},"operation":"executeQuery"},"retryOnFail":false,"typeVersion":2.4},{"id":"13102b1c-8a06-4a23-8174-75254bf783ac","name":"Loop Over Items","type":"n8n-nodes-base.splitInBatches","position":[-40,200],"parameters":{"options":{}},"typeVersion":3},{"id":"da2a0b30-3df4-430c-8cac-cd9d735ce759","name":"CostCentrs","type":"n8n-nodes-base.set","position":[1100,-240],"parameters":{"options":{},"assignments":{"assignments":[{"id":"ac6bcf14-13e3-464d-b9cd-4adee56018d7","name":"Cost Center","type":"string","value":"={{ $json['Cost Center'] }}"}]}},"typeVersion":3.4},{"id":"7891d71c-18f8-4e07-aa30-f50bec10cef6","name":"Date & Time","type":"n8n-nodes-base.dateTime","position":[260,-240],"parameters":{"options":{}},"typeVersion":2},{"id":"3e69dc27-0850-4978-bf10-e81ff575ec60","name":"PreviousMonth","type":"n8n-nodes-base.code","position":[520,-240],"parameters":{"jsCode":"// Get the input date from the previous node\nconst inputDateStr = $input.first().json.currentDate;\nconst inputDate = new Date(inputDateStr);\n\n// Move to the first day of the current month\ninputDate.setDate(1);\n\n// Step back one day to land in the previous month\ninputDate.setDate(0);\n\n// Extract previous month and year\nconst previousMonth = inputDate.getMonth() + 1; // Months are 0-based\nconst year = inputDate.getFullYear(); // This will reflect the correct year, even in January\n\nreturn [\n  {\n    json: {\n      previousMonth: previousMonth.toString().padStart(2, '0'), // e.g., \"01\", \"12\"\n      year: year.toString()                                     // e.g., \"2024\"\n    }\n  }\n];\n"},"typeVersion":2},{"id":"f6776225-39d2-4746-a90f-b4d1b12a66ee","name":"Selected Cost Center","type":"n8n-nodes-base.set","position":[260,220],"parameters":{"options":{},"assignments":{"assignments":[{"id":"c4a6c71a-0df4-49df-9068-f039ddf7d507","name":"CostCenter","type":"string","value":"={{ $json['Cost Center'] }}"},{"id":"ade95f85-baa2-4f5d-a125-7360b17cf99b","name":"previousMonth","type":"string","value":"={{ $('PreviousMonth').item.json.previousMonth }}"},{"id":"36c1d772-5bb7-47a6-81f9-1b70208e558b","name":"year","type":"string","value":"={{ $('PreviousMonth').item.json.year }}"}]}},"typeVersion":3.4},{"id":"1e23d876-21be-4d90-b5e4-38f3543a0c3b","name":"Get Cost Centers with Budgets","type":"n8n-nodes-base.mySql","position":[800,-240],"parameters":{"query":"SELECT DISTINCT\n    budget_data.cost_center AS `Cost Center`\nFROM\n(\n    SELECT\n        bgd.cost_center,\n        bgd.fiscal_year,\n        bgd.budget_month\n    FROM\n        `tabBudget Group Detail` bgd\n    JOIN\n        `tabBudget Group` bg ON bg.name = bgd.parent\n    WHERE\n        bgd.fiscal_year = {{ $json.year }}\n        AND bgd.budget_month <= {{ $json.previousMonth }}\n) AS budget_data\n\nINNER JOIN\n(\n    SELECT DISTINCT\n        gl.cost_center,\n        YEAR(gl.posting_date) AS fiscal_year,\n        MONTH(gl.posting_date) AS budget_month\n    FROM\n        `tabGL Entry` gl\n    JOIN\n        `tabAccount` acc ON gl.account = acc.name\n    WHERE\n        acc.budget_group IS NOT NULL\n        AND acc.root_type IN ('Income', 'Expense')\n        AND gl.docstatus = 1\n        AND YEAR(gl.posting_date) = {{ $json.year }}\n        AND MONTH(gl.posting_date) <= {{ $json.previousMonth }}\n        AND gl.cost_center IS NOT NULL\n) AS gl_data\nON\n    budget_data.cost_center = gl_data.cost_center\n    AND budget_data.fiscal_year = gl_data.fiscal_year\n    AND budget_data.budget_month = gl_data.budget_month\n\nORDER BY\n    budget_data.cost_center;\n","options":{},"operation":"executeQuery"},"typeVersion":2.4},{"id":"d4429595-b1b9-4121-a612-24be11e6a36a","name":"Filter","type":"n8n-nodes-base.filter","position":[1380,-240],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"d7a13ce7-24d3-406a-934b-97f9a47b206c","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json['Cost Center'] }}","rightValue":"AI DEPARTMENT"}]}},"typeVersion":2.2},{"id":"67bbe834-ae40-4aad-b468-6fa73c9dc6c6","name":"HTML","type":"n8n-nodes-base.html","position":[40,920],"parameters":{"html":"{{ $json.html }}"},"typeVersion":1.2},{"id":"58d1dc63-9ba7-41b8-af39-b7c134ab3cea","name":"verticalPL","type":"n8n-nodes-base.code","position":[900,220],"parameters":{"jsCode":"const rows = items;\n\n// Get column names from the first row\nconst headers = Object.keys(rows[0].json);\n\n// Build header HTML\nlet headerHtml = headers.map(col => `<th>${col}</th>`).join('');\n\n// Build rows\nlet bodyHtml = rows.map(row => {\n  return `<tr>${headers.map(col => `<td>${row.json[col]}</td>`).join('')}</tr>`;\n}).join('');\n\n// Combine into one table\nconst tableHtml = `\n<table border=\"1\" cellpadding=\"6\" cellspacing=\"0\" style=\"border-collapse: collapse;\">\n  <thead><tr>${headerHtml}</tr></thead>\n  <tbody>${bodyHtml}</tbody>\n</table>\n`;\n\nreturn [{ json: { table: tableHtml } }];\n"},"typeVersion":2},{"id":"9a8bdb09-f9d4-4c4b-b1d5-dadb3c6ee567","name":"Merge","type":"n8n-nodes-base.merge","position":[1380,220],"parameters":{"numberInputs":4},"typeVersion":3.1},{"id":"d310db4d-183d-4f99-9bd0-863320d2db73","name":"Code","type":"n8n-nodes-base.code","position":[1420,580],"parameters":{"jsCode":"const table1 = $input.first().json.table; // From the first input node\nconst table2 = $items(\"verticalPL\")[0].json.table; // From the node named 'verticalPL'\nconst table3 = $items(\"WIP1\")[0].json.table; // From the node named 'WIP1'\nconst table4 = $items(\"Employees1\")[0].json.table; // From the node named 'Employees1'\n\nconst htmlOutput = `\n<!DOCTYPE html>\n<html>\n<head>\n  <style>\n    body { font-family: Arial, sans-serif; font-size: 14px; color: #333; }\n    h2 { margin-top: 30px; }\n    table { border-collapse: collapse; width: 100%; margin-top: 10px; }\n    th, td { border: 1px solid #ccc; padding: 8px; text-align: right; }\n    th:first-child, td:first-child { text-align: left; }\n    thead { background-color: #f0f0f0; }\n  </style>\n</head>\n<body>\n  <h2>📊 Financial Overview – YTD & PM Summary</h2>\n  ${table1}\n\n  <h2>📊 Financial Overview – Vertical Profit & Loss</h2>\n  ${table2}\n\n  <h2>📊 Financial Overview – WIP Summary</h2>\n  ${table3}\n\n  <h2>👥 Employees in the Business Unit</h2>\n  ${table4}\n</body>\n</html>\n`;\n\nreturn [{ json: { html: htmlOutput } }];\n"},"typeVersion":2},{"id":"ba5e60fb-d5cc-4a5f-9cb6-07808f7c7021","name":"Microsoft Outlook2","type":"n8n-nodes-base.microsoftOutlook","position":[1240,920],"webhookId":"0cdef86a-9910-49aa-bdd3-1beecb260035","parameters":{"subject":"=Business Performance Syncbricks","bodyContent":"={{ $json['Email Output'] }}","toRecipients":"amjid@amjidali.com","additionalFields":{"bodyContentType":"html"}},"typeVersion":2},{"id":"c3cdf21d-417f-420b-98f9-dfca33119c5a","name":"CostCenter","type":"n8n-nodes-base.code","position":[920,0],"parameters":{"jsCode":"const rows = items;\n\n// Get column names from the first row\nconst headers = Object.keys(rows[0].json);\n\n// Build header HTML\nlet headerHtml = headers.map(col => `<th>${col}</th>`).join('');\n\n// Build rows\nlet bodyHtml = rows.map(row => {\n  return `<tr>${headers.map(col => `<td>${row.json[col]}</td>`).join('')}</tr>`;\n}).join('');\n\n// Combine into one table\nconst tableHtml = `\n<table border=\"1\" cellpadding=\"6\" cellspacing=\"0\" style=\"border-collapse: collapse;\">\n  <thead><tr>${headerHtml}</tr></thead>\n  <tbody>${bodyHtml}</tbody>\n</table>\n`;\n\nreturn [{ json: { table: tableHtml } }];\n"},"typeVersion":2},{"id":"9d9fb099-5fca-4777-a753-f6791f37fd37","name":"WIP1","type":"n8n-nodes-base.code","position":[900,400],"parameters":{"jsCode":"const rows = items;\n\n// Get column names from the first row\nconst headers = Object.keys(rows[0].json);\n\n// Build header HTML\nlet headerHtml = headers.map(col => `<th>${col}</th>`).join('');\n\n// Build rows\nlet bodyHtml = rows.map(row => {\n  return `<tr>${headers.map(col => `<td>${row.json[col]}</td>`).join('')}</tr>`;\n}).join('');\n\n// Combine into one table\nconst tableHtml = `\n<table border=\"1\" cellpadding=\"6\" cellspacing=\"0\" style=\"border-collapse: collapse;\">\n  <thead><tr>${headerHtml}</tr></thead>\n  <tbody>${bodyHtml}</tbody>\n</table>\n`;\n\nreturn [{ json: { table: tableHtml } }];\n"},"typeVersion":2},{"id":"5a6626ed-c841-4fd7-9111-f686fcacaa37","name":"Employees","type":"n8n-nodes-base.mySql","onError":"continueRegularOutput","position":[640,600],"parameters":{"query":"SELECT\n   -- e.payroll_cost_center AS `Payroll Cost Center`,\n    COUNT(*) AS `Total Employees`,\n    COUNT(CASE WHEN YEAR(e.date_of_joining) = YEAR(CURDATE()) THEN 1 END) AS `Joined This Year`,\n    COUNT(CASE WHEN YEAR(e.date_of_joining) = YEAR(CURDATE()) AND MONTH(e.date_of_joining) = MONTH(CURDATE()) THEN 1 END) AS `Joined This Month`\nFROM\n    `tabEmployee` e\nWHERE\n    e.status = 'Active'\n    AND e.payroll_cost_center = '{{ $json.CostCenter }}'\nGROUP BY\n    e.payroll_cost_center;\n","options":{},"operation":"executeQuery"},"retryOnFail":false,"typeVersion":2.4},{"id":"bbfd2c19-9538-4106-8931-f65f0261d43c","name":"Employees1","type":"n8n-nodes-base.code","position":[900,600],"parameters":{"jsCode":"const rows = items;\n\n// Get column names from the first row\nconst headers = Object.keys(rows[0].json);\n\n// Build header HTML\nlet headerHtml = headers.map(col => `<th>${col}</th>`).join('');\n\n// Build rows\nlet bodyHtml = rows.map(row => {\n  return `<tr>${headers.map(col => `<td>${row.json[col]}</td>`).join('')}</tr>`;\n}).join('');\n\n// Combine into one table\nconst tableHtml = `\n<table border=\"1\" cellpadding=\"6\" cellspacing=\"0\" style=\"border-collapse: collapse;\">\n  <thead><tr>${headerHtml}</tr></thead>\n  <tbody>${bodyHtml}</tbody>\n</table>\n`;\n\nreturn [{ json: { table: tableHtml } }];\n"},"typeVersion":2},{"id":"b425da91-2faa-4063-93dd-4d997f7cd7eb","name":"Wait","type":"n8n-nodes-base.wait","position":[1480,1180],"webhookId":"83d7ae9a-e309-4bac-a0b4-5ff651e3afe3","parameters":{"unit":"minutes"},"typeVersion":1.1},{"id":"5deead0c-d386-4b51-9b96-bd58e85244c0","name":"Financial Performance","type":"n8n-nodes-base.code","position":[700,920],"parameters":{"jsCode":"let html = $input.first().json.output || '';\n\n// Remove ```html at the start and ``` at the end (if present)\nhtml = html.trim().replace(/^```html\\s*/i, '').replace(/```$/i, '');\n\nreturn [{\n  json: {\n    cleaned_html: html\n  }\n}];\n"},"typeVersion":2},{"id":"a472032f-42ba-4cb2-9bf7-55314083833e","name":"Email Data","type":"n8n-nodes-base.set","position":[940,920],"parameters":{"options":{},"assignments":{"assignments":[{"id":"b227e25f-99ce-4147-b22d-c2a6cabfcafa","name":"CostCenter","type":"string","value":"={{ $('Selected Cost Center').first().json.CostCenter }}\n"},{"id":"94e5a360-cbff-4498-bd75-98cafe08557b","name":"Email Output","type":"string","value":"={{ $json.cleaned_html }}"},{"id":"20cd6408-ab44-4632-8f0a-967604f16a1c","name":"For the Month","type":"string","value":"=Month : {{ $('PreviousMonth').first().json.previousMonth }} - {{ $('PreviousMonth').first().json.year }}"}]}},"typeVersion":3.4},{"id":"b7c1ae4d-cbe3-47fb-84fa-f34295f8dfee","name":"Calculator","type":"@n8n/n8n-nodes-langchain.toolCalculator","position":[620,1220],"parameters":{},"typeVersion":1},{"id":"2e59b7b8-d8f6-4433-98c5-f637f6b5eaf4","name":"Business Performance AI Agent (Analyst)","type":"@n8n/n8n-nodes-langchain.agent","onError":"continueRegularOutput","position":[300,920],"parameters":{"text":"=You are a Business Performance Analyst Expert in Financial Management of Syncbricks LLC,  you willbe given an input to Analyze the Financial Performance of syncbricks which is an AI and Automation Company.\nThe sections Given to you will be below\n\n1. Financial Overview – YTD & PM Summary (whis is income and expense of the Company, this data doesn't include the calculation of Gross Profit and Net Profit that you must do. This should be used together in one section only don't seperate them)\n2. Financial Overview – Vertical Profit & Loss (This containers the Verticials within the Cost Center, these are in fact the Sub Business Unit, you don't need to calculate anything but the information is for analysis to see how the Verticals within the Business Unit Perfored )\n3. Financial Overview – WIP Summary (This is the Projects Summary about how many projects are currently open and work is the WIP - Work in Process of the Project, the WIP figure should be added for Profit and Loss Statement Under Proejct Reveneu as expected WIP)\n4. Employees in the Business Unit (These will be the number of Employees who are directly working in this BU, which means these employees are only serving the Company, other staff which are in back office support are not included in this. )\n*** Your Role ***\n\nYour Role is to Prepare a comprehensive Report : \n1. Executive Summary : Tell how was the overall performance of the Business Unit.\n2. Analayze the Financial Overview - YTD together with PM Summary (Which is Previous Month) which is previous month Income and Expenses you must use Proper Strcuture of Financial Statement with Budget Vs Actuals (follow same input already given). \n\nYou must use the Section that will be shared with you in detail that says \"Financial Overview – YTD & PM Summary \" and from there you must ensure to create sections based on best Practices of Performance Analysis that should include;\n\nSection: Revenue\n-Projects - Revenue\n-Trading - Revenue\n-Service - Revenue\nNet Sales (Total)\nSection: Project Work in Process\nWIP (Revenue to Book)\nTotal: Gross Sale\nSection: Cost of Sale\nProjects - COGS\nTrading - COGS\nService - COGS\nTotal Cost of Sales\nGross Profit\nOther Income\nGross Income\n\nSection: Indirect Cost (here you must all the detail of expenses from \"Financial Overview – YTD & PM Summary\"\nThen you must calculate\nProfit / (Loss) before tax\nNP % to Revenue\n\nUse the calculator tool to ensure precise calculations.\n\n\n- Don't add decimals give format in currency but don't add symbol.\nUse the standard P&L Format where you should first use Sale, then Cost of Sale and GP, then use Indirect Expenses and then Net Profile. Ensure to calculate the Perentages as well.\n3. Provide the Summary of the Verticials Performance with their Profit and Loss and Percetage and Total of all Verticlals\n4. Current Project Progress.\n5. Employees Summary, Number of Employees, How many joined in this Year and what is per Eployee Revenue and Gross Profit \n\nAnalyze Overall Performance of the Company and provide the Business Managers an Overview of what should be done next. Calculate per employee profit as well and suggest what is the performance overall\n\n**Tools**\nUse calculator tool to do all calculations for accurate calculations\n\n** Formatting and Output **\n\nGive output in html format fully responsive in with beauty added using CSS,  ready to be shared with all possible tables, in hightly attracrtive format, headings, add colors green for good, red for bad, organge for acceptable and so on, also add remarks to show how the performance was, enusre to response as if you were as an Expert in Analyzing the Bususiness Performance. Don't add any other infomration or symbols which are not part of html. Don't give additional message saying ok, I will do and so on.\nAlign Text in table on left and numbers on right\nNumber formatting : ##,###\n\n\nHere is the data\n\nMonth : {{ $('PreviousMonth').first().json.previousMonth }}\nYear  : {{ $('PreviousMonth').first().json.year }}\n\n{{ $json.html }}\n\n","options":{},"promptType":"define"},"typeVersion":1.8},{"id":"3ac7b91e-ee61-4b40-9d2d-76d7916479ee","name":"Think","type":"@n8n/n8n-nodes-langchain.toolThink","position":[460,1220],"parameters":{},"typeVersion":1},{"id":"97bac1cb-8271-4169-98cf-6ea5b06ef5db","name":"Google Gemini Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatGoogleGemini","position":[220,1220],"parameters":{"options":{},"modelName":"models/gemini-2.5-pro-exp-03-25"},"typeVersion":1},{"id":"27f40dc7-61b9-4e09-9b6d-6bb9d16c38c3","name":"Departments ","type":"n8n-nodes-base.mySql","onError":"continueRegularOutput","position":[640,200],"parameters":{"query":"SELECT\n   -- gl.vertical AS `Vertical`,\n\n    -- Total Income (based on root_type)\n    ROUND(SUM(CASE WHEN acc.root_type = 'Income' THEN gl.credit - gl.debit ELSE 0 END), 0) AS `Total Income`,\n\n    -- Total Expenses (based on root_type)\n    ROUND(SUM(CASE WHEN acc.root_type = 'Expense' THEN gl.debit - gl.credit ELSE 0 END), 0) AS `Total Expenses`,\n\n    -- Profit or Loss = Income - Expenses\n    ROUND(SUM(\n        CASE \n            WHEN acc.root_type = 'Income' THEN gl.credit - gl.debit\n            WHEN acc.root_type = 'Expense' THEN -1 * (gl.debit - gl.credit)\n            ELSE 0\n        END\n    ), 0) AS `Profit or Loss`\n\nFROM\n    `tabGL Entry` gl\nJOIN\n    `tabAccount` acc ON gl.account = acc.name\n\nWHERE\n    acc.root_type IN ('Income', 'Expense')\n    AND gl.docstatus = 1\n    AND gl.cost_center = '{{ $(\"Selected Cost Center\").item.json.CostCenter }}'\n    AND MONTH(gl.posting_date) = {{ $(\"Selected Cost Center\").item.json.previousMonth }}\n    AND YEAR(gl.posting_date) = {{ $(\"Selected Cost Center\").item.json.year }}\n\nGROUP BY\n    gl.vertical\n","options":{},"operation":"executeQuery"},"retryOnFail":false,"typeVersion":2.4},{"id":"b2a3ec7d-d400-4d1c-877d-f49f67ad742f","name":"Projects","type":"n8n-nodes-base.mySql","onError":"continueRegularOutput","position":[620,380],"parameters":{"query":"SELECT\n   -- p.cost_center AS `Cost Center`,\n    COUNT(DISTINCT p.name) AS `Projects`,\n\n    FORMAT(SUM(p.contract_value), 0) AS `Contract Value`,\n    FORMAT(SUM(p.total_opening_revenue), 0) AS `Opening Revenue`,\n    FORMAT(SUM(p.total_opening_cost), 0) AS `Opening Cost`,\n\n    -- New Revenue (GL)\n    IFNULL((\n        SELECT SUM(gl.credit - gl.debit)\n        FROM `tabGL Entry` gl\n        JOIN `tabAccount` acc ON acc.name = gl.account\n        WHERE gl.docstatus = 1 AND acc.root_type = 'Income' AND acc.is_group = 0\n          AND gl.project IN (SELECT name FROM `tabProject` WHERE cost_center = p.cost_center AND status = 'Open')\n          AND gl.posting_date <= LAST_DAY(CURDATE() - INTERVAL 1 MONTH)\n    ), 0) AS `New Revenue`,\n\n    -- New Cost (GL)\n    IFNULL((\n        SELECT SUM(gl.debit - gl.credit)\n        FROM `tabGL Entry` gl\n        JOIN `tabAccount` acc ON acc.name = gl.account\n        WHERE gl.docstatus = 1 AND acc.root_type = 'Expense' AND acc.is_group = 0\n          AND gl.project IN (SELECT name FROM `tabProject` WHERE cost_center = p.cost_center AND status = 'Open')\n          AND gl.posting_date <= LAST_DAY(CURDATE() - INTERVAL 1 MONTH)\n    ), 0) AS `New Cost`,\n\n    -- Actual Revenue\n    FORMAT(\n        SUM(p.total_opening_revenue) +\n        IFNULL((\n            SELECT SUM(gl.credit - gl.debit)\n            FROM `tabGL Entry` gl\n            JOIN `tabAccount` acc ON acc.name = gl.account\n            WHERE gl.docstatus = 1 AND acc.root_type = 'Income' AND acc.is_group = 0\n              AND gl.project IN (SELECT name FROM `tabProject` WHERE cost_center = p.cost_center AND status = 'Open')\n              AND gl.posting_date <= LAST_DAY(CURDATE() - INTERVAL 1 MONTH)\n        ), 0), 0\n    ) AS `Actual Revenue`,\n\n    -- Actual Cost\n    FORMAT(\n        SUM(p.total_opening_cost) +\n        IFNULL((\n            SELECT SUM(gl.debit - gl.credit)\n            FROM `tabGL Entry` gl\n            JOIN `tabAccount` acc ON acc.name = gl.account\n            WHERE gl.docstatus = 1 AND acc.root_type = 'Expense' AND acc.is_group = 0\n              AND gl.project IN (SELECT name FROM `tabProject` WHERE cost_center = p.cost_center AND status = 'Open')\n              AND gl.posting_date <= LAST_DAY(CURDATE() - INTERVAL 1 MONTH)\n        ), 0), 0\n    ) AS `Actual Cost`,\n\n    -- Invoice %\n    CONCAT(ROUND((\n        (\n            SUM(p.total_opening_revenue) +\n            IFNULL((\n                SELECT SUM(gl.credit - gl.debit)\n                FROM `tabGL Entry` gl\n                JOIN `tabAccount` acc ON acc.name = gl.account\n                WHERE gl.docstatus = 1 AND acc.root_type = 'Income' AND acc.is_group = 0\n                  AND gl.project IN (SELECT name FROM `tabProject` WHERE cost_center = p.cost_center AND status = 'Open')\n                  AND gl.posting_date <= LAST_DAY(CURDATE() - INTERVAL 1 MONTH)\n            ), 0)\n        ) / NULLIF(SUM(p.contract_value), 0) * 100\n    ), 0), '%') AS `Invoice %`,\n\n    -- Cost %\n    CONCAT(ROUND((\n        (\n            SUM(p.total_opening_cost) +\n            IFNULL((\n                SELECT SUM(gl.debit - gl.credit)\n                FROM `tabGL Entry` gl\n                JOIN `tabAccount` acc ON acc.name = gl.account\n                WHERE gl.docstatus = 1 AND acc.root_type = 'Expense' AND acc.is_group = 0\n                  AND gl.project IN (SELECT name FROM `tabProject` WHERE cost_center = p.cost_center AND status = 'Open')\n                  AND gl.posting_date <= LAST_DAY(CURDATE() - INTERVAL 1 MONTH)\n            ), 0)\n        ) / NULLIF(SUM(p.budgeted_project_cost), 0) * 100\n    ), 0), '%') AS `Cost %`,\n\n    -- WIP Calculation\n    FORMAT(\n        CASE\n            WHEN SUM(p.budgeted_project_cost) = 0 THEN 0\n            WHEN (\n                SUM(p.total_opening_cost) +\n                IFNULL((\n                    SELECT SUM(gl.debit - gl.credit)\n                    FROM `tabGL Entry` gl\n                    JOIN `tabAccount` acc ON acc.name = gl.account\n                    WHERE gl.docstatus = 1 AND acc.root_type = 'Expense' AND acc.is_group = 0\n                      AND gl.project IN (SELECT name FROM `tabProject` WHERE cost_center = p.cost_center AND status = 'Open')\n                      AND gl.posting_date <= LAST_DAY(CURDATE() - INTERVAL 1 MONTH)\n                ), 0)\n            ) > SUM(p.budgeted_project_cost)\n            THEN\n                SUM(p.contract_value) -\n                (SUM(p.total_opening_revenue) +\n                IFNULL((\n                    SELECT SUM(gl.credit - gl.debit)\n                    FROM `tabGL Entry` gl\n                    JOIN `tabAccount` acc ON acc.name = gl.account\n                    WHERE gl.docstatus = 1 AND acc.root_type = 'Income' AND acc.is_group = 0\n                      AND gl.project IN (SELECT name FROM `tabProject` WHERE cost_center = p.cost_center AND status = 'Open')\n                      AND gl.posting_date <= LAST_DAY(CURDATE() - INTERVAL 1 MONTH)\n                ), 0))\n            ELSE\n                (SUM(p.contract_value) * (\n                    (SUM(p.total_opening_cost) +\n                    IFNULL((\n                        SELECT SUM(gl.debit - gl.credit)\n                        FROM `tabGL Entry` gl\n                        JOIN `tabAccount` acc ON acc.name = gl.account\n                        WHERE gl.docstatus = 1 AND acc.root_type = 'Expense' AND acc.is_group = 0\n                          AND gl.project IN (SELECT name FROM `tabProject` WHERE cost_center = p.cost_center AND status = 'Open')\n                          AND gl.posting_date <= LAST_DAY(CURDATE() - INTERVAL 1 MONTH)\n                    ), 0)) / NULLIF(SUM(p.budgeted_project_cost), 0)\n                )) -\n                (SUM(p.total_opening_revenue) +\n                IFNULL((\n                    SELECT SUM(gl.credit - gl.debit)\n                    FROM `tabGL Entry` gl\n                    JOIN `tabAccount` acc ON acc.name = gl.account\n                    WHERE gl.docstatus = 1 AND acc.root_type = 'Income' AND acc.is_group = 0\n                      AND gl.project IN (SELECT name FROM `tabProject` WHERE cost_center = p.cost_center AND status = 'Open')\n                      AND gl.posting_date <= LAST_DAY(CURDATE() - INTERVAL 1 MONTH)\n                ), 0))\n        END,\n    0) AS `WIP`\n\nFROM\n    `tabProject` p\nWHERE\n    p.cost_center = '{{ $json.CostCenter }}'\n    AND p.status = 'Open'\nGROUP BY\n    p.cost_center;\n","options":{},"operation":"executeQuery"},"retryOnFail":false,"typeVersion":2.4},{"id":"a1c5f474-dc92-47e7-bf59-9cca756245cf","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-1260,-20],"parameters":{"width":1120,"height":1200,"content":"## Key Sections of n8n Workflow\n\n**🟢 Schedule Trigger**\n- Triggers the automation on the 5th of every month.\n- Sets the cadence for monthly reporting.\n\n**📅 Date & Time + 🧮 PreviousMonth**\n- Captures the current date and derives the previous month/year for dynamic filtering.\n- Used throughout all SQL queries for monthly slicing.\n\n**📊 Get Cost Centers with Budgets**\n- Dynamically fetches all cost centers that have relevant budget and GL data for the selected period.\n- Ensures only active, relevant divisions are processed.\n\n**🔍 Filter**\n- Narrows the analysis to a specific Cost Center (e.g., \"AI DEPARTMENT\") during testing or preview.\n\n**🔁 Loop Over Items**\n- Iterates over all fetched Cost Centers to individually generate reports for each business unit.\n- Powers multi-division reporting automation.\n\n**🧾 YTD vs Previous Month1**\n- Performs detailed financial comparison between Year-To-Date and Previous Month.\n- Outputs revenue, expenses, and variance figures.\n\n**🏢 Departments + 🧱 verticalPL**\n- Analyzes financial performance by sub-divisions (Verticals) within the cost center.\n- Data is transformed into an HTML table for final report.\n\n**🧱 Projects + 🧮 WIP1**\n- Gathers project status and WIP metrics.\n- Calculates % invoiced, cost % used, and revenue recognition stats.\n\n**👥 Employees + 📊 Employees1**\n- Counts total employees, joined this month/year for the selected cost center.\n- Used to calculate per-employee KPIs.\n\n**🔗 Merge + 🧾 Code**\n- Combines all HTML tables into a single responsive report with visual formatting.\n- Clean, structured layout for email and review.\n\n**💡 Business Performance AI Agent (Analyst)**\n- Uses Google Gemini 2.5 Pro to analyze financial HTML output.\n- Executes structured analysis and generates business insights, executive summary, profitability, and recommendations.\n\n**📩 Email Data + Microsoft Outlook**\n- Sends the final HTML report via email.\n- Ready for business manager distribution with personalized message.\n\n**⏳ Wait**\n- Enables looping and batch control across multiple cost centers.\n- Prevents overloading or email spamming.\n\n**🧠 Think + Calculator**\n- Used by the AI Agent to \"reason\" and perform precise financial computations.\n- Ensures accuracy in gross/net profit, percentages, and insights."},"typeVersion":1},{"id":"59500949-a8b9-4287-b6f7-be49e58e1842","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-1960,580],"parameters":{"color":4,"width":680,"height":560,"content":"## SQL Query Nodes \n(e.g., YTD vs Previous Month, Projects, Employees, Departments)\nThese nodes fetch structured financial data (like revenue, expenses, WIP, employee count) directly from your database (e.g., ERPNext on MySQL).\n\nYou can use any database (MySQL, PostgreSQL, MSSQL, etc.) as long as the schema is mapped accordingly.\n\nTo generate these queries faster, use ChatGPT or any AI chat tool:\n👉 Just describe what you want (e.g., “monthly budget vs actual grouped by cost center”), and it will write SQL for you.\n\nYou can also replace these SQL nodes with any other data source:\n\nExcel/CSV File (via Google Drive or n8n Read Binary File)\n\nGoogle Sheets\n\nAirtable\n\nREST APIs\n\nInternal apps\n\n✅ The key is to produce the same structured data format expected by the next steps in the workflow."},"typeVersion":1},{"id":"02f76680-0bbf-408f-826e-daef5e6e9b09","name":"Sticky Note11","type":"n8n-nodes-base.stickyNote","position":[-1960,0],"parameters":{"color":4,"width":675,"height":536,"content":"## Developed by Amjid Ali\n\nThank you for using this workflow template. It has taken me countless hours of hard work, research, and dedication to develop, and I sincerely hope it adds value to your work.\n\nIf you find this template helpful, I kindly ask you to consider supporting my efforts. Your support will help me continue improving and creating more valuable resources.\n\nYou can contribute via PayPal here:\n\nhttp://paypal.me/pmptraining\n\nFor Full Course about ERPNext or Automation using AI follow below link\n\nhttp://lms.syncbricks.com\n\nAdditionally, when sharing this template, I would greatly appreciate it if you include my original information to ensure proper credit is given.\n\nThank you for your generosity and support!\nEmail : amjid@amjidali.com\nhttps://linkedin.com/in/amjidali\nhttps://syncbricks.com\nhttps://youtube.com/@syncbricks"},"typeVersion":1}],"pinData":{},"connections":{"Code":{"main":[[{"node":"HTML","type":"main","index":0}]]},"HTML":{"main":[[{"node":"Business Performance AI Agent (Analyst)","type":"main","index":0}]]},"WIP1":{"main":[[{"node":"Merge","type":"main","index":2}]]},"Wait":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"Merge":{"main":[[{"node":"Code","type":"main","index":0}]]},"Think":{"ai_tool":[[{"node":"Business Performance AI Agent (Analyst)","type":"ai_tool","index":0}]]},"Filter":{"main":[[{"node":"Loop Over Items","type":"main","index":0}]]},"Projects":{"main":[[{"node":"WIP1","type":"main","index":0}]]},"Employees":{"main":[[{"node":"Employees1","type":"main","index":0}]]},"Calculator":{"ai_tool":[[{"node":"Business Performance AI Agent (Analyst)","type":"ai_tool","index":0}]]},"CostCenter":{"main":[[{"node":"Merge","type":"main","index":0}]]},"CostCentrs":{"main":[[{"node":"Filter","type":"main","index":0}]]},"Email Data":{"main":[[{"node":"Microsoft Outlook2","type":"main","index":0}]]},"Employees1":{"main":[[{"node":"Merge","type":"main","index":3}]]},"verticalPL":{"main":[[{"node":"Merge","type":"main","index":1}]]},"Date & Time":{"main":[[{"node":"PreviousMonth","type":"main","index":0}]]},"Departments ":{"main":[[{"node":"verticalPL","type":"main","index":0}]]},"PreviousMonth":{"main":[[{"node":"Get Cost Centers with Budgets","type":"main","index":0}]]},"Loop Over Items":{"main":[[],[{"node":"Selected Cost Center","type":"main","index":0}]]},"Schedule Trigger":{"main":[[{"node":"Date & Time","type":"main","index":0}]]},"Microsoft Outlook2":{"main":[[{"node":"Wait","type":"main","index":0}]]},"Selected Cost Center":{"main":[[{"node":"YTD vs Prevoius Month1","type":"main","index":0},{"node":"Departments ","type":"main","index":0},{"node":"Projects","type":"main","index":0},{"node":"Employees","type":"main","index":0}]]},"Financial Performance":{"main":[[{"node":"Email Data","type":"main","index":0}]]},"YTD vs Prevoius Month1":{"main":[[{"node":"CostCenter","type":"main","index":0}]]},"Google Gemini Chat Model":{"ai_languageModel":[[{"node":"Business Performance AI Agent (Analyst)","type":"ai_languageModel","index":0}]]},"Get Cost Centers with Budgets":{"main":[[{"node":"CostCentrs","type":"main","index":0}]]},"Business Performance AI Agent (Analyst)":{"main":[[{"node":"Financial Performance","type":"main","index":0}]]}}}


name: Build your own CUSTOM API MCP server
author_name: Jimleuk
author_username: jimleuk
categories: []
created_at: 2025-04-21T10:21:15.404Z
updated_at: 2025-04-21T10:21:15.404Z
url: https://n8n.io/workflows/3638
scraped_at: 2025-07-06 21:16:30
description:
  This n8n demonstrates how any organisation can quickly and easily build and offer MCP servers to their customers or internal staff to improve productivity.

  This MCP example uses PayCaptain.com as an example and shows how to create an MCP server which can search for and update employee data.

  How it works
  A MCP server trigger is used and connected to 3 custom workflow tools: Search Employee, Get Employee by ID and Update Employee.
  Each tool makes calls to the PayCaptain API to perform their respective tasks. Extra care  is performed to strip out sensitive data and ensure we're not sharing too much.
  The Update Employee too also guards against updating fields which would preferably remain readonly. When you control the MCP server, you can determine behaviour of the tool.
  Finally, a Google Sheet node is used to log all operations for later audit. This will add a tiny bit of latency but recommended if sensitive data is being accessed.

  How to use
  This MCP server allows any compatible MCP client to manage their PayCaptain employee database. You will need to have a PayCaptain account and developer key to use it.
  Connect your MCP client by following the n8n guidelines here - https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-langchain.mcptrigger/#integrating-with-claude-desktop
  Try the following queries in your MCP client:
    "When did Sarah start here employment at the company?"
    "Does Jack work Wednesdays or Fridays?"
    "Please update Tracy's NI number to ABCD123456"

  Requirements
  PayCaptain Account and Developer Key.
  Google Sheets to log actions for later audit.
  MCP Client or Agent for usage such as Claude Desktop - https://claude.ai/download

  Customising this workflow
  Add or remove employee attributes as required for your user case.
  If Google Sheets is too slow, consider an API call to a faster service to log calls to the MCP server.
  Remember to set the MCP server to require credentials before going to production and sharing this MCP server with others!

nodes_used:
  ["n8n-nodes-base.googleSheets","n8n-nodes-base.httpRequest","@n8n/n8n-nodes-langchain.toolWorkflow"]

workflow_json:
  {"meta":{"instanceId":"408f9fb9940c3cb18ffdef0e0150fe342d6e655c3a9fac21f0f644e8bedabcd9","templateCredsSetupCompleted":true},"nodes":[{"id":"4bdd4360-b518-4b46-81fa-0d3183ce642d","name":"When Executed by Another Workflow","type":"n8n-nodes-base.executeWorkflowTrigger","position":[680,260],"parameters":{"workflowInputs":{"values":[{"name":"operation"},{"name":"query"},{"name":"employeeId"},{"name":"values","type":"object"}]}},"typeVersion":1.1},{"id":"74bdcff0-0615-4d81-82ff-ff8340939399","name":"Operation","type":"n8n-nodes-base.switch","position":[1040,260],"parameters":{"rules":{"values":[{"outputKey":"searchEmployee","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"81b134bc-d671-4493-b3ad-8df9be3f49a6","operator":{"type":"string","operation":"equals"},"leftValue":"={{ $('When Executed by Another Workflow').first().json.operation }}","rightValue":"searchEmployees"}]},"renameOutput":true},{"outputKey":"getEmployeeById","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"8d57914f-6587-4fb3-88e0-aa1de6ba56c1","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $('When Executed by Another Workflow').first().json.operation }}","rightValue":"getEmployeeById"}]},"renameOutput":true},{"outputKey":"updateEmployee","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"7c38f238-213a-46ec-aefe-22e0bcb8dffc","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $('When Executed by Another Workflow').first().json.operation }}","rightValue":"updateEmployee"}]},"renameOutput":true}]},"options":{}},"typeVersion":3.2},{"id":"8850cd57-9bc1-43b7-9366-7d91afc7bc42","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-80,-120],"parameters":{"color":7,"width":680,"height":660,"content":"## 1. Set up an MCP Server Trigger\n[Read more about the MCP Server Trigger](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-langchain.mcptrigger)"},"typeVersion":1},{"id":"ad541df3-44ed-4ef4-af91-841dc9986b4c","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[620,-120],"parameters":{"color":7,"width":600,"height":260,"content":"## 2. Build Your MCP Server from Existing APIs\n[Read more about the HTTP Request Node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httprequest)\n\nN8N allows any organisation to quickly build and host their own MCP server by leveraging existing APIs. Here's a quick example for PayCaptain.com - a cloud-based payroll software for modern companies.\n\nWith this set of tools, Paycaptain customers can simplify employee management from within their favourite MCP client such as Claude Desktop. Better yet, n8n also handles distribution so this MCP server can serve entire departments as well."},"typeVersion":1},{"id":"962cb379-8916-4a9f-8a7b-5aa9d31d5d88","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[-80,-240],"parameters":{"color":5,"width":380,"height":100,"content":"### Always Authenticate Your Server!\nBefore going to production, it's always advised to enable authentication on your MCP server trigger."},"typeVersion":1},{"id":"27163110-36d7-46f3-92fc-dce7d000655e","name":"Paycaptain MCP Server","type":"@n8n/n8n-nodes-langchain.mcpTrigger","position":[80,40],"webhookId":"5f6728df-d3e8-48bb-9a38-0f2e54c7962c","parameters":{"path":"5f6728df-d3e8-48bb-9a38-0f2e54c7962c"},"typeVersion":1},{"id":"13a69580-de33-489a-85c8-582877efbfe0","name":"Update Employee","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[380,260],"parameters":{"name":"updateEmployee","workflowId":{"__rl":true,"mode":"id","value":"={{ $workflow.id }}"},"description":"Updates an employee's details.","workflowInputs":{"value":{"query":"null","values":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('values', ``, 'string') }}","operation":"updateEmployee","employeeId":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('employeeId', ``, 'string') }}"},"schema":[{"id":"operation","type":"string","display":true,"required":false,"displayName":"operation","defaultMatch":false,"canBeUsedToMatch":true},{"id":"query","type":"string","display":true,"removed":false,"required":false,"displayName":"query","defaultMatch":false,"canBeUsedToMatch":true},{"id":"employeeId","type":"string","display":true,"removed":false,"required":false,"displayName":"employeeId","defaultMatch":false,"canBeUsedToMatch":true},{"id":"values","type":"object","display":true,"required":false,"displayName":"values","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.1},{"id":"68c066f0-657c-46cb-a9fe-b31e9850c512","name":"Get Employee","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[240,360],"parameters":{"name":"getEmployeeById","workflowId":{"__rl":true,"mode":"id","value":"={{ $workflow.id }}"},"description":"Returns an employee's details by employee ID.","workflowInputs":{"value":{"query":"null","values":"null","operation":"getEmployeeById","employeeId":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('employeeId', ``, 'string') }}"},"schema":[{"id":"operation","type":"string","display":true,"removed":false,"required":false,"displayName":"operation","defaultMatch":false,"canBeUsedToMatch":true},{"id":"query","type":"string","display":true,"removed":false,"required":false,"displayName":"query","defaultMatch":false,"canBeUsedToMatch":true},{"id":"employeeId","type":"string","display":true,"removed":false,"required":false,"displayName":"employeeId","defaultMatch":false,"canBeUsedToMatch":true},{"id":"values","type":"object","display":true,"removed":false,"required":false,"displayName":"values","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.1},{"id":"87661e95-b618-4701-b0f3-9f0532d5fc75","name":"Get Employees","type":"n8n-nodes-base.httpRequest","position":[1380,60],"parameters":{"url":"https://api.paycaptain.com/employees","options":{"pagination":{"pagination":{"parameters":{"parameters":[{"name":"page","value":"={{ $request.qs.page + 1 }}"}]},"maxRequests":3,"requestInterval":1000,"limitPagesFetched":true}}},"sendQuery":true,"authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth","queryParameters":{"parameters":[{"name":"company","value":"paycaptain"},{"name":"page","value":"={{ $json.page ?? 1 }}"}]}},"credentials":{"httpHeaderAuth":{"id":"sPolCkoJ1zhzWabJ","name":"JWT TOKEN"}},"typeVersion":4.2},{"id":"866868e2-e0b0-4d8d-bf3c-57d68fea8b86","name":"Search Employees","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[100,260],"parameters":{"name":"searchEmployees","workflowId":{"__rl":true,"mode":"id","value":"={{ $workflow.id }}"},"description":"Searches for and returns an employee's details.","workflowInputs":{"value":{"query":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('query', ``, 'string') }}","values":"null","operation":"searchEmployees","employeeId":"null"},"schema":[{"id":"operation","type":"string","display":true,"removed":false,"required":false,"displayName":"operation","defaultMatch":false,"canBeUsedToMatch":true},{"id":"query","type":"string","display":true,"removed":false,"required":false,"displayName":"query","defaultMatch":false,"canBeUsedToMatch":true},{"id":"employeeId","type":"string","display":true,"removed":false,"required":false,"displayName":"employeeId","defaultMatch":false,"canBeUsedToMatch":true},{"id":"values","type":"object","display":true,"removed":false,"required":false,"displayName":"values","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.1},{"id":"679a2413-448f-43d8-98fc-7fd8b83775e7","name":"Log Call","type":"n8n-nodes-base.googleSheets","position":[860,260],"parameters":{"columns":{"value":{"query":"={{ $json.query }}","values":"={{ $json.values.toJsonString() }}","operation":"={{ $json.operation }}","timestamp":"={{ $now.toISO() }}","employeeId":"={{ $json.employeeId }}"},"schema":[{"id":"timestamp","type":"string","display":true,"removed":false,"required":false,"displayName":"timestamp","defaultMatch":false,"canBeUsedToMatch":true},{"id":"operation","type":"string","display":true,"removed":false,"required":false,"displayName":"operation","defaultMatch":false,"canBeUsedToMatch":true},{"id":"query","type":"string","display":true,"removed":false,"required":false,"displayName":"query","defaultMatch":false,"canBeUsedToMatch":true},{"id":"employeeId","type":"string","display":true,"removed":false,"required":false,"displayName":"employeeId","defaultMatch":false,"canBeUsedToMatch":true},{"id":"values","type":"string","display":true,"removed":false,"required":false,"displayName":"values","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{"useAppend":true},"operation":"append","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1Ls_3pmzIafl1NUAzzflkJgyq1smPW6vfGjbVuVzdkac/edit#gid=0","cachedResultName":"Sheet1"},"documentId":{"__rl":true,"mode":"list","value":"1Ls_3pmzIafl1NUAzzflkJgyq1smPW6vfGjbVuVzdkac","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1Ls_3pmzIafl1NUAzzflkJgyq1smPW6vfGjbVuVzdkac/edit?usp=drivesdk","cachedResultName":"98. MCP Audit"}},"credentials":{"googleSheetsOAuth2Api":{"id":"XHvC7jIRR8A2TlUl","name":"Google Sheets account"}},"typeVersion":4.5},{"id":"7723947c-94a3-4bf1-b6c8-b595027a33dc","name":"Filter Matches","type":"n8n-nodes-base.filter","position":[1580,60],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"baa681eb-d6d9-450b-99ab-58d33e81cef4","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{\n[\n  $json.hrEmployeeId,\n  $json.payrollCode,\n  $json.firstName + ' ' + $json.lastName,\n  $json.email,\n  $json.niNumber,\n  $json.mailingCity,\n  $json.jobTitle,\n  $json.jobGrade,\n  $json.department,\n  $json.team\n]\n  .join(' ')\n  .toLowerCase()\n}}","rightValue":"={{ $('When Executed by Another Workflow').first().json.query.toLowerCase() }}"}]}},"typeVersion":2.2},{"id":"f4d1ddd9-dde7-437f-9aa2-969ea0832f71","name":"Aggregate Search Results","type":"n8n-nodes-base.aggregate","position":[2020,60],"parameters":{"options":{},"aggregate":"aggregateAllItemData","destinationFieldName":"response"},"typeVersion":1},{"id":"45076cec-f554-44ae-b314-e43ba080abb5","name":"Get Employees1","type":"n8n-nodes-base.httpRequest","position":[1380,260],"parameters":{"url":"https://api.paycaptain.com/employees","options":{"pagination":{"pagination":{"parameters":{"parameters":[{"name":"page","value":"={{ $request.qs.page + 1 }}"}]},"maxRequests":3,"requestInterval":1000,"limitPagesFetched":true}}},"sendQuery":true,"authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth","queryParameters":{"parameters":[{"name":"company","value":"paycaptain"},{"name":"page","value":"={{ $json.page ?? 1 }}"}]}},"credentials":{"httpHeaderAuth":{"id":"sPolCkoJ1zhzWabJ","name":"JWT TOKEN"}},"typeVersion":4.2},{"id":"b6f3a56f-5cd2-4f4d-904b-49e82ec591b8","name":"Filter Matching ID","type":"n8n-nodes-base.filter","position":[1580,260],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"cfb2ba5b-14c0-4867-be4d-180306c896ae","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.hrEmployeeId }}","rightValue":"={{ $('When Executed by Another Workflow').first().json.employeeId }}"}]}},"typeVersion":2.2},{"id":"ecc2d8d5-4a23-4bfd-840b-63c28980462f","name":"Strip Sensitive Fields1","type":"n8n-nodes-base.set","position":[1800,260],"parameters":{"options":{},"assignments":{"assignments":[{"id":"e20217cf-7c70-4907-9da6-a114104a099e","name":"company","type":"string","value":"={{ $json.company }}"},{"id":"2dfe8342-c442-4ac3-90bd-92fe7d38d407","name":"hrEmployeeId","type":"string","value":"={{ $json.hrEmployeeId }}"},{"id":"57fe4519-246b-44aa-a0c9-22e1e865041c","name":"payrollCode","type":"string","value":"={{ $json.payrollCode }}"},{"id":"d296021c-09b2-43b2-8b8e-ebb5d7d9d14d","name":"firstName","type":"string","value":"={{ $json.firstName }}"},{"id":"661e0049-d28f-4f78-83fc-7a1b21f742c2","name":"lastName","type":"string","value":"={{ $json.lastName }}"},{"id":"59f7fd87-ba84-426a-ad61-c682cf8227bf","name":"email","type":"string","value":"={{ $json.email }}"},{"id":"9769c078-c5f5-4d56-b467-765dd73444f9","name":"phone","type":"string","value":"={{ $json.phone }}"},{"id":"e387bc11-dccf-4baf-b87f-a2abb5f61b5d","name":"mailingStreet","type":"string","value":"={{ $json.mailingStreet }}"},{"id":"415451c5-c3c1-42d4-9f5b-829277bfb7f3","name":"mailingStateProvince","type":"string","value":"={{ $json.mailingStateProvince }}"},{"id":"cf2a83f4-28a8-44bd-9d06-780db1406f8f","name":"mailingPostalCode","type":"string","value":"={{ $json.mailingPostalCode }}"},{"id":"94ee2e05-9969-43f2-a732-57356f8b4dfe","name":"mailingCountry","type":"string","value":"={{ $json.mailingCountry }}"},{"id":"b01a56c9-fc42-4bff-9443-27075699986f","name":"location","type":"string","value":"={{ $json.location }}"},{"id":"b9175d72-6976-4765-b773-f4521668d130","name":"department","type":"string","value":"={{ $json.department }}"},{"id":"d784e800-e13b-4d43-907c-11aaaf4ee24f","name":"team","type":"string","value":"={{ $json.team }}"},{"id":"1ff68eb6-35f9-4a2d-9a37-14b3a6f6e0ee","name":"jobGrade","type":"string","value":"={{ $json.jobGrade }}"},{"id":"5628bbf8-872d-4e3a-bf37-c36f13c0f4b1","name":"jobTitle","type":"string","value":"={{ $json.jobTitle }}"},{"id":"34f26d59-43b3-4f2c-955b-f6d5ab22a083","name":"jobEffectiveDate","type":"string","value":"={{ $json.jobEffectiveDate }}"},{"id":"e3023e94-fbc8-4e9b-b106-687ea533e3f8","name":"contractType","type":"string","value":"={{ $json.contractType }}"},{"id":"d3dcf24c-5e9b-40e5-9f54-fca930ab1528","name":"normalWeeklyHours","type":"number","value":"={{ $json.normalWeeklyHours }}"},{"id":"65ed75a6-1ec1-456f-b19b-4492e31f5c18","name":"daysWorkedPerWeek","type":"number","value":"={{ $json.daysWorkedPerWeek }}"}]}},"typeVersion":3.4},{"id":"77a71a55-f0cf-4f76-b697-b31dba447f30","name":"Strip Sensitive Fields","type":"n8n-nodes-base.set","position":[1800,60],"parameters":{"options":{},"assignments":{"assignments":[{"id":"e20217cf-7c70-4907-9da6-a114104a099e","name":"company","type":"string","value":"={{ $json.company }}"},{"id":"2dfe8342-c442-4ac3-90bd-92fe7d38d407","name":"hrEmployeeId","type":"string","value":"={{ $json.hrEmployeeId }}"},{"id":"57fe4519-246b-44aa-a0c9-22e1e865041c","name":"payrollCode","type":"string","value":"={{ $json.payrollCode }}"},{"id":"d296021c-09b2-43b2-8b8e-ebb5d7d9d14d","name":"firstName","type":"string","value":"={{ $json.firstName }}"},{"id":"661e0049-d28f-4f78-83fc-7a1b21f742c2","name":"lastName","type":"string","value":"={{ $json.lastName }}"},{"id":"59f7fd87-ba84-426a-ad61-c682cf8227bf","name":"email","type":"string","value":"={{ $json.email }}"},{"id":"9769c078-c5f5-4d56-b467-765dd73444f9","name":"phone","type":"string","value":"={{ $json.phone }}"},{"id":"e387bc11-dccf-4baf-b87f-a2abb5f61b5d","name":"mailingStreet","type":"string","value":"={{ $json.mailingStreet }}"},{"id":"415451c5-c3c1-42d4-9f5b-829277bfb7f3","name":"mailingStateProvince","type":"string","value":"={{ $json.mailingStateProvince }}"},{"id":"cf2a83f4-28a8-44bd-9d06-780db1406f8f","name":"mailingPostalCode","type":"string","value":"={{ $json.mailingPostalCode }}"},{"id":"94ee2e05-9969-43f2-a732-57356f8b4dfe","name":"mailingCountry","type":"string","value":"={{ $json.mailingCountry }}"},{"id":"b01a56c9-fc42-4bff-9443-27075699986f","name":"location","type":"string","value":"={{ $json.location }}"},{"id":"b9175d72-6976-4765-b773-f4521668d130","name":"department","type":"string","value":"={{ $json.department }}"},{"id":"d784e800-e13b-4d43-907c-11aaaf4ee24f","name":"team","type":"string","value":"={{ $json.team }}"},{"id":"1ff68eb6-35f9-4a2d-9a37-14b3a6f6e0ee","name":"jobGrade","type":"string","value":"={{ $json.jobGrade }}"},{"id":"5628bbf8-872d-4e3a-bf37-c36f13c0f4b1","name":"jobTitle","type":"string","value":"={{ $json.jobTitle }}"},{"id":"34f26d59-43b3-4f2c-955b-f6d5ab22a083","name":"jobEffectiveDate","type":"string","value":"={{ $json.jobEffectiveDate }}"},{"id":"e3023e94-fbc8-4e9b-b106-687ea533e3f8","name":"contractType","type":"string","value":"={{ $json.contractType }}"},{"id":"d3dcf24c-5e9b-40e5-9f54-fca930ab1528","name":"normalWeeklyHours","type":"number","value":"={{ $json.normalWeeklyHours }}"},{"id":"65ed75a6-1ec1-456f-b19b-4492e31f5c18","name":"daysWorkedPerWeek","type":"number","value":"={{ $json.daysWorkedPerWeek }}"}]}},"typeVersion":3.4},{"id":"86f73b12-afc8-4694-a79d-45c908cc88dd","name":"Update Employee1","type":"n8n-nodes-base.httpRequest","position":[1800,460],"parameters":{"url":"https://api.paycaptain.com/employee","method":"POST","options":{"pagination":{"pagination":{"parameters":{"parameters":[{"name":"page","value":"={{ $request.qs.page + 1 }}"}]},"maxRequests":3,"requestInterval":1000,"limitPagesFetched":true}}},"jsonBody":"={{\n{\n  hrEmployeeId: $('When Executed by Another Workflow').item.json.employeeId,\n  ..\n}\n}}","sendBody":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"sPolCkoJ1zhzWabJ","name":"JWT TOKEN"}},"typeVersion":4.2},{"id":"122fe6f7-3bcd-4f29-a95c-c727a799e1fd","name":"Valid Fields Only","type":"n8n-nodes-base.set","position":[1380,460],"parameters":{"options":{},"assignments":{"assignments":[{"id":"4f3d0703-21f3-4ca1-bf7a-9c80d9efc936","name":"values","type":"object","value":"={{\n([\n  \"firstname\",\n  \"middlename\",\n  \"lastname\",\n  \"mailingStreet\",\n  \"mailingCity\",\n  \"mailingStateProvince\",\n  \"mailingPostalCode\",\n  \"mailingCountry\",\n  \"email\",\n  \"phone\",\n  \"niNumber\",\n  \"location\",\n  \"department\",\n  \"team\",\n  \"jobGrade\",\n  \"jobTitle\",\n]\n  .reduce((acc, key) => ({\n    ...acc,\n    [key]: $('When Executed by Another Workflow').item.json.values[key] ?? undefined\n  }), {}))\n}}"}]}},"typeVersion":3.4},{"id":"13e5f143-1abf-444c-b86c-ae51fe839894","name":"Has Valid Request?","type":"n8n-nodes-base.if","position":[1580,460],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"54d35a49-e698-427d-9fca-280b83f2827d","operator":{"type":"object","operation":"notEmpty","singleValue":true},"leftValue":"={{ $json.values }}","rightValue":""}]}},"typeVersion":2.2},{"id":"b98f1d73-a994-4040-b421-75e626ec4ce6","name":"Get Error Response","type":"n8n-nodes-base.set","position":[1800,640],"parameters":{"options":{},"assignments":{"assignments":[{"id":"b33ebf1d-d0e8-4dda-90e7-b53c21b2a410","name":"response","type":"string","value":"=Request included fields which cannot be updated. Editable fields are: {{ [\n  \"firstname\",\n  \"middlename\",\n  \"lastname\",\n  \"mailingStreet\",\n  \"mailingCity\",\n  \"mailingStateProvince\",\n  \"mailingPostalCode\",\n  \"mailingCountry\",\n  \"email\",\n  \"phone\",\n  \"niNumber\",\n  \"location\",\n  \"department\",\n  \"team\",\n  \"jobGrade\",\n  \"jobTitle\",\n].join(', ')}}"}]}},"typeVersion":3.4},{"id":"cb140f3f-571c-49a4-a24d-dcee11c5b7e1","name":"Get Success Response","type":"n8n-nodes-base.set","position":[2020,460],"parameters":{"options":{},"assignments":{"assignments":[{"id":"a1d245c9-b1e5-4cec-a901-4a6ecc9bd98d","name":"response","type":"string","value":"ok"}]}},"typeVersion":3.4},{"id":"39cd1188-5f2e-45ce-8bbc-0586812491ec","name":"Aggregate Get Response","type":"n8n-nodes-base.aggregate","position":[2020,260],"parameters":{"options":{},"aggregate":"aggregateAllItemData","destinationFieldName":"response"},"typeVersion":1},{"id":"d9c1ed21-29e4-41a6-9855-36f1568f7944","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[620,-360],"parameters":{"color":7,"width":400,"height":220,"content":"![](https://cdn.prod.website-files.com/6628137b611845ebff95551f/6628137b611845ebff9556e7_paycaptain-logo.svg#full-width)\n**Website**: https://paycaptain.com\n**DeveloperHub**: https://developer.paycaptain.com\n\n**Good to know:** PayCaptain also sponsors the n8n London Meetups - Definitely check them out!"},"typeVersion":1},{"id":"efc7ab35-202d-4a1f-98ce-7ae310c22250","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[-540,-640],"parameters":{"width":440,"height":1180,"content":"## Try It Out!\n### This n8n demonstrates how any organisation can quickly and easily build and offer MCP servers to their customers or internal staff to improve productivity.\n\nThis MCP example uses PayCaptain.com as an example and shows how to create an MCP server which can search for and update employee data.\n\n### How it works\n* A MCP server trigger is used and connected to 3 custom workflow tools: Search Employee, Get Employee by ID and Update Employee.\n* Each tool makes calls to the PayCaptain API to perform their respective tasks. Extra care  is performed to strip out sensitive data and ensure we're not sharing too much.\n* The Update Employee too also guards against updating fields which would preferably remain readonly. When you control the MCP server, you can determine behaviour of the tool.\n* Finally, a Google Sheet node is used to log all operations for later audit. This will add a tiny bit of latency but recommended if sensitive data is being accessed.\n\n### How to use\n* This MCP server allows any compatible MCP client to manage their PayCaptain employee database. You will need to have a PayCaptain account and developer key to use it.\n* Connect your MCP client by following the n8n guidelines here - https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-langchain.mcptrigger/#integrating-with-claude-desktop\n* Try the following queries in your MCP client:\n  * \"When did Sarah start here employment at the company?\"\n  * \"Does Jack work Wednesdays or Fridays?\"\n  * \"Please update Tracy's NI number to ABCD123456\"\n\n### Requirements\n* PayCaptain Account and Developer Key.\n* Google Sheets to log actions for later audit.\n* MCP Client or Agent for usage such as Claude Desktop - https://claude.ai/download\n\n### Customising this workflow\n* Add or remove employee attributes as required for your user case.\n* If Google Sheets is too slow, consider an API call to a faster service to log calls to the MCP server.\n* Remember to set the MCP server to require credentials before going to production and sharing this MCP server with others!"},"typeVersion":1}],"pinData":{},"connections":{"Log Call":{"main":[[{"node":"Operation","type":"main","index":0}]]},"Operation":{"main":[[{"node":"Get Employees","type":"main","index":0}],[{"node":"Get Employees1","type":"main","index":0}],[{"node":"Valid Fields Only","type":"main","index":0}]]},"Get Employee":{"ai_tool":[[{"node":"Paycaptain MCP Server","type":"ai_tool","index":0}]]},"Get Employees":{"main":[[{"node":"Filter Matches","type":"main","index":0}]]},"Filter Matches":{"main":[[{"node":"Strip Sensitive Fields","type":"main","index":0}]]},"Get Employees1":{"main":[[{"node":"Filter Matching ID","type":"main","index":0}]]},"Update Employee":{"ai_tool":[[{"node":"Paycaptain MCP Server","type":"ai_tool","index":0}]]},"Search Employees":{"ai_tool":[[{"node":"Paycaptain MCP Server","type":"ai_tool","index":0}]]},"Update Employee1":{"main":[[{"node":"Get Success Response","type":"main","index":0}]]},"Valid Fields Only":{"main":[[{"node":"Has Valid Request?","type":"main","index":0}]]},"Filter Matching ID":{"main":[[{"node":"Strip Sensitive Fields1","type":"main","index":0}]]},"Has Valid Request?":{"main":[[{"node":"Update Employee1","type":"main","index":0}],[{"node":"Get Error Response","type":"main","index":0}]]},"Strip Sensitive Fields":{"main":[[{"node":"Aggregate Search Results","type":"main","index":0}]]},"Strip Sensitive Fields1":{"main":[[{"node":"Aggregate Get Response","type":"main","index":0}]]},"When Executed by Another Workflow":{"main":[[{"node":"Log Call","type":"main","index":0}]]}}}


name: Auto-create and publish AI social videos with Telegram, GPT-4 and Blotato
author_name: Dr. Firas
author_username: drfiras
categories: []
created_at: 2025-04-21T23:28:43.913Z
updated_at: 2025-04-21T23:28:43.913Z
url: https://n8n.io/workflows/3654
scraped_at: 2025-07-06 21:16:30
description:
  Auto-create and publish AI social videos with Telegram, GPT-4 and Blotato

  &gt; ⚠️ Disclaimer: This workflow uses Community Nodes and must be run on a self-hosted instance of n8n.

  Who is this for?

  This template is perfect for social media managers, content creators, AI enthusiasts, and automation pros who want to generate short-form videos (Reels) from a simple Telegram message, then publish them across multiple platforms—all without video editing or manual uploads.

  What problem is this workflow solving?

  Creating content is only half the job. The real bottleneck comes in:
  Rendering the video,
  Adding voice or music,
  Writing captions and titles,
  Publishing to multiple platforms.

  This workflow automates all of that using AI. It saves hours every week and guarantees consistent output.

  What this workflow does

  This end-to-end automation handles everything from AI video generation to social publishing:

  Starts with a Telegram message (text or image prompt)
  Generates video using Kling or Blotato, based on the input
  Creates music with Piapi and merges it with the video
  Generates text overlays and captions with GPT-4
  Builds a stylized video using JSON2Video
  Logs results to Google Sheets
  Sends final output back to Telegram
  Auto-posts the video to 9 platforms via Blotato (Instagram, TikTok, YouTube, Facebook, LinkedIn, Threads, Twitter/X, Pinterest, Bluesky)

  Setup

  Connect your Telegram bot to the trigger node.
  Add your OpenAI API key for all GPT nodes.
  Set up Kling and Piapi API access (for video and music generation).
  Connect your Cloudinary account to upload images.
  Link a Google Sheet with columns: Title, Caption, URL.
  Set your Blotato API key and fill in the platform-specific account IDs.

  How to customize this workflow to your needs

  Change prompt formatting** to control GPT responses and video tone.
  Edit text styling** in JSON2Video to match your brand.
  Add a Telegram approval step** before publishing, if needed.
  Disable platforms** you don’t use by deleting their HTTP Request nodes.
  Use a Google Sheet filter** to only process new rows or drafts.


  📄 Documentation: Notion Guide

nodes_used:
  ["n8n-nodes-base.googleSheets","n8n-nodes-base.httpRequest","n8n-nodes-base.telegram","n8n-nodes-base.code","@n8n/n8n-nodes-langchain.openAi"]

workflow_json:
  {"id":"hiCTcf6srJl3Xsxh","meta":{"instanceId":"a2b23892dd6989fda7c1209b381f5850373a7d2b85609624d7c2b7a092671d44"},"name":"Auto-create and publish AI social videos with Telegram, GPT-4 and Blotato","tags":[],"nodes":[{"id":"b8a41b63-8c48-4964-befe-b949f3e9b755","name":"Upload Video to Blotato","type":"n8n-nodes-base.httpRequest","position":[2580,920],"parameters":{"url":"https://backend.blotato.com/v2/media","method":"POST","options":{},"sendBody":true,"sendHeaders":true,"bodyParameters":{"parameters":[{"name":"url","value":"={{ $('Append Video Data to Google Sheet').item.json['url '] }}"}]},"headerParameters":{"parameters":[{"name":"blotato-api-key"}]}},"typeVersion":4.2},{"id":"ac7a8bf1-b9ec-4a25-8c14-6d90abbc5568","name":"Post to Instagram","type":"n8n-nodes-base.httpRequest","position":[2800,120],"parameters":{"url":"https://backend.blotato.com/v2/posts","method":"POST","options":{},"jsonBody":"={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Platform IDs for Blotato').item.json.instagram_id }}\",\n    \"target\": {\n      \"targetType\": \"instagram\"\n    },\n    \"content\": {\n      \"text\": \"{{ $('Append Video Data to Google Sheet').item.json.caption }}\",\n      \"platform\": \"instagram\",\n      \"mediaUrls\": [\n        \"{{ $json.url }}\"\n      ]\n    }\n  }\n}\n","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"blotato-api-key"}]}},"typeVersion":4.2},{"id":"be0a1831-c0e3-4753-b114-2cd7cc66fae2","name":"Post to YouTube","type":"n8n-nodes-base.httpRequest","position":[2800,320],"parameters":{"url":"https://backend.blotato.com/v2/posts","method":"POST","options":{},"jsonBody":"={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Platform IDs for Blotato').item.json.youtube_id }}\",\n    \"target\": {\n      \"targetType\": \"youtube\",\n      \"title\": \"{{ $('Append Video Data to Google Sheet').item.json.Title }}\",\n      \"privacyStatus\": \"unlisted\",\n      \"shouldNotifySubscribers\": \"false\"\n    },\n    \"content\": {\n      \"text\": \"{{ $('Append Video Data to Google Sheet').item.json.caption }}\",\n      \"platform\": \"youtube\",\n      \"mediaUrls\": [\n        \"{{ $json.url }}\"\n      ]\n    }\n  }\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"blotato-api-key"}]}},"typeVersion":4.2},{"id":"62087008-dd5a-49f4-a764-a10b1c82e4e0","name":"Post to TikTok","type":"n8n-nodes-base.httpRequest","position":[2800,520],"parameters":{"url":"https://backend.blotato.com/v2/posts","method":"POST","options":{},"jsonBody":"={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Platform IDs for Blotato').item.json.tiktok_id }}\",\n    \"target\": {\n      \"targetType\": \"tiktok\",\n      \"isYourBrand\": \"false\", \n      \"disabledDuet\": \"false\",\n      \"privacyLevel\": \"PUBLIC_TO_EVERYONE\",\n      \"isAiGenerated\": \"true\",\n      \"disabledStitch\": \"false\",\n      \"disabledComments\": \"false\",\n      \"isBrandedContent\": \"false\"\n      \n    },\n    \"content\": {\n      \"text\": \"{{ $('Append Video Data to Google Sheet').item.json.caption }}\",\n      \"platform\": \"tiktok\",\n      \"mediaUrls\": [\n        \"{{ $json.url }}\"\n      ]\n    }\n  }\n}\n","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"blotato-api-key"}]}},"typeVersion":4.2},{"id":"976b075d-c98b-45a4-bf76-06a34d5ccbf3","name":"Post to Facebook Page","type":"n8n-nodes-base.httpRequest","position":[2800,720],"parameters":{"url":"https://backend.blotato.com/v2/posts","method":"POST","options":{},"jsonBody":"={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Platform IDs for Blotato').item.json.facebook_id }}\",\n    \"target\": {\n      \"targetType\": \"facebook\",\n      \"pageId\": \"{{ $('Assign Platform IDs for Blotato').item.json.facebook_page_id }}\"\n\n      \n    },\n    \"content\": {\n      \"text\": \"{{ $('Append Video Data to Google Sheet').item.json.caption }}\",\n      \"platform\": \"facebook\",\n      \"mediaUrls\": [\n        \"{{ $json.url }}\"\n      ]\n    }\n  }\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"blotato-api-key"}]}},"typeVersion":4.2},{"id":"c689c5d4-f63c-4fc2-b2d6-e1d2d03a236a","name":"Post to Threads","type":"n8n-nodes-base.httpRequest","position":[2800,920],"parameters":{"url":"https://backend.blotato.com/v2/posts","method":"POST","options":{},"jsonBody":"={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Platform IDs for Blotato').item.json.threads_id }}\",\n    \"target\": {\n      \"targetType\": \"threads\"\n      \n    },\n    \"content\": {\n      \"text\": \"{{ $('Append Video Data to Google Sheet').item.json.caption }}\",\n      \"platform\": \"threads\",\n      \"mediaUrls\": [\n        \"{{ $json.url }}\"\n      ]\n    }\n  }\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"blotato-api-key"}]}},"typeVersion":4.2},{"id":"88c8bd03-342e-4844-9489-28a5a93426e0","name":"Post to Twitter (X)","type":"n8n-nodes-base.httpRequest","position":[2800,1120],"parameters":{"url":"https://backend.blotato.com/v2/posts","method":"POST","options":{},"jsonBody":"={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Platform IDs for Blotato').item.json.twitter_id }}\",\n    \"target\": {\n      \"targetType\": \"twitter\"\n      \n    },\n    \"content\": {\n      \"text\": \"{{ $('Append Video Data to Google Sheet').item.json.caption }}\",\n      \"platform\": \"twitter\",\n      \"mediaUrls\": [\n        \"{{ $json.url }}\"\n      ]\n    }\n  }\n}\n","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"blotato-api-key"}]}},"typeVersion":4.2},{"id":"db6fb042-731e-46ce-8f4d-07e2b427739c","name":"Post to LinkedIn","type":"n8n-nodes-base.httpRequest","position":[2800,1320],"parameters":{"url":"https://backend.blotato.com/v2/posts","method":"POST","options":{},"jsonBody":"={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Platform IDs for Blotato').item.json.linkedin_id }}\",\n    \"target\": {\n      \"targetType\": \"linkedin\"\n      \n    },\n    \"content\": {\n      \"text\": \"{{ $('Append Video Data to Google Sheet').item.json.caption }}\",\n      \"platform\": \"linkedin\",\n      \"mediaUrls\": [\n        \"{{ $json.url }}\"\n      ]\n    }\n  }\n}\n","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"blotato-api-key"}]}},"typeVersion":4.2},{"id":"2102531c-624a-49b6-8b99-7a43e5067585","name":"Post to Bluesky","type":"n8n-nodes-base.httpRequest","position":[2800,1520],"parameters":{"url":"https://backend.blotato.com/v2/posts","method":"POST","options":{},"jsonBody":"={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Platform IDs for Blotato').item.json.bluesky_id }}\",\n    \"target\": {\n      \"targetType\": \"bluesky\"\n      \n    },\n    \"content\": {\n      \"text\": \"{{ $('Append Video Data to Google Sheet').item.json.caption }}\",\n      \"platform\": \"bluesky\",\n      \"mediaUrls\": [\n        \"https://pbs.twimg.com/media/GE8MgIiWEAAfsK3.jpg\"\n      ]\n    }\n  }\n}\n","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"blotato-api-key"}]}},"typeVersion":4.2},{"id":"a9826150-6e26-4174-af74-1b4dd8016638","name":"Post to Pinterest","type":"n8n-nodes-base.httpRequest","position":[2800,1720],"parameters":{"url":"https://backend.blotato.com/v2/posts","method":"POST","options":{},"jsonBody":"={\n  \"post\": {\n    \"accountId\": \"{{ $('Assign Platform IDs for Blotato').item.json.pinterest_id }}\",\n    \"target\": {\n      \"targetType\": \"pinterest\",\n      \"boardId\": \"{{ $('Assign Platform IDs for Blotato').item.json.pinterest_board_id }}\"      \n    },\n    \"content\": {\n      \"text\": \"{{ $('Append Video Data to Google Sheet').item.json.caption }}\",\n      \"platform\": \"pinterest\",\n      \"mediaUrls\": [\n        \"https://pbs.twimg.com/media/GE8MgIiWEAAfsK3.jpg\"\n      ]\n    }\n  }\n}\n","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"blotato-api-key"}]}},"typeVersion":4.2},{"id":"fcd6f25a-f6e9-4952-8be8-37eafbf7d07f","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[2320,0],"parameters":{"color":3,"width":880,"height":1900,"content":"# 🟥 STEP 5 — Auto-Publish to 9 Social Platforms\n## The final step automates distribution using Blotato’s API.\n"},"typeVersion":1},{"id":"eb822c9d-cb51-4df7-98d6-a0941a9833bd","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[0,0],"parameters":{"width":2260,"height":760,"content":"# 🟫 STEP 1 — Create Video Using AI (image or text)\n## This step handles the full video creation pipeline using AI.\n### It starts from a Telegram message containing a prompt or image, \n"},"typeVersion":1},{"id":"1c209fe5-fd5a-45d7-9546-421710eb501d","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[0,840],"parameters":{"width":1500,"height":520,"content":"# 🟫 STEP 2 — Create Music\n## Here, a short-form voice-over script is generated using GPT-4 based on the topic.\n### The script is converted to speech, uploaded, and merged with the AI-generated video — resulting in a fully narrated visual asset.\n"},"typeVersion":1},{"id":"0bf198f2-16f9-4ae9-aef3-919b5755da5a","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[0,1440],"parameters":{"width":1500,"height":460,"content":"# 🟫 STEP 3 — Add Captions to Enhance Engagement\n## To increase accessibility and boost social engagement, \n## this step overlays professional-looking subtitles on the video using a styling template.\n### This results in a final video that includes visuals, voice-over, and captions.\n"},"typeVersion":1},{"id":"00c67803-c937-491e-bf2a-2d76774de07f","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[1580,840],"parameters":{"color":4,"width":680,"height":1060,"content":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n# 🟫 STEP 4 — Save Video & Notify via Telegram\n## This step generates a title and caption for the video, \n## saves the content metadata to a Google Sheet for future tracking, \n### And sends both the final video and its description to a Telegram chat for validation or reuse.\n### The script is converted to speech, uploaded, and merged with the AI-generated video — resulting in a fully narrated visual asset.\n"},"typeVersion":1},{"id":"5a08a003-68b1-48e5-8851-bb1a77d18a37","name":"Trigger Telegram Prompt or Image","type":"n8n-nodes-base.telegramTrigger","position":[80,280],"webhookId":"20261394-b809-4b76-9b7b-36a20af57673","parameters":{"updates":["message"],"additionalFields":{}},"credentials":{"telegramApi":{"id":"hcYH7o64erx701LY","name":"Telegram account 3"}},"typeVersion":1.1},{"id":"6c4d7dd5-7676-465a-ac02-cf7192bf70ab","name":"Split Prompt or Image Input","type":"n8n-nodes-base.code","position":[280,280],"parameters":{"jsCode":"const input = $input.first().json.message.text || $input.first().json.message.caption;\n\n// Remove optional \"generate video\" prefix\nconst cleaned = input.replace(/^generate video[:]?/i, '').trim();\n\n// Split by comma\nconst parts = cleaned.split(',').map(p => p.trim());\n\n// Assign values even if missing\nconst videoPrompt = parts[0] || \"\";\nconst captionIdea = parts[1] || \"\";\nconst musicStyle = parts[2] || \"\";\n\nreturn [\n  {\n    json: {\n      videoPrompt,\n      captionIdea,\n      musicStyle\n    }\n  }\n];\n"},"typeVersion":2},{"id":"3c203e0c-d133-4c6f-a801-2e5dab690b8a","name":"Condition Input Type (Image or Text)","type":"n8n-nodes-base.if","position":[460,280],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"8b4d3f92-c9e0-45e6-8b6a-4fa487e6b32f","operator":{"type":"string","operation":"notEmpty","singleValue":true},"leftValue":"={{ $('Trigger Telegram Prompt or Image').item.json.message.text }}","rightValue":""}]}},"typeVersion":2.2},{"id":"1898fd9c-2164-44d0-8ada-192107565b64","name":"Download Image from Telegram","type":"n8n-nodes-base.telegram","position":[760,440],"webhookId":"1d115d8e-62c9-4f43-898e-20892b25fdb9","parameters":{"fileId":"={{ $('Trigger Telegram Prompt or Image').item.json.message.photo[3].file_id }}","resource":"file"},"credentials":{"telegramApi":{"id":"hcYH7o64erx701LY","name":"Telegram account 3"}},"typeVersion":1.2},{"id":"6f9755e0-db11-4c3e-9d1b-f9c97c832cbd","name":"Extract Image File URL","type":"n8n-nodes-base.httpRequest","position":[960,440],"parameters":{"url":"=https://api.telegram.org/file/bot_YOURTOKEN/{{ $('Download Image from Telegram').item.json.result.file_path }}","options":{}},"typeVersion":4.2},{"id":"66abae9c-10ae-4845-9070-cd5f2d208782","name":"Upload Image to Cloudinary","type":"n8n-nodes-base.httpRequest","position":[1120,440],"parameters":{"url":"https://api.cloudinary.com/v1_1/dc5wapno3/image/upload","method":"POST","options":{},"sendBody":true,"contentType":"multipart-form-data","authentication":"genericCredentialType","bodyParameters":{"parameters":[{"name":"file","parameterType":"formBinaryData","inputDataFieldName":"data"},{"name":"upload_preset","value":"n8n_video"}]},"genericAuthType":"httpBasicAuth"},"credentials":{"httpBasicAuth":{"id":"K1UGehJnDI8N25UA","name":"Unnamed credential"}},"typeVersion":4.2},{"id":"26979ac8-6f1d-4a9b-b0b5-42b4d7165ffe","name":"Convert Image to Video","type":"n8n-nodes-base.httpRequest","position":[1320,440],"parameters":{"url":"https://api.piapi.ai/api/v1/task","method":"POST","options":{},"jsonBody":"={\n\"model\": \"kling\",\n\"task_type\": \"video_generation\",\n\"input\": {\n\"prompt\": \"{{ $('Split Prompt or Image Input').item.json.videoPrompt }}\",\n\"image_url\": \"{{ $json.secure_url }}\",\n\"negative_prompt\": \"\",\n\"cfg_scale\": 0.5,\n\"duration\": 5,\n\"version\": \"1.6\",\n\"camera_control\": {\n\"type\": \"simple\",\n\"config\": {\n\"horizontal\": 0,\n\"vertical\": 0,\n\"pan\": 0,\n\"tilt\": 0,\n\"roll\": 0,\n\"zoom\": 0\n}\n},\n\"mode\": \"std\"\n},\n\"config\": {\n\"service_mode\": \"\",\n\"webhook_config\": {\n\"endpoint\": \"\",\n\"secret\": \"\"\n}\n}\n}","sendBody":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"credentials":{"httpBasicAuth":{"id":"K1UGehJnDI8N25UA","name":"Unnamed credential"},"httpHeaderAuth":{"id":"aoHHS9dlGs8ViUeX","name":"Header Auth account 3"}},"typeVersion":4.2},{"id":"36168808-54e8-4826-a3f5-bd8148da9a55","name":"Wait for Image-to-Video Rendering","type":"n8n-nodes-base.wait","position":[1520,440],"webhookId":"adf3489e-21ed-42de-8cc6-70c706cacbbf","parameters":{"unit":"minutes","amount":2},"typeVersion":1.1},{"id":"dd364492-ffcb-47e4-a24e-fb5b3c5b4ab5","name":"Get Image-Based Video URL","type":"n8n-nodes-base.httpRequest","position":[1720,440],"parameters":{"url":"=https://api.piapi.ai/api/v1/task/{{ $json.data.task_id }}","options":{"response":{"response":{"responseFormat":"json"}}},"authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"aoHHS9dlGs8ViUeX","name":"Header Auth account 3"}},"typeVersion":4.2},{"id":"8a6b0c07-8304-403e-842e-ea60b0d5e939","name":"Generate Video with blotato","type":"n8n-nodes-base.httpRequest","position":[760,120],"parameters":{"url":"https://backend.blotato.com/v2/videos/creations","method":"POST","options":{},"jsonBody":"={\n  \"script\": \"{{ $json.videoPrompt }}\",\n  \"style\": \"cinematic\",\n  \"template\": {\n    \"id\": \"base/pov/wakeup\"\n  }\n}\n","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"blotato-api-key"}]}},"typeVersion":4.2},{"id":"14f39088-402d-477e-afe7-1fa8a3f0edf5","name":"Wait for blotato Video Rendering","type":"n8n-nodes-base.wait","position":[1520,120],"webhookId":"00fc9999-cacc-4c9b-b71b-75757c56f31e","parameters":{"unit":"minutes","amount":2},"typeVersion":1.1},{"id":"540a8cbf-0b41-4102-b2c3-a69480603cb6","name":"Get blotato Video URL","type":"n8n-nodes-base.httpRequest","position":[1720,120],"parameters":{"url":"=https://backend.blotato.com/v2/videos/creations/{{ $json.item.id }}","options":{"response":{"response":{"responseFormat":"json"}}},"sendHeaders":true,"headerParameters":{"parameters":[{"name":"blotato-api-key"}]}},"typeVersion":4.2},{"id":"e549069b-0acb-44dd-ba58-d6fe76b4b782","name":"Merge Video Data (Image or Prompt)","type":"n8n-nodes-base.set","position":[2060,440],"parameters":{"options":{},"assignments":{"assignments":[{"id":"5ca907c0-f556-488d-ad59-714089b2a594","name":"url_video","type":"string","value":"={{ $json.item.mediaUrl }}{{ $json.data.output.video_url }} "}]}},"typeVersion":3.4},{"id":"4482e940-fdee-498a-9b4c-dd44a12f04a9","name":"Generate Music with Piapi","type":"n8n-nodes-base.httpRequest","position":[60,1040],"parameters":{"url":"https://api.piapi.ai/api/v1/task","method":"POST","options":{},"jsonBody":"={\n  \"model\": \"Qubico/diffrhythm\",\n  \"task_type\": \"txt2audio-base\",\n  \"input\": {\n    \"style_prompt\": \"{{ $('Split Prompt or Image Input').item.json.musicStyle }}\",\n    \"lyrics\": \"\",\n    \"style_audio\": \"\"\n  },\n  \"config\": {\n    \"webhook_config\": {\n      \"endpoint\": \"\",\n      \"secret\": \"\"\n    }\n  }\n}\n","sendBody":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"aoHHS9dlGs8ViUeX","name":"Header Auth account 3"}},"typeVersion":4.2},{"id":"e2187d71-aace-4cf4-8ef3-b4b14d255f54","name":"Wait for Music Generation","type":"n8n-nodes-base.wait","position":[480,1040],"webhookId":"ecf06ea7-0f87-42f6-939f-688e7eb20da1","parameters":{"unit":"minutes","amount":2},"typeVersion":1.1},{"id":"8ea22e87-0803-4618-a4cb-08a6b720838e","name":"Get Music File URL","type":"n8n-nodes-base.httpRequest","position":[700,1040],"parameters":{"url":"=https://api.piapi.ai/api/v1/task/{{ $json.data.task_id }}","options":{"response":{"response":{"responseFormat":"json"}}},"authentication":"genericCredentialType","genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"aoHHS9dlGs8ViUeX","name":"Header Auth account 3"}},"typeVersion":4.2},{"id":"61b49201-e9d5-44b8-be6c-d0175596d261","name":"Generate Script (GPT-4o-mini)","type":"@n8n/n8n-nodes-langchain.openAi","position":[920,1040],"parameters":{"modelId":{"__rl":true,"mode":"list","value":"gpt-4o-mini","cachedResultName":"GPT-4O-MINI"},"options":{},"messages":{"values":[{"content":"=You are a copywriter for short-form vertical videos.\nVideo topic:\n{{ $('Split Prompt or Image Input').first().json.captionIdea }}\nWrite two short lines of overlay text:\n\ntext1: Hook (no period)\n\ntext2: Emotional or curiosity payoff (ends with \"...\")\n\nExample:\ntext1: Why I broke up with ChatGPT\ntext2: this other AI gets me so much better...\n\nRules:\n\nMax 50 characters per line\n\nOutput only:\ntext1: ...\ntext2: ...\n\nNo quotes, brackets, emojis, hashtags, or titles\n\n"}]}},"credentials":{"openAiApi":{"id":"6h3DfVhNPw9I25nO","name":"OpenAi account"}},"typeVersion":1.8},{"id":"30394110-bc11-4139-8303-f536e22733d4","name":"Split Script","type":"n8n-nodes-base.code","position":[1300,1040],"parameters":{"jsCode":"const input = $input.first().json;\n\n// Auto-detect AI output path\nlet aiOutput = \"\";\n\nif (input?.choices?.[0]?.message?.content) {\n  aiOutput = input.choices[0].message.content;\n} else if (input?.message?.content) {\n  aiOutput = input.message.content;\n} else if (typeof input?.content === \"string\") {\n  aiOutput = input.content;\n} else {\n  // Optional: expose the input in case of failure for debug\n  throw new Error(\"❌ No valid AI output found. Check the structure of the input.\");\n}\n\nconst lines = aiOutput.split('\\n').map(l => l.trim());\nlet text1 = \"\";\nlet text2 = \"\";\n\nfor (const line of lines) {\n  if (line.toLowerCase().startsWith(\"text1:\")) {\n    text1 = line.replace(/^text1:\\s*/i, '');\n  } else if (line.toLowerCase().startsWith(\"text2:\")) {\n    text2 = line.replace(/^text2:\\s*/i, '');\n  }\n}\n\nreturn [\n  {\n    json: {\n      text1,\n      text2\n    }\n  }\n];\n"},"typeVersion":2},{"id":"15d7845c-0e0b-4f06-b48e-5ea8add6501a","name":"Merge Video + Music","type":"n8n-nodes-base.httpRequest","position":[80,1640],"parameters":{"url":"https://api.json2video.com/v2/movies","method":"POST","options":{},"jsonBody":"={\n  \"id\": \"qbaasr7s\",\n  \"resolution\": \"instagram-story\",\n  \"quality\": \"high\",\n  \"scenes\": [\n    {\n      \"id\": \"qyjh9lwj\",\n      \"comment\": \"Scene 1\",\n      \"elements\": []\n    }\n  ],\n  \"elements\": [\n    {\n      \"id\": \"q6dznzcv\",\n      \"type\": \"video\",\n      \"src\": \"{{ $('Merge Video Data (Image or Prompt)').item.json.url_video }}\",\n      \"resize\": \"cover\"\n    },\n    {\n      \"id\": \"top-text\",\n      \"type\": \"text\",\n      \"text\": \"{{ $json.text1 }}\",\n      \"settings\": {\n        \"font-family\": \"Libre Baskerville\",\n        \"font-size\": \"80px\",\n        \"color\": \"#ffffff\",\n        \"horizontal-position\": \"center\",\n        \"vertical-position\": \"top\",\n        \"margin-top\": \"100px\",\n        \"word-break\": \"break-word\",\n        \"overflow-wrap\": \"break-word\",\n        \"font-weight\": \"normal\",\n        \"text-shadow\": \"3px 3px 0 #000, -3px -3px 0 #000, 3px -3px 0 #000, -3px 3px 0 #000, 0px 3px 0 #000, 3px 0px 0 #000, -3px 0px 0 #000, 0px -3px 0 #000\"\n      }\n    },\n    {\n      \"id\": \"bottom-text\",\n      \"type\": \"text\",\n      \"text\": \"{{ $json.text2 }}\",\n      \"settings\": {\n        \"font-family\": \"Libre Baskerville\",\n        \"font-size\": \"80px\",\n        \"color\": \"#ffffff\",\n        \"horizontal-position\": \"center\",\n        \"vertical-position\": \"bottom\",\n        \"margin-bottom\": \"250px\",\n        \"word-break\": \"break-word\",\n        \"overflow-wrap\": \"break-word\",\n        \"font-weight\": \"normal\",\n        \"text-shadow\": \"3px 3px 0 #000, -3px -3px 0 #000, 3px -3px 0 #000, -3px 3px 0 #000, 0px 3px 0 #000, 3px 0px 0 #000, -3px 0px 0 #000, 0px -3px 0 #000\"\n      }\n    },\n    {\n      \"id\": \"music-track\",\n      \"type\": \"audio\",\n      \"src\": \"{{ $('Get Music File URL').item.json.data.output.audio_url }}\",\n      \"volume\": 0.5,\n      \"duration\": -2\n    }\n  ]\n}\n","sendBody":true,"specifyBody":"json","authentication":"genericCredentialType","genericAuthType":"httpCustomAuth"},"credentials":{"httpCustomAuth":{"id":"GELGbE2ThQ80HY5A","name":"Custom Auth account"}},"typeVersion":4.2},{"id":"5b014111-3dfc-4190-83cf-b5915a47df1b","name":"Wait for Fusion Completion","type":"n8n-nodes-base.wait","position":[260,1640],"webhookId":"8d188124-8aeb-49b0-bdf8-5a9f42e205e5","parameters":{"unit":"minutes","amount":1},"typeVersion":1.1},{"id":"fdc02ec0-b3ce-49e3-9f20-096c679eacbe","name":"Get Final Video URL","type":"n8n-nodes-base.httpRequest","position":[500,1640],"parameters":{"url":"=https://api.json2video.com/v2/movies?id={{ $json.project }}","options":{},"authentication":"genericCredentialType","genericAuthType":"httpCustomAuth"},"credentials":{"httpCustomAuth":{"id":"GELGbE2ThQ80HY5A","name":"Custom Auth account"}},"typeVersion":4.2},{"id":"9b865654-337a-4dd5-89d4-4a131f6eed75","name":"Generate Social Caption (GPT-4)","type":"@n8n/n8n-nodes-langchain.openAi","position":[720,1640],"parameters":{"modelId":{"__rl":true,"mode":"list","value":"gpt-4o-mini","cachedResultName":"GPT-4O-MINI"},"options":{},"messages":{"values":[{"content":"=Write a short social media caption from this topic:\n{{ $('Split Prompt or Image Input').first().json.captionIdea }}\n\nMake it actionable, not generic or motivational.\nAdd 1 problem + 1 specific solution.\nUse 1 sentence per line, with an empty line between each.\ndon't asking them to comment.\nMaximum 150 characters\n\n🧠 Caption Guidelines:\nKeep it short, compelling, and value-driven.\n\nAvoid generic motivational fluff — focus on real, actionable insight or highlight a problem/solution pattern.\n\n\nStructure:\n\nOne sentence per line.\n\nNote: Do not use this character: \" in the result.\nReturn a single short paragraph with no line breaks and no special characters.\nNote: Do not use this character: \" in the result."}]}},"credentials":{"openAiApi":{"id":"6h3DfVhNPw9I25nO","name":"OpenAi account"}},"typeVersion":1.8},{"id":"99a4282b-5d68-4f4d-8b1e-c7975221b92f","name":"Generate SEO Title (GPT-4)","type":"@n8n/n8n-nodes-langchain.openAi","position":[1160,1640],"parameters":{"modelId":{"__rl":true,"mode":"list","value":"gpt-4o-mini","cachedResultName":"GPT-4O-MINI"},"options":{},"messages":{"values":[{"content":"=Act as a YouTube Title Expert.\nBased on the following video description:\n{{ $('Split Prompt or Image Input').first().json.captionIdea }}\nGenerate a short, punchy, and curiosity-driven YouTube video title that makes people want to click.\nMake it feel urgent, valuable, or surprising — and avoid generic or boring phrases.\nKeep it under 70 characters. Return only the title, no explanations.\nNote: The title must be free of special characters and the character \". Return only a plain text title.\n- Do not start the title with this character : \"\n- Do not finish the title with this character : \"\n- You Never user this character : \" in the title\n"}]}},"credentials":{"openAiApi":{"id":"6h3DfVhNPw9I25nO","name":"OpenAi account"}},"typeVersion":1.8},{"id":"3cbe9fb8-1685-4169-9ee1-3ae72f3190e3","name":"Append Video Data to Google Sheet","type":"n8n-nodes-base.googleSheets","position":[1640,920],"parameters":{"columns":{"value":{"url ":"={{ $('Get Final Video URL').item.json.movie.url }}","Title":"={{ $json.message.content }}","caption":"={{ $('Generate Social Caption (GPT-4)').item.json.message.content }}"},"schema":[{"id":"url ","type":"string","display":true,"required":false,"displayName":"url ","defaultMatch":false,"canBeUsedToMatch":true},{"id":"caption","type":"string","display":true,"required":false,"displayName":"caption","defaultMatch":false,"canBeUsedToMatch":true},{"id":"Title","type":"string","display":true,"removed":false,"required":false,"displayName":"Title","defaultMatch":false,"canBeUsedToMatch":true},{"id":"status","type":"string","display":true,"removed":true,"required":false,"displayName":"status","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"append","sheetName":{"__rl":true,"mode":"id","value":"="},"documentId":{"__rl":true,"mode":"id","value":"="}},"credentials":{"googleSheetsOAuth2Api":{"id":"51us92xkOlrvArhV","name":"Google Sheets account"}},"typeVersion":4.5},{"id":"dd947cd3-747f-484f-93ea-990d977ab113","name":"Send Final Video to Telegram","type":"n8n-nodes-base.telegram","position":[1860,920],"webhookId":"3046e11e-60db-4fcf-9351-22758c833f83","parameters":{"text":"=Here's your scheduled video:\n----------------\nCaption Text: {{ $json.caption }}\n----------------\nVideo Link: {{ $json['url '] }}","chatId":"={{ $('Trigger Telegram Prompt or Image').first().json.message.chat.id }}","additionalFields":{}},"credentials":{"telegramApi":{"id":"hcYH7o64erx701LY","name":"Telegram account 3"}},"typeVersion":1.2},{"id":"c17efd9a-2428-4c36-acd8-69c47d01b961","name":"Send Caption to Telegram","type":"n8n-nodes-base.telegram","position":[2060,920],"webhookId":"1282505d-dcc3-4dbd-9657-fb1362033382","parameters":{"file":"={{ $('Append Video Data to Google Sheet').item.json['url '] }}","chatId":"={{ $json.result.chat.id }}","operation":"sendVideo","additionalFields":{}},"credentials":{"telegramApi":{"id":"hcYH7o64erx701LY","name":"Telegram account 3"}},"typeVersion":1.2},{"id":"b3311fa9-c473-4bd1-8de7-0930c4e799cd","name":"Assign Platform IDs for Blotato","type":"n8n-nodes-base.set","position":[2360,920],"parameters":{"mode":"raw","options":{},"jsonOutput":"{\n  \"instagram_id\": \"1111\",\n  \"youtube_id\": \"2222\",\n  \"threads_id\": \"3333\",\n  \"tiktok_id\": \"4444\",\n  \"facebook_id\": \"5555\",\n  \"facebook_page_id\": \"6666\",\n  \"twitter_id\": \"7777\",\n  \"linkedin_id\": \"8888\",\n  \"pinterest_id\": \"9999\",\n  \"pinterest_board_id\": \"1010\",\n  \"bluesky_id\": \"11111111\"\n}\n"},"typeVersion":3.4}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"2e5e291a-63f6-4680-9cf5-a3baa2ee917d","connections":{"Split Script":{"main":[[{"node":"Merge Video + Music","type":"main","index":0}]]},"Get Music File URL":{"main":[[{"node":"Generate Script (GPT-4o-mini)","type":"main","index":0}]]},"Get Final Video URL":{"main":[[{"node":"Generate Social Caption (GPT-4)","type":"main","index":0}]]},"Merge Video + Music":{"main":[[{"node":"Wait for Fusion Completion","type":"main","index":0}]]},"Get blotato Video URL":{"main":[[{"node":"Merge Video Data (Image or Prompt)","type":"main","index":0}]]},"Convert Image to Video":{"main":[[{"node":"Wait for Image-to-Video Rendering","type":"main","index":0}]]},"Extract Image File URL":{"main":[[{"node":"Upload Image to Cloudinary","type":"main","index":0}]]},"Upload Video to Blotato":{"main":[[{"node":"Post to Instagram","type":"main","index":0},{"node":"Post to YouTube","type":"main","index":0},{"node":"Post to TikTok","type":"main","index":0},{"node":"Post to Facebook Page","type":"main","index":0},{"node":"Post to Threads","type":"main","index":0},{"node":"Post to Twitter (X)","type":"main","index":0},{"node":"Post to LinkedIn","type":"main","index":0},{"node":"Post to Bluesky","type":"main","index":0},{"node":"Post to Pinterest","type":"main","index":0}]]},"Send Caption to Telegram":{"main":[[{"node":"Assign Platform IDs for Blotato","type":"main","index":0}]]},"Generate Music with Piapi":{"main":[[{"node":"Wait for Music Generation","type":"main","index":0}]]},"Get Image-Based Video URL":{"main":[[{"node":"Merge Video Data (Image or Prompt)","type":"main","index":0}]]},"Wait for Music Generation":{"main":[[{"node":"Get Music File URL","type":"main","index":0}]]},"Generate SEO Title (GPT-4)":{"main":[[{"node":"Append Video Data to Google Sheet","type":"main","index":0}]]},"Upload Image to Cloudinary":{"main":[[{"node":"Convert Image to Video","type":"main","index":0}]]},"Wait for Fusion Completion":{"main":[[{"node":"Get Final Video URL","type":"main","index":0}]]},"Generate Video with blotato":{"main":[[{"node":"Wait for blotato Video Rendering","type":"main","index":0}]]},"Split Prompt or Image Input":{"main":[[{"node":"Condition Input Type (Image or Text)","type":"main","index":0}]]},"Download Image from Telegram":{"main":[[{"node":"Extract Image File URL","type":"main","index":0}]]},"Send Final Video to Telegram":{"main":[[{"node":"Send Caption to Telegram","type":"main","index":0}]]},"Generate Script (GPT-4o-mini)":{"main":[[{"node":"Split Script","type":"main","index":0}]]},"Assign Platform IDs for Blotato":{"main":[[{"node":"Upload Video to Blotato","type":"main","index":0}]]},"Generate Social Caption (GPT-4)":{"main":[[{"node":"Generate SEO Title (GPT-4)","type":"main","index":0}]]},"Trigger Telegram Prompt or Image":{"main":[[{"node":"Split Prompt or Image Input","type":"main","index":0}]]},"Wait for blotato Video Rendering":{"main":[[{"node":"Get blotato Video URL","type":"main","index":0}]]},"Append Video Data to Google Sheet":{"main":[[{"node":"Send Final Video to Telegram","type":"main","index":0}]]},"Wait for Image-to-Video Rendering":{"main":[[{"node":"Get Image-Based Video URL","type":"main","index":0}]]},"Merge Video Data (Image or Prompt)":{"main":[[{"node":"Generate Music with Piapi","type":"main","index":0}]]},"Condition Input Type (Image or Text)":{"main":[[{"node":"Generate Video with blotato","type":"main","index":0}],[{"node":"Download Image from Telegram","type":"main","index":0}]]}}}


name: Create Animated Stories using GPT-4o-mini, Midjourney, Kling and Creatomate API
author_name: PiAPI
author_username: piapi
nodes_used: ["n8n-nodes-base.httpRequest","n8n-nodes-base.code"]
categories: []
created_at: 2025-04-22T01:47:37.016Z
updated_at: 2025-04-22T01:47:37.016Z
url: https://n8n.io/workflows/3655
scraped_at: 2025-07-06 21:16:30
description:
  What does the workflow do? 
  This workflow is designed to generate high-quality short videos, primarily uses GPT-4o-mini (unofficial), Midjourney (unofficial) and Kling (unofficial) APIs from PiAPI and Creatomate API mainly for content creator, social media bloggers and short-form video creators. Through this short video workflow, users can quickly validate their creative ideas and focus more on enhancing the quality of their video concepts.

  Who is the workflow for?
  Social Media Influencers: produce content videos based on inspiration efficiently.

  Vloggers: generate vlogs based on inspiration.

  Educational Creators: explain specific topics via animated short videos or demonstrate a specific imagined scenario to students for enhanced educational impact.

  Advertising Agencies: generate short videos based on specific products.

  AI Tool Developers: automatically generate product demo videos.

  Step-by-step Instructions
  Fill in X-API-key of PiAPI account in Basic Params node.
  Fill in the scenario of the image and video prompt.
  Set a video template on Creatomate and make an API call in the final node with core and processing modules provided in Creatomate. Before full video generation, you can first use basic assets in Creatomate for a prototype demo, then integrate with n8n after verifying the expected results.

  Fill in your Creatomate account settings following the image guildline.
  Click Test Workflow and wait for a generation (within 10~20min).

  In this workflow, we've established a basic structure for image-to-video generation with subtitle integration. You can further enhance it by adding music nodes using either PiAPI's audio models or your preferred music solution. All video elements will ultimately be composited through Creatomate. For best practice, please refer to PiAPI's official API documentation or Creatomate's API documentation to comprehend more use cases.

  Use Case
  Params Settings
   style: a children’s book cover, ages 6-10. --s 500 --sref 4028286908  --niji 6

  character: A gentle girl and a fluffy rabbit explore a sunlit forest together, playing by a sparkling stream
  situational_keywords: Butterflies flutter around them as golden sunlight filters through green leaves. Warm and peaceful atmosphere

  Output Video
   

workflow_json:
  {"id":"MfKB97VVSuXMo3Fm","meta":{"instanceId":"1e003a7ea4715b6b35e9947791386a7d07edf3b5bf8d4c9b7ee4fdcbec0447d7"},"name":"Create Animated Stories using GPT-4o-mini, Midjourney, Kling and Creatomate API","tags":[],"nodes":[{"id":"4e9ed246-e4d7-4a9f-9bb1-cf74e16c3c6f","name":"output1","type":"n8n-nodes-base.set","position":[3980,260],"parameters":{"options":{},"assignments":{"assignments":[{"id":"0107a930-1d7a-459c-a3ab-ceb28b43b8b8","name":"video1","type":"string","value":"={{ $json.data.output.video_url }}"}]}},"typeVersion":3.4},{"id":"d696b66a-3726-4fe5-989e-9405b53c62e1","name":"output2","type":"n8n-nodes-base.set","position":[4680,240],"parameters":{"options":{},"assignments":{"assignments":[{"id":"0107a930-1d7a-459c-a3ab-ceb28b43b8b8","name":"video2","type":"string","value":"={{ $json.data.output.video_url }}"}]}},"typeVersion":3.4},{"id":"33e054fb-b747-4227-9884-f020e78ef5d5","name":"Get Prompt","type":"n8n-nodes-base.code","position":[600,-80],"parameters":{"jsCode":"const content = $input.first().json.choices[0].message.content;\n\nconst prompts = JSON.parse(content);\n\nreturn { prompts };"},"typeVersion":2},{"id":"af4dee94-7bb0-4cb9-9372-a2a1e96d0b19","name":"Basic Params","type":"n8n-nodes-base.set","position":[220,-80],"parameters":{"mode":"raw","options":{},"jsonOutput":"{\n  \"x-api-key\":\"\",\n  \"style\": \"a children’s book cover, ages 6-10. --s 500 --sref 4028286908  --niji 6\",\n  \"character\": \"A gentle girl and a fluffy rabbit explore a sunlit forest together, playing by a sparkling stream\",\n  \"situational_keywords\": \"Butterflies flutter around them as golden sunlight filters through green leaves. Warm and peaceful atmosphere\"\n}\n"},"typeVersion":3.4},{"id":"c0890cdd-642a-48cd-b770-05fbae86abb4","name":"Get Task ID of the First Image","type":"n8n-nodes-base.set","position":[380,140],"parameters":{"options":{},"assignments":{"assignments":[{"id":"d52d19d1-3a37-47bb-ad23-e809323c0c54","name":"image1","type":"string","value":"={{ $('Midjourney Generator of the First Image').item.json.data.task_id }}"}]}},"typeVersion":3.4},{"id":"a2d1e854-53c3-4115-a206-f55c2cff54f1","name":"Midjourney Generator of the First Image","type":"n8n-nodes-base.httpRequest","position":[160,140],"parameters":{"url":"https://api.piapi.ai/api/v1/task","method":"POST","options":{},"jsonBody":"={\n  \"model\": \"midjourney\",\n  \"task_type\": \"imagine\",\n  \"input\": {\n    \"prompt\": \"{{ $('Basic Params').item.json.character }},{{ $json.prompts.prompt1 }},{{ $('Basic Params').item.json.style }}\",\n    \"aspect_ratio\": \"2:3\",\n    \"process_mode\": \"turbo\",\n    \"skip_prompt_check\": false\n  }\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"x-api-key","value":"={{ $('Basic Params').item.json['x-api-key'] }}"}]}},"typeVersion":4.2},{"id":"ac342912-7d94-4019-a0c8-43b555d8566f","name":"Wait for the First Image Generation","type":"n8n-nodes-base.wait","position":[220,400],"webhookId":"af79053d-1291-4dd2-889e-4593dbbb2512","parameters":{},"typeVersion":1.1},{"id":"cd774311-252a-43ec-aaea-28eb7d87ccc1","name":"Verify the first image generation status","type":"n8n-nodes-base.if","position":[600,400],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"or","conditions":[{"id":"e97a02cc-8d1d-4500-bce5-0a296c792b76","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.data.status }}","rightValue":"completed"},{"id":"50b63a7a-52b5-4766-a859-96ac1ff949ec","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.data.status }}","rightValue":"failed"}]}},"typeVersion":2.2},{"id":"a4b8ce31-0ffd-4c9a-b102-162139fa553b","name":"Get the First Image URL","type":"n8n-nodes-base.set","position":[1000,200],"parameters":{"options":{},"assignments":{"assignments":[{"id":"d52d19d1-3a37-47bb-ad23-e809323c0c54","name":"image_urls1","type":"array","value":"={{ $json.data.output.temporary_image_urls }}"},{"id":"f519111b-5cb4-4562-bb8c-944a500e2df3","name":"","type":"string","value":""}]}},"typeVersion":3.4},{"id":"c28e46a7-999c-4a63-a3ae-aa813d7669cd","name":"Midjourney Generator of the Second Image","type":"n8n-nodes-base.httpRequest","position":[1220,200],"parameters":{"url":"https://api.piapi.ai/api/v1/task","method":"POST","options":{},"jsonBody":"={\n  \"model\": \"midjourney\",\n  \"task_type\": \"imagine\",\n  \"input\": {\n    \"prompt\": \"{{ $('Basic Params').item.json.character }},{{ $('Get Prompt').item.json.prompts.prompt2 }},{{ $('Basic Params').item.json.style }}\",\n    \"aspect_ratio\": \"2:3\",\n    \"process_mode\": \"turbo\",\n    \"skip_prompt_check\": false\n  }\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"x-api-key","value":"={{ $('Basic Params').item.json['x-api-key'] }}"}]}},"typeVersion":4.2},{"id":"529f0561-d29f-4df2-b61d-0720d33bf6b9","name":"Midjourney Generator of the Third Image","type":"n8n-nodes-base.httpRequest","position":[1920,220],"parameters":{"url":"https://api.piapi.ai/api/v1/task","method":"POST","options":{},"jsonBody":"={\n  \"model\": \"midjourney\",\n  \"task_type\": \"imagine\",\n  \"input\": {\n    \"prompt\": \"{{ $('Basic Params').item.json.character }},{{ $('Get Prompt').item.json.prompts.prompt3 }},{{ $('Basic Params').item.json.style }}\",\n    \"aspect_ratio\": \"2:3\",\n    \"process_mode\": \"turbo\",\n    \"skip_prompt_check\": false\n  }\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"x-api-key","value":"={{ $('Basic Params').item.json['x-api-key'] }}"}]}},"typeVersion":4.2},{"id":"a1a0b0f4-ac4e-4eca-9aa4-52f815731875","name":"Get the First Image Generation Status","type":"n8n-nodes-base.switch","position":[800,200],"parameters":{"rules":{"values":[{"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"5f61ee56-4ebe-411f-95e6-b47d9741e7a2","operator":{"type":"string","operation":"equals"},"leftValue":"={{ $json.data.status }}","rightValue":"completed"}]}}]},"options":{}},"typeVersion":3.2},{"id":"6f2b83a9-2557-461e-9d5b-9f96440182f0","name":"Get the Second Image Generation Status","type":"n8n-nodes-base.switch","position":[1480,220],"parameters":{"rules":{"values":[{"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"5f61ee56-4ebe-411f-95e6-b47d9741e7a2","operator":{"type":"string","operation":"equals"},"leftValue":"={{ $json.data.status }}","rightValue":"completed"}]}}]},"options":{}},"typeVersion":3.2},{"id":"10802f7a-d262-4f6f-aa48-0dce95c6fa41","name":"Get the Third Image Generation Status","type":"n8n-nodes-base.switch","position":[2380,220],"parameters":{"rules":{"values":[{"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"5f61ee56-4ebe-411f-95e6-b47d9741e7a2","operator":{"type":"string","operation":"equals"},"leftValue":"={{ $json.data.status }}","rightValue":"completed"}]}}]},"options":{}},"typeVersion":3.2},{"id":"c968472d-29e6-428d-99bc-1d3f79b3f0ac","name":"Get the Second Image URL","type":"n8n-nodes-base.set","position":[1720,220],"parameters":{"options":{},"assignments":{"assignments":[{"id":"d52d19d1-3a37-47bb-ad23-e809323c0c54","name":"image_urls1","type":"array","value":"={{ $json.data.output.temporary_image_urls }}"},{"id":"f519111b-5cb4-4562-bb8c-944a500e2df3","name":"","type":"string","value":""}]}},"typeVersion":3.4},{"id":"44fe09ee-b16a-4c00-b589-4634a5f795d2","name":"Get the Third Image URL","type":"n8n-nodes-base.set","position":[2560,220],"parameters":{"options":{},"assignments":{"assignments":[{"id":"d52d19d1-3a37-47bb-ad23-e809323c0c54","name":"image_urls1","type":"array","value":"={{ $json.data.output.temporary_image_urls }}"},{"id":"f519111b-5cb4-4562-bb8c-944a500e2df3","name":"","type":"string","value":""}]}},"typeVersion":3.4},{"id":"472804c0-3f58-4ff3-aaca-b970bef425df","name":"Wait for the Second Image Generation","type":"n8n-nodes-base.wait","position":[900,440],"webhookId":"af79053d-1291-4dd2-889e-4593dbbb2512","parameters":{},"typeVersion":1.1},{"id":"f4004d5a-fd04-4d1c-9376-026d12d690d5","name":"Get Task of the First Image","type":"n8n-nodes-base.httpRequest","position":[420,400],"parameters":{"url":"=https://api.piapi.ai/api/v1/task/{{ $('Get Task ID of the First Image').item.json.image1 }}","options":{},"sendHeaders":true,"headerParameters":{"parameters":[{"name":"x-api-key","value":"={{ $('Basic Params').item.json['x-api-key'] }}"}]}},"typeVersion":4.2},{"id":"ce09e4ec-97f7-4575-a133-a2c98a55b60e","name":"Get Task of the Second Image","type":"n8n-nodes-base.httpRequest","position":[1100,440],"parameters":{"url":"=https://api.piapi.ai/api/v1/task/{{ $json.data.task_id }}","options":{},"sendHeaders":true,"headerParameters":{"parameters":[{"name":"x-api-key","value":"={{ $('Basic Params').item.json['x-api-key'] }}"}]}},"typeVersion":4.2},{"id":"2fa361f8-d580-4aa8-ae76-ca336669b0e1","name":"Verify the second image generation status","type":"n8n-nodes-base.if","position":[1300,440],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"or","conditions":[{"id":"e97a02cc-8d1d-4500-bce5-0a296c792b76","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.data.status }}","rightValue":"completed"},{"id":"50b63a7a-52b5-4766-a859-96ac1ff949ec","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.data.status }}","rightValue":"failed"}]}},"typeVersion":2.2},{"id":"a01d33a5-8419-4919-ae53-d90005244734","name":"Verify the third image generation status","type":"n8n-nodes-base.if","position":[2100,460],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"or","conditions":[{"id":"e97a02cc-8d1d-4500-bce5-0a296c792b76","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.data.status }}","rightValue":"completed"},{"id":"50b63a7a-52b5-4766-a859-96ac1ff949ec","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.data.status }}","rightValue":"failed"}]}},"typeVersion":2.2},{"id":"e2ed41b1-daf4-4da2-a320-b2c10d11e6b1","name":"Get Task of the Third Image","type":"n8n-nodes-base.httpRequest","position":[1880,460],"parameters":{"url":"=https://api.piapi.ai/api/v1/task/{{ $json.data.task_id }}","options":{},"sendHeaders":true,"headerParameters":{"parameters":[{"name":"x-api-key","value":"={{ $('Basic Params').item.json['x-api-key'] }}"}]}},"typeVersion":4.2},{"id":"1d9a3356-2f3e-4829-af75-cdb6f02d3375","name":"Wait for the Third Image Generation","type":"n8n-nodes-base.wait","position":[1680,460],"webhookId":"af79053d-1291-4dd2-889e-4593dbbb2512","parameters":{},"typeVersion":1.1},{"id":"e7a4f69a-bf86-4469-8135-9fc5b18bf54d","name":"Get three Image URLs","type":"n8n-nodes-base.set","position":[2740,220],"parameters":{"options":{},"assignments":{"assignments":[{"id":"d52d19d1-3a37-47bb-ad23-e809323c0c54","name":"image_output1","type":"string","value":"={{ $('Get the First Image URL').item.json.image_urls1[0] }}"},{"id":"333c0676-342a-40ea-bcc7-c13e9145818f","name":"image_output2","type":"string","value":"={{ $('Get the Second Image URL').item.json.image_urls1[1] }}"},{"id":"cc21180a-d88a-40ed-b5d1-0abcfd86bf86","name":"image_output3","type":"string","value":"={{ $json.image_urls1[2] }}"}]}},"typeVersion":3.4},{"id":"83c07d12-31c5-4364-9fff-f82d30530925","name":"Generate the First Video","type":"n8n-nodes-base.httpRequest","position":[2960,40],"parameters":{"url":"https://api.piapi.ai/api/v1/task","method":"POST","options":{},"jsonBody":"={\n    \"model\": \"kling\",\n    \"task_type\": \"video_generation\",\n    \"input\": {\n        \"version\": \"1.6\",\n        \"mode\": \"pro\",\n        \"image_url\": \"{{ $json.image_output1 }}\",\n        \"prompt\": \"Natural swing\"\n    }\n} ","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"x-api-key","value":"={{ $('Basic Params').first().json['x-api-key'] }}"}]}},"typeVersion":4.2},{"id":"5bd0161c-c217-4234-b36b-4826f2ffc0c9","name":"Generate the Second Video","type":"n8n-nodes-base.httpRequest","position":[3160,40],"parameters":{"url":"https://api.piapi.ai/api/v1/task","method":"POST","options":{},"jsonBody":"={\n    \"model\": \"kling\",\n    \"task_type\": \"video_generation\",\n    \"input\": {\n        \"version\": \"1.6\",\n        \"mode\": \"pro\",\n        \"image_url\": \"{{ $('Get three Image URLs').item.json.image_output2 }}\",\n        \"prompt\": \"Natural swing\"\n    }\n} ","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"x-api-key","value":"={{ $('Basic Params').first().json['x-api-key'] }}"}]}},"typeVersion":4.2},{"id":"bf701aa9-ccdc-48d8-885f-193c2b1042f3","name":"Generate the Third Video","type":"n8n-nodes-base.httpRequest","position":[3360,40],"parameters":{"url":"https://api.piapi.ai/api/v1/task","method":"POST","options":{},"jsonBody":"={\n    \"model\": \"kling\",\n    \"task_type\": \"video_generation\",\n    \"input\": {\n        \"version\": \"1.6\",\n        \"mode\": \"pro\",\n        \"image_url\": \"{{ $('Get three Image URLs').item.json.image_output3 }}\",\n        \"prompt\": \"Natural swing\"\n    }\n} ","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"x-api-key","value":"={{ $('Basic Params').first().json['x-api-key'] }}"}]}},"typeVersion":4.2},{"id":"ebf87efe-f5b6-4c96-8c12-5c7a37680851","name":"Final Video Combination","type":"n8n-nodes-base.httpRequest","position":[5700,220],"parameters":{"url":"https://api.creatomate.com/v1/renders","method":"POST","options":{},"jsonBody":"={\n  \"template_id\": \"c10c62b6-d515-4f36-a730-f4646d1b7ee2\",\n\"modifications\": {\n    \"Video-1.source\": \"{{ $('output1').item.json.video1 }}\",\n    \"Video-2.source\": \"{{ $('output2').item.json.video2 }}\",\n    \"Video-3.source\": \"{{ $('Get the Third Video URL').item.json.video3 }}\",\n    \"Text-1.text\": \"{{ $('Get Prompt').item.json.prompts.title }}\"\n  }\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"Authorization","value":"Bearer "},{"name":"Content-Type","value":"application/json"}]}},"executeOnce":true,"typeVersion":4.2},{"id":"d73069fa-f24d-4972-87cb-24c20112f251","name":"Get the Third Video URL","type":"n8n-nodes-base.set","position":[5480,220],"parameters":{"options":{},"assignments":{"assignments":[{"id":"0107a930-1d7a-459c-a3ab-ceb28b43b8b8","name":"video3","type":"string","value":"={{ $json.data.output.video_url }}"}]}},"typeVersion":3.4},{"id":"cb26d84e-55aa-4de1-819e-7704dcc2b45d","name":"Get Video Task IDs","type":"n8n-nodes-base.set","position":[3560,40],"parameters":{"options":{},"assignments":{"assignments":[{"id":"d20160df-8be0-4bd0-8960-f49ebb596a64","name":"video_task1","type":"string","value":"={{ $('Generate the First Video').first().json.data.task_id }}"},{"id":"1be26a8b-1ba3-4de3-a458-778a33f99730","name":"video_task2","type":"string","value":"={{ $('Generate the Second Video').first().json.data.task_id }}"},{"id":"9718a718-8e19-4001-a0c9-2d35710d904e","name":"video_task3","type":"string","value":"={{ $json.data.task_id }}"}]}},"typeVersion":3.4},{"id":"7b6def7e-2712-42c8-8e2b-ac5f70ef146f","name":"Get the First Video Task","type":"n8n-nodes-base.httpRequest","position":[3380,420],"parameters":{"url":"=https://api.piapi.ai/api/v1/task/{{ $('Get Video Task IDs').item.json.video_task1 }}","options":{},"sendHeaders":true,"headerParameters":{"parameters":[{"name":"x-api-key","value":"={{ $('Basic Params').first().json['x-api-key'] }}"}]}},"typeVersion":4.2},{"id":"8c5a2fe8-75b1-42b5-b861-db3e11ba03d7","name":"Verify the First Video Generation","type":"n8n-nodes-base.if","position":[3580,420],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"or","conditions":[{"id":"e97a02cc-8d1d-4500-bce5-0a296c792b76","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.data.status }}","rightValue":"completed"},{"id":"50b63a7a-52b5-4766-a859-96ac1ff949ec","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.data.status }}","rightValue":"failed"}]}},"typeVersion":2.2},{"id":"9b6925e2-3f9a-46b9-acea-06abbce4033a","name":"Verify the Second Video Generation","type":"n8n-nodes-base.if","position":[4320,420],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"or","conditions":[{"id":"e97a02cc-8d1d-4500-bce5-0a296c792b76","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.data.status }}","rightValue":"completed"},{"id":"50b63a7a-52b5-4766-a859-96ac1ff949ec","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.data.status }}","rightValue":"failed"}]}},"typeVersion":2.2},{"id":"a591a522-65d8-4a4d-a326-64bc2e6463c5","name":"Verify the Third Video Generation","type":"n8n-nodes-base.if","position":[5040,420],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"or","conditions":[{"id":"e97a02cc-8d1d-4500-bce5-0a296c792b76","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.data.status }}","rightValue":"completed"},{"id":"50b63a7a-52b5-4766-a859-96ac1ff949ec","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.data.status }}","rightValue":"failed"}]}},"typeVersion":2.2},{"id":"376176c5-20c5-4a16-9fd5-10f9f2560575","name":"Wait for Video Generation for at Least 4 min","type":"n8n-nodes-base.wait","position":[3780,40],"webhookId":"d7fc1084-fd2e-4aac-98aa-60c719d73c4c","parameters":{"unit":"minutes","amount":4},"typeVersion":1.1},{"id":"dba60967-840b-4c3e-8673-080eae901185","name":"Wait for the First Video Generation","type":"n8n-nodes-base.wait","position":[3800,440],"webhookId":"db4734c5-f793-4b3b-a660-ae87c516dfc1","parameters":{},"typeVersion":1.1},{"id":"b337b044-7da8-494d-9d55-3685b2585e93","name":"Wait for the Second Video Generation","type":"n8n-nodes-base.wait","position":[4480,460],"webhookId":"d9cde4b3-5755-4fde-b58e-9b5849a21c2b","parameters":{},"typeVersion":1.1},{"id":"372f89ed-b771-4c6f-9bc2-faa7e31bfc6d","name":"Wait for the Third Video Generation","type":"n8n-nodes-base.wait","position":[5260,460],"webhookId":"d077385d-bd8f-4d14-b332-22a974f98ea7","parameters":{},"typeVersion":1.1},{"id":"756d9cb7-da96-4515-a391-f152d3ca8ea9","name":"Get the First Video Generation","type":"n8n-nodes-base.switch","position":[3800,260],"parameters":{"rules":{"values":[{"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"5f61ee56-4ebe-411f-95e6-b47d9741e7a2","operator":{"type":"string","operation":"equals"},"leftValue":"={{ $json.data.status }}","rightValue":"completed"}]}}]},"options":{}},"typeVersion":3.2},{"id":"7b96363c-55f3-4773-9d50-f2e71c7ac4eb","name":"Get the Second Video Generation","type":"n8n-nodes-base.switch","position":[4520,240],"parameters":{"rules":{"values":[{"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"5f61ee56-4ebe-411f-95e6-b47d9741e7a2","operator":{"type":"string","operation":"equals"},"leftValue":"={{ $json.data.status }}","rightValue":"completed"}]}}]},"options":{}},"typeVersion":3.2},{"id":"eb19ddd9-1bd3-430b-997b-ad288a4731b9","name":"Get the Third Video Generation","type":"n8n-nodes-base.switch","position":[5280,220],"parameters":{"rules":{"values":[{"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"5f61ee56-4ebe-411f-95e6-b47d9741e7a2","operator":{"type":"string","operation":"equals"},"leftValue":"={{ $json.data.status }}","rightValue":"completed"}]}}]},"options":{}},"typeVersion":3.2},{"id":"4a1468b4-d183-423f-8360-93044bcf323a","name":"Get the Second Video Task","type":"n8n-nodes-base.httpRequest","position":[4160,420],"parameters":{"url":"=https://api.piapi.ai/api/v1/task/{{ $('Get Video Task IDs').item.json.video_task2 }}","options":{},"sendHeaders":true,"headerParameters":{"parameters":[{"name":"x-api-key","value":"={{ $('Basic Params').first().json['x-api-key'] }}"}]}},"typeVersion":4.2},{"id":"ff51a9b2-f17a-494d-afa7-a4fc0137d239","name":"Get the Third Video Task","type":"n8n-nodes-base.httpRequest","position":[4840,420],"parameters":{"url":"=https://api.piapi.ai/api/v1/task/{{ $('Get Video Task IDs').item.json.video_task3 }}","options":{},"sendHeaders":true,"headerParameters":{"parameters":[{"name":"x-api-key","value":"={{ $('Basic Params').first().json['x-api-key'] }}"}]}},"typeVersion":4.2},{"id":"3db3e156-67ca-41cd-b9f2-5a03330ab33c","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[20,-280],"parameters":{"width":360,"content":"## Basic Setting Instruction\nFill in **Basic Params** based on user's need. \nThe node concludes three section: style, character and situation_keyword.\nGPT-4o-mini will generate image description based on basic params mentioned above."},"typeVersion":1},{"id":"31419df4-39d4-4393-8e80-7cdceb24778e","name":"When clicking Test workflow","type":"n8n-nodes-base.manualTrigger","position":[20,-80],"parameters":{},"typeVersion":1},{"id":"e0510fc2-4570-4cd6-8438-42a7acd26414","name":"GPT-4o-mini Generate Image Scenario Prompt","type":"n8n-nodes-base.httpRequest","position":[420,-80],"parameters":{"url":"https://api.piapi.ai/v1/chat/completions","method":"POST","options":{},"jsonBody":"={\n    \"model\": \"gpt-4o-mini\",\n    \"messages\": [\n       {\n          \"role\": \"system\",\n          \"content\": \"You are a helpful assistant.\"\n        },\n        {\n          \"role\": \"user\",\n          \"content\": \"Character is {{ $json.character }}, style is {{ $json.style }}, context keywords are {{ $json.situational_keywords }}, please generate a short story containing relevant elements and styles based on Character and context keywords. It should be concise and clear and divided into three sections. The return format is {'title':'','prompt1':'','prompt2':'','prompt3':''}, directly return json data format, not markdo2t include unusual characters such as hyphens,The key and value are enclosed in double quotes, but if you need to use quotes in the value string, please use single quotes.\"\n        }\n      ]\n  }","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"Authorization","value":"=Bearer {{ $('Basic Params').first().json['x-api-key'] }}"}]}},"typeVersion":4.2},{"id":"f94354e2-066d-4bf0-ada1-edade772852d","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[180,660],"parameters":{"height":120,"content":"### Generate the first image\nThis workflow section is uesd to generate the first Midjourney image. "},"typeVersion":1},{"id":"86e4d54d-8046-4400-a327-b04e8f12a09c","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[880,660],"parameters":{"height":120,"content":"### Generate the second image\nThis workflow section is uesd to generate the second Midjourney image. "},"typeVersion":1},{"id":"950a3dcb-83dc-4ee1-abb1-b33927edf1c2","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[1660,680],"parameters":{"height":120,"content":"### Generate the third image\nThis workflow section is uesd to generate the third Midjourney image. "},"typeVersion":1},{"id":"0a179107-17a4-4e38-998d-5845104199d0","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[2960,-120],"parameters":{"height":120,"content":"### Generate three Kling videos\nThis section is used to generate three Kliong videos."},"typeVersion":1},{"id":"dc589738-4130-4686-a4e2-cf07d9d22013","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[5640,400],"parameters":{"content":"### Combine Videos in Creatomate\nSet a video template in Creatomate, then set the node with instruction."},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"d16d0b20-c14e-4d0e-83ea-467e0d7c8280","connections":{"output1":{"main":[[{"node":"Get the Second Video Task","type":"main","index":0}]]},"output2":{"main":[[{"node":"Get the Third Video Task","type":"main","index":0}]]},"Get Prompt":{"main":[[{"node":"Midjourney Generator of the First Image","type":"main","index":0}]]},"Basic Params":{"main":[[{"node":"GPT-4o-mini Generate Image Scenario Prompt","type":"main","index":0}]]},"Get Video Task IDs":{"main":[[{"node":"Wait for Video Generation for at Least 4 min","type":"main","index":0}]]},"Get three Image URLs":{"main":[[{"node":"Generate the First Video","type":"main","index":0}]]},"Get the First Image URL":{"main":[[{"node":"Midjourney Generator of the Second Image","type":"main","index":0}]]},"Get the Third Image URL":{"main":[[{"node":"Get three Image URLs","type":"main","index":0}]]},"Get the Third Video URL":{"main":[[{"node":"Final Video Combination","type":"main","index":0}]]},"Generate the First Video":{"main":[[{"node":"Generate the Second Video","type":"main","index":0}]]},"Generate the Third Video":{"main":[[{"node":"Get Video Task IDs","type":"main","index":0}]]},"Get the First Video Task":{"main":[[{"node":"Verify the First Video Generation","type":"main","index":0}]]},"Get the Second Image URL":{"main":[[{"node":"Midjourney Generator of the Third Image","type":"main","index":0}]]},"Get the Third Video Task":{"main":[[{"node":"Verify the Third Video Generation","type":"main","index":0}]]},"Generate the Second Video":{"main":[[{"node":"Generate the Third Video","type":"main","index":0}]]},"Get the Second Video Task":{"main":[[{"node":"Verify the Second Video Generation","type":"main","index":0}]]},"Get Task of the First Image":{"main":[[{"node":"Verify the first image generation status","type":"main","index":0}]]},"Get Task of the Third Image":{"main":[[{"node":"Verify the third image generation status","type":"main","index":0}]]},"When clicking Test workflow":{"main":[[{"node":"Basic Params","type":"main","index":0}]]},"Get Task of the Second Image":{"main":[[{"node":"Verify the second image generation status","type":"main","index":0}]]},"Get Task ID of the First Image":{"main":[[{"node":"Wait for the First Image Generation","type":"main","index":0}]]},"Get the First Video Generation":{"main":[[{"node":"output1","type":"main","index":0}]]},"Get the Third Video Generation":{"main":[[{"node":"Get the Third Video URL","type":"main","index":0}]]},"Get the Second Video Generation":{"main":[[{"node":"output2","type":"main","index":0}]]},"Verify the First Video Generation":{"main":[[{"node":"Get the First Video Generation","type":"main","index":0}],[{"node":"Wait for the First Video Generation","type":"main","index":0}]]},"Verify the Third Video Generation":{"main":[[{"node":"Get the Third Video Generation","type":"main","index":0}],[{"node":"Wait for the Third Video Generation","type":"main","index":0}]]},"Verify the Second Video Generation":{"main":[[{"node":"Get the Second Video Generation","type":"main","index":0}],[{"node":"Wait for the Second Video Generation","type":"main","index":0}]]},"Wait for the First Image Generation":{"main":[[{"node":"Get Task of the First Image","type":"main","index":0}]]},"Wait for the First Video Generation":{"main":[[{"node":"Get the First Video Task","type":"main","index":0}]]},"Wait for the Third Image Generation":{"main":[[{"node":"Get Task of the Third Image","type":"main","index":0}]]},"Wait for the Third Video Generation":{"main":[[{"node":"Get the Third Video Task","type":"main","index":0}]]},"Wait for the Second Image Generation":{"main":[[{"node":"Get Task of the Second Image","type":"main","index":0}]]},"Wait for the Second Video Generation":{"main":[[{"node":"Get the Second Video Task","type":"main","index":0}]]},"Get the First Image Generation Status":{"main":[[{"node":"Get the First Image URL","type":"main","index":0}]]},"Get the Third Image Generation Status":{"main":[[{"node":"Get the Third Image URL","type":"main","index":0}]]},"Get the Second Image Generation Status":{"main":[[{"node":"Get the Second Image URL","type":"main","index":0}]]},"Midjourney Generator of the First Image":{"main":[[{"node":"Get Task ID of the First Image","type":"main","index":0}]]},"Midjourney Generator of the Third Image":{"main":[[{"node":"Wait for the Third Image Generation","type":"main","index":0}]]},"Midjourney Generator of the Second Image":{"main":[[{"node":"Wait for the Second Image Generation","type":"main","index":0}]]},"Verify the first image generation status":{"main":[[{"node":"Get the First Image Generation Status","type":"main","index":0}],[{"node":"Wait for the First Image Generation","type":"main","index":0}]]},"Verify the third image generation status":{"main":[[{"node":"Get the Third Image Generation Status","type":"main","index":0}],[{"node":"Wait for the Third Image Generation","type":"main","index":0}]]},"Verify the second image generation status":{"main":[[{"node":"Get the Second Image Generation Status","type":"main","index":0}],[{"node":"Wait for the Second Image Generation","type":"main","index":0}]]},"GPT-4o-mini Generate Image Scenario Prompt":{"main":[[{"node":"Get Prompt","type":"main","index":0}]]},"Wait for Video Generation for at Least 4 min":{"main":[[{"node":"Get the First Video Task","type":"main","index":0}]]}}}


