# templates

name: Fully Automated AI Video Generation & Multi-Platform Publishing
author_name: Juan Carlos Cavero Gracia
author_username: carlosgracia
categories: []
created_at: 2025-04-05T18:28:46.255Z
updated_at: 2025-04-05T18:28:46.255Z
url: https://n8n.io/workflows/3442
scraped_at: 2025-06-19 22:07:56
description:
  Description

  This comprehensive n8n automation template orchestrates a complete end-to-end workflow for generating engaging short-form Point-of-View (POV) style videos using multiple AI services and automatically publishing them across major social media platforms. It takes ideas from a Google Sheet and transforms them into finished videos with captions, voiceovers, and platform-specific descriptions, ready for distribution.

  Who Is This For?

  Content Creators & Agencies:** Mass-produce unique short-form video content for various clients or channels with minimal manual effort.
  Digital Marketers:** Automate video content pipelines to boost online presence and engagement across multiple platforms simultaneously.
  Social Media Managers:** Schedule and distribute consistent video content efficiently without juggling multiple tools and manual uploads.
  Businesses:** Leverage AI to create branded video content for marketing, reducing production time and costs.

  What Problem Does This Workflow Solve?

  Creating and distributing high-quality short-form video content consistently across multiple social networks is incredibly time-consuming and resource-intensive. This workflow tackles these challenges by:

  Automating Idea-to-Video Pipeline:** Generates video concepts, image prompts, scripts, images, video clips, and voiceovers using AI.
  Streamlining Video Assembly:** Automatically combines generated assets into a final video using a template.
  Generating Platform-Optimized Descriptions:** Creates relevant descriptions for posts by transcribing the final video audio.
  Automating Multi-Platform Publishing:** Uploads the final video and description to TikTok, Instagram, YouTube, Facebook, and LinkedIn simultaneously.
  Reducing Manual Workload:** Drastically cuts down the time and effort required for video production and distribution.
  Centralized Tracking:** Updates a Google Sheet with results, costs, and status for easy monitoring.

  How It Works

  Trigger & Input: Runs on a daily schedule (configurable) and fetches new video ideas from a designated Google Sheet.
  AI Content Generation:
      Uses OpenAI to generate video captions and image prompts based on the idea.
      Uses PiAPI (Flux) to generate images from prompts.
      Uses PiAPI (Kling) to generate video clips from the images (Image-to-Video).
      Uses OpenAI to generate a voiceover script based on the captions.
      Uses ElevenLabs to generate voiceover audio from the script and uploads it to Google Drive.
  Video Assembly: Combines the generated video clips, captions, and voiceover audio using a Creatomate template to render the final video.
  Description Generation: Uploads the final video to Google Drive, extracts the audio using OpenAI (Whisper), and generates a social media description using OpenAI (GPT).
  Multi-Platform Distribution: Uses upload-post.com to upload the final video and generated description to TikTok, Instagram, YouTube, Facebook, and LinkedIn.
  Tracking & Notification: Updates the original Google Sheet row with output details (video link, costs, tokens used) and sends a completion notification via Discord.

  Setup

  Accounts & API Keys: Obtain accounts and generate API keys/credentials for:
      n8n
      Google Cloud Platform (for Google Sheets & Google Drive APIs + OAuth Credentials)
      OpenAI
      PiAPI
      ElevenLabs
      Creatomate
      upload-post.com
      Discord (Webhook URL)
  Google Sheet: Make a copy of the provided Google Sheet Template and connect it in the Load Google Sheet node.
  Creatomate Template: Set up a video template in Creatomate (use the provided JSON source code as a base) and note its Template ID.
  Configure Nodes:
      Enter all API Keys/Credentials in the Set API Keys node and other relevant credential sections (Google nodes, upload-post nodes, etc.).
      Configure Google Drive nodes (Folder IDs, Permissions).
      Configure the upload-post.com nodes with your user identifier and necessary platform details (e.g., Facebook Page ID).
      Customize AI prompts within the OpenAI nodes (Generate Video Captions, Generate Image Prompts, Generate Script, Generate Description...) if desired.
      Set the Discord Webhook URL in the Notify me on Discord node.
  Enable Google APIs: Ensure Google Drive API and Google Sheets API are enabled in your Google Cloud Project.

  Requirements

  Accounts:** n8n, Google (Sheets, Drive, Cloud Platform), OpenAI, PiAPI, ElevenLabs, Creatomate, upload-post.com, Discord.
  API Keys & Credentials:** API Keys for OpenAI, PiAPI, ElevenLabs, Creatomate, upload-post.com. Google Cloud OAuth 2.0 Credentials. Discord Webhook URL.
  Templates:** A configured Google Sheet based on the template, a configured Creatomate video template.
  (Potentially) Paid Plans:** Some services (OpenAI, PiAPI, Creatomate, upload-post.com) may require paid plans depending on usage volume after free trials/credits are exhausted.

  Use this template to build a powerful, automated video content factory, scaling your production and distribution efforts across the social media landscape.

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

workflow_json:
  {"id":"KY0vB3hifSrA24k2","meta":{"instanceId":"3378b0d68c3b7ebfc71b79896d94e1a044dec38e99a1160aed4e9c323910fbe2","templateId":"3121"},"name":"AI-Powered Short-Form Video Generator with OpenAI, Flux, Kling, and ElevenLabs and upload to all social networks","tags":[],"nodes":[{"id":"e5095169-dc78-4d90-9662-04cfc82c38d9","name":"Get image","type":"n8n-nodes-base.httpRequest","position":[1160,480],"parameters":{"url":"=https://api.piapi.ai/api/v1/task/{{ $json.data.task_id }}","options":{},"sendHeaders":true,"headerParameters":{"parameters":[{"name":"X-API-Key","value":"={{ $('Set API Keys').item.json['PiAPI Key'] }}"}]}},"typeVersion":4.2},{"id":"f477250a-fc8e-407e-a632-cffc0e564596","name":"Generate Image","type":"n8n-nodes-base.httpRequest","position":[880,480],"parameters":{"url":"https://api.piapi.ai/api/v1/task","body":"={\n  \"model\": \"Qubico/flux1-dev\",\n  \"task_type\": \"txt2img\",\n  \"input\": {\n    \"prompt\": \"{{ $('Generate Image Prompts').item.json.choices[0].message.content }} realistic and casual as if taken by an iphone camera by a TikTok influencer\",\n    \"negative_prompt\": \"taking a photo of a room, recording a video of a room, photos app, video recorder, illegible text, blurry text, low quality text, DSLR, unnatural\",\n    \"width\": 540,\n    \"height\": 960\n  }\n}","method":"POST","options":{},"sendBody":true,"contentType":"raw","sendHeaders":true,"rawContentType":"application/json","headerParameters":{"parameters":[{"name":"X-API-Key","value":"={{ $('Set API Keys').item.json['PiAPI Key'] }}"}]}},"retryOnFail":false,"typeVersion":4.2},{"id":"622ce9f5-ad58-485b-a3c6-1265700b04da","name":"Image-to-Video","type":"n8n-nodes-base.httpRequest","position":[520,1000],"parameters":{"url":"https://api.piapi.ai/api/v1/task","body":"={\n  \"model\": \"kling\",\n  \"task_type\": \"video_generation\",\n  \"input\": {\n    \"prompt\": \"{{ $json.data.input.prompt }}\",\n    \"negative_prompt\": \"blurry motion, distorted faces, unnatural lighting, over produced, bad quality\",\n    \"cfg_scale\": 0.5,\n    \"duration\": 5,\n    \"mode\": \"pro\",\n    \"image_url\": \"{{ $json.data.output.image_url }}\",\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\": 5\n      }\n    }\n  },\n  \"config\": {}\n}","method":"POST","options":{},"sendBody":true,"contentType":"raw","sendHeaders":true,"rawContentType":"application/json","headerParameters":{"parameters":[{"name":"X-API-Key","value":"={{ $('Set API Keys').item.json['PiAPI Key'] }}"}]}},"typeVersion":4.2},{"id":"ed14eac3-1d63-481d-871c-a04c52977fc6","name":"Get Video","type":"n8n-nodes-base.httpRequest","position":[780,1000],"parameters":{"url":"=https://api.piapi.ai/api/v1/task/{{ $json.data.task_id }}","options":{},"sendHeaders":true,"headerParameters":{"parameters":[{"name":"X-API-Key","value":"={{ $('Set API Keys').item.json['PiAPI Key'] }}"}]}},"typeVersion":4.2},{"id":"8b68100c-8a5a-405c-825e-d9e8a898f235","name":"List Elements","type":"n8n-nodes-base.code","position":[1400,1040],"parameters":{"jsCode":"return [\n  {\n    scene_titles: items.map(item => item.json.response.text),\n    video_urls: items.map(item => item.json.data.output.video_url),\n    input_tokens: $('Calculate Token Usage').first().json.total_prompt_tokens,\n    output_tokens: $('Calculate Token Usage').first().json.total_completion_tokens,\n    model: $('Generate Image Prompts').first().json.model\n  }\n];"},"typeVersion":2},{"id":"f8780885-508e-4dc9-b146-f367297d7b68","name":"Wait 10min","type":"n8n-nodes-base.wait","position":[660,1000],"webhookId":"1f9d716f-6544-4e4e-94ec-408ac3ea6e82","parameters":{"unit":"minutes","amount":10},"typeVersion":1.1},{"id":"6290bc91-0eb9-4053-bd93-961cb9e917c0","name":"Wait 3min","type":"n8n-nodes-base.wait","position":[1020,480],"webhookId":"77cdee73-5e99-456a-b5e7-410b4d257669","parameters":{"unit":"minutes","amount":3},"typeVersion":1.1},{"id":"818a66ef-b9fa-4efc-85d1-b295300cbed8","name":"Wait 5min","type":"n8n-nodes-base.wait","position":[1480,400],"webhookId":"31d5b1a2-dbb5-4849-ae25-cb491539c16e","parameters":{"unit":"minutes"},"typeVersion":1.1},{"id":"afd66320-dfe0-4872-a09d-d53fe08152ce","name":"Generate voice","type":"n8n-nodes-base.httpRequest","position":[880,1460],"parameters":{"url":"https://api.elevenlabs.io/v1/text-to-speech/onwK4e9ZLuTAKqWW03F9","method":"POST","options":{},"sendBody":true,"sendHeaders":true,"bodyParameters":{"parameters":[{"name":"text","value":"={{ $json.choices[0].message.content }}"}]},"headerParameters":{"parameters":[{"name":"xi-api-key","value":"={{ $('Set API Keys').item.json['ElevenLabs API Key'] }}"}]}},"retryOnFail":false,"typeVersion":4.2},{"id":"916f19e1-7928-4141-a5c5-ca39bd22b0a0","name":"List Elements1","type":"n8n-nodes-base.code","position":[1400,1260],"parameters":{"jsCode":"return [\n  {\n    sound_urls: items.map(item => $('Upload Voice Audio').first().json.webContentLink)\n  }\n];"},"typeVersion":2},{"id":"b95fd80c-ec7f-4d50-99ae-f3f544b8a111","name":"Fail check","type":"n8n-nodes-base.if","position":[920,1000],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"a920eb54-fc23-4b68-8f56-2eee907a5481","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.data.status }}","rightValue":"failed"}]}},"typeVersion":2.2},{"id":"7e3f5cda-1d49-4a59-956f-f639daf203e0","name":"Wait to retry","type":"n8n-nodes-base.wait","position":[1060,960],"webhookId":"3b0fae8f-4419-45cd-8380-8f72eca05ff8","parameters":{"unit":"minutes"},"typeVersion":1.1},{"id":"48ec39c9-1802-4860-918d-9c660051f27b","name":"Generate Image Prompts","type":"@n8n/n8n-nodes-langchain.openAi","position":[400,560],"parameters":{"modelId":{"__rl":true,"mode":"list","value":"o3-mini","cachedResultName":"O3-MINI"},"options":{},"messages":{"values":[{"content":"=You are an advanced, unhinged, hilariously entertaining prompt-generation AI specializing in expanding short POV image prompt ideas into detailed, hyper-realistic prompts optimized for Qubico/flux1-dev. Your task is to take a brief input tied to job seeking, job hunting, or resume building and morph it into a cinematic, immersive prompt locked in a first-person perspective, making the viewer feel they’re living the scene.\n\nNEVER include quotation marks or emojis in your response—flux API will choke on them, and that’s a hard no.\n\nThe topic of this narrative is: {{ $('Load Google Sheet').item.json.idea }}\n\nThe short prompt idea to expand for this image generation is: {{ $json.response.text }}\n\nONLY GENERATE ONE PROMPT PER IDEA—NO COMBINING. In at least one scene, weave in this environment descriptor: {{ $('Load Google Sheet').first().json.environment_prompt }}, but go wild with unhinged, edgy, funny twists elsewhere (skip the cringe or cheesy garbage). Most job hunting happens on laptops or desktops, so prioritize those over phones. If a phone sneaks in, it’s only showing job-related content like email, LinkedIn, a resume, or a job posting—never a photo or video app.\n\nEvery prompt has two parts:\n\nForeground: Kick off with First person view POV GoPro shot of... and show the viewer’s hands, limbs, or feet locked in a job-related action.\n\nBackground: Start with In the background,... and paint the scenery, blending the environment descriptor when required, plus sensory zingers.\n\nTop Rules:\n\nNO quotation marks or emojis—EVER. This is life or death for flux.\nStick to first-person POV—the viewer’s in the driver’s seat, not watching from the sidelines.\nShow a limb (hands, feet) doing something job-focused—typing, holding a resume, adjusting a tie.\nKeep it dynamic, like a GoPro clip, with motion and depth mimicking human vision.\nIf tech’s involved (phone, computer), it’s displaying job-hunting gold—email, job boards, resumes—not random trash.\nNo off-topic actions like recording videos or snapping pics—job hunting only, fam.\nExtra Vibes:\n\nFull-body awareness: Drop hints of physical feels—cramping fingers, racing pulse, slumping shoulders.\nSensory overload: Hit sight, touch, sound, smell, temperature for max realism (coffee whiffs, keyboard clacks).\nWorld grip: Limbs interact with the scene—tapping keys, handing over papers, stepping up.\nKeep it under 1000 characters, one slick sentence, no fluff or formatting.\nMake it entertaining, relatable, with an Andrew Tate viral edge for the down-and-out job hustlers.\nExamples:\n\nInput: Updating a LinkedIn profile after a long day\n\nEnvironment_prompt: Tired, cluttered apartment, laptop glow\n\nOutput: First person view POV GoPro shot of my hands hammering a laptop, cheeto-dusted fingers aching from the grind, the screen flashing my LinkedIn profile with a fresh connection ping; in the background, a trashed apartment lit by the laptop’s ghostly glow, pizza boxes toppling, traffic humming outside, stale takeout stench hitting my nose as my back screams from the hustle.\n\nInput: Handing over a resume at a job fair\n\nEnvironment_prompt: Hopeful, busy convention hall, suits everywhere\n\nOutput: First person view POV GoPro shot of my hand thrusting out a crisp resume, fingers twitching with nerves as it brushes another palm; in the background, a buzzing convention hall packed with suits, coffee fumes and shoe polish in the air, chatter drowning my pounding heart as I lock eyes with the recruiter.\n\nNO QUOTATION MARKS. NO EMOJIS. EVER."}]},"simplify":false},"typeVersion":1.8},{"id":"5c1b8dc8-4eb3-49fe-81c7-c811d73fac0d","name":"Calculate Token Usage","type":"n8n-nodes-base.code","position":[700,560],"parameters":{"jsCode":"// Get all input items (the 5 LLM responses)\nconst items = $input.all();\n\n// Calculate total prompt tokens and total completion tokens\nconst totalPromptTokens = items.reduce((sum, item) => sum + item.json.usage.prompt_tokens, 0);\nconst totalCompletionTokens = items.reduce((sum, item) => sum + item.json.usage.completion_tokens, 0);\n\n// Create new items with original data plus the totals\nconst outputItems = items.map(item => ({\n  json: {\n    ...item.json,                   // Spread the original item data\n    total_prompt_tokens: totalPromptTokens,     // Add total prompt tokens\n    total_completion_tokens: totalCompletionTokens // Add total completion tokens\n  }\n}));\n\n// Return the modified items\nreturn outputItems;"},"typeVersion":2},{"id":"efc3d0dd-70dc-4fba-b040-22c773ed5602","name":"Check for failures","type":"n8n-nodes-base.if","position":[1300,480],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"567d1fc9-0638-4a44-b5f5-30a9a6683794","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.data.status }}","rightValue":"failed"}]}},"typeVersion":2.2},{"id":"3161c993-5696-4419-9299-fde51719dfc7","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[380,240],"parameters":{"color":5,"width":1260,"height":460,"content":"## 2. 🖼️Generate images with Flux using [PiAPI](https://piapi.ai/?via=n8n) \n### (total cost: $0.0948 approx. as of 3/9/25)\n1. OpenAI is used to generate 5 Flux image prompts based on the 5 captions generated. Edit this node to see/edit the prompt instructions. \n2. Next we use some custom javascript to total up how many tokens were used for each 5 generations so we can track our costs later.\n3. Then we generate an image with Flux using the [PiAPI service](https://piapi.ai/?via=n8n), waiting to check for failures and retrying if there are any.\n\nYou can change the image model used by editing the Generate Image node API call.\nFlux models available (as of 3/9/25):\n- Qubico/flux1-dev ($0.015) - Currently set\n- Qubico/flux1-schnell ($0.0015)\n- Qubico/flux1-advanced ($0.02)\n\nFor full list of API settings, see the [Flux API Documentation](https://piapi.ai/docs/flux-api/text-to-image?via=n8n)\n"},"typeVersion":1},{"id":"e5cdec7e-cb75-4200-a8e3-615621d20150","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[480,720],"parameters":{"color":6,"width":1040,"height":500,"content":"## 3. 🎬Generate videos with Kling using [PiAPI](https://piapi.ai/?via=n8n)\n### (total cost: $2.30 approx. as of 3/9/25)\n1. We use image-to-video with Kling using [PiAPI](https://piapi.ai/?via=n8n) to generate a video from each image.\n2. Then we wait to check for failures, and repeat the generations the failed if there are any.\n\nYou can edit the video model used in the Image-to-Video node. For testing, I'd recommend switching from pro to std for lower quality and cheaper price.\nKling models available (as of 3/9/25):\n- std (Standard) $0.26 per 5 second video\n- pro (Professional) $0.46 per 5 second video - Currently set\n\nFor full list of API settings, see the [Kling API Documentation](https://piapi.ai/docs/kling-api/create-task?via=n8n)\n"},"typeVersion":1},{"id":"8404a390-a402-4703-8cb5-4a54490dc7bd","name":"Generate Video Captions","type":"@n8n/n8n-nodes-langchain.openAi","position":[-40,1220],"parameters":{"modelId":{"__rl":true,"mode":"list","value":"gpt-4o-mini","cachedResultName":"GPT-4O-MINI"},"options":{},"messages":{"values":[{"role":"system","content":"DO NOT include any quotation marks in your response. Do not put a quote at the beginning or the end of your response.\n\nYou are a prompt-generation AI specializing in crafting unhinged, entertaining TikTok captions for a \"day in the life\" POV story about job hunting or resume writing. Generate five concise, action-driven captions (5-10 words each) that follow a Problem > Action > Reward structure. The first caption should be a shocking or funny hook, and the last should conclude with a satisfying reward. Use emojis sparingly—only one per caption at most, and only when they add impact; skip them if they don’t enhance the message.\n\nGuidelines:\n\nPerspective: Always first-person POV, immersing the viewer in the story.\nTone: Channel Andrew Tate mixed with Charlie Sheen—cursing and sexual innuendos are fair game.\nContent: Focus on job seeking, hunting, or resume building, spotlighting AI as the game-changer.\nNarrative: Start with the grind of unemployment or a shitty job, pivot to using AI for resumes and cover letters, and end with scoring the dream gig.\nScenes: Highlight raw, emotional moments—skip the boring stuff.\nYour captions should be wild and entertaining, not polished or professional. The first caption is the hook—make it shocking, hilarious, or ballsy, something Andrew Tate would growl. Use emojis sparingly—max one per caption, only if it hits harder with it.\n\nYour response should be a list of 5 items separated by \"\\n\" (for example: \"item1\\nitem2\\nitem3\\nitem4\\nitem5\")"},{"content":"={{ $json.idea }}"}]},"simplify":false},"typeVersion":1.8},{"id":"f614c784-a3ee-4eb8-aee3-cc0ad3e87556","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[480,1240],"parameters":{"color":4,"width":1040,"height":400,"content":"## 4. 🔉Generate voice overs with [Eleven Labs](https://try.elevenlabs.io/n8n)\n1. OpenAI API is used to generate a funny script that relates to the captions. Open this node to see/edit the prompt instructions. \n2. Then we use the [Eleven Labs API](https://try.elevenlabs.io/n8n) to generate the voiceover and upload it to our Google Drive so it can be accessed in the next step.\n\nTo replace the voice, find the voice ID of the voice you want to use in [Eleven Labs](https://try.elevenlabs.io/n8n), then change the URL in the Generate Voice node to: https://api.elevenlabs.io/v1/text-to-speech/{voice ID here}\n\nFor full list of API settings, see the [Eleven Labs API Documentation](https://elevenlabs.io/docs/api-reference/text-to-speech/convert)\n"},"typeVersion":1},{"id":"e59306c1-8efe-4d98-9391-10c68c17787b","name":"Match captions with videos","type":"n8n-nodes-base.merge","position":[1240,1040],"parameters":{"mode":"combine","options":{},"combineBy":"combineByPosition"},"typeVersion":3},{"id":"8da7e16e-691b-4335-bfc7-e196c36f982d","name":"Generate Script","type":"@n8n/n8n-nodes-langchain.openAi","position":[520,1460],"parameters":{"modelId":{"__rl":true,"mode":"list","value":"gpt-4o-mini","cachedResultName":"GPT-4O-MINI"},"options":{},"messages":{"values":[{"role":"system","content":"=You are an unhinged and hilarious TikTok influencer who's like a mix of Andrew Tate and Charlie Sheen. The user is going to provide you with a topic, and then 5 different parts of a story. Your task is to narrate the story as this hilarious character, who isn't afraid to be edgy or curse or use sexual innuendos. However keep each of the 5 talking points brief, as you only have about 5 seconds to speak during each. The entire length of your narration should be around 15 seconds.\n\nEach line item of the users message represents 1 5 second clip, so your response needs to be able to quickly and easily be spoken in those time constraints. Don't say extra things you don't need to. Just quickly tell the story, in order, and make it unhinged, funny, entertaining, and potentially controversially viral. Don't worry about offendeding anyone. Andrew Tate style it.\n\nDo not include any emojis, as your response will be converted from text to speech, so anything but text and punctuation isn't neccesary. Also, don't make your jokes overly corny, speak in a witty, edgy, funny way, but no corny dad jokes or anything cringe."},{"content":"={{ $('Generate Video Captions').item.json.choices[0].message.content }}"}]},"simplify":false},"executeOnce":true,"typeVersion":1.8},{"id":"ad87317d-3ed0-4fdf-aea5-7b2fa60fb59f","name":"Upload Voice Audio","type":"n8n-nodes-base.googleDrive","position":[1080,1460],"parameters":{"name":"={{ $('Load Google Sheet').item.json.id }}-voiceover.mp3","driveId":{"__rl":true,"mode":"list","value":"My Drive"},"options":{},"folderId":{"__rl":true,"mode":"list","value":"1w1EQ8xyth6w7AbX2wpDI3vInfYeRy8vH","cachedResultUrl":"https://drive.google.com/drive/folders/1w1EQ8xyth6w7AbX2wpDI3vInfYeRy8vH","cachedResultName":"Resume Studio"}},"typeVersion":3},{"id":"eec529e9-2601-4f7b-b415-63d2ebba1574","name":"Set Access Permissions","type":"n8n-nodes-base.googleDrive","position":[1260,1460],"parameters":{"fileId":{"__rl":true,"mode":"id","value":"={{ $json.id }}"},"options":{},"operation":"share","permissionsUi":{"permissionsValues":{"role":"writer","type":"anyone","allowFileDiscovery":true}}},"typeVersion":3},{"id":"63e72d56-140e-47d8-9f72-b58c764deed9","name":"Pair Videos with Audio","type":"n8n-nodes-base.merge","position":[1620,1140],"parameters":{"mode":"combine","options":{},"combineBy":"combineByPosition"},"typeVersion":3},{"id":"60a80c6f-0385-48e6-9b71-c23a74cbc15c","name":"Render Final Video","type":"n8n-nodes-base.httpRequest","position":[1800,1140],"parameters":{"url":"https://api.creatomate.com/v1/renders","body":"={\n  \"template_id\": \"{{ $('Set API Keys').item.json['Creatomate Template ID'] }}\",\n  \"modifications\": {\n    \n    \"Video-1.source\": \"{{ $json.video_urls[0] }}\",\n    \"Video-2.source\": \"{{ $json.video_urls[1] }}\",\n    \"Video-3.source\": \"{{ $json.video_urls[2] }}\",\n    \"Video-4.source\": \"{{ $json.video_urls[3] }}\",\n    \"Video-5.source\": \"{{ $json.video_urls[4] }}\",\n\n    \"Audio-1.source\": \"{{ $json.sound_urls[0] }}\",\n\n    \"Text-1.text\": \"{{ $json.scene_titles[0] }}\",\n    \"Text-2.text\": \"{{ $json.scene_titles[1] }}\",\n    \"Text-3.text\": \"{{ $json.scene_titles[2] }}\",\n    \"Text-4.text\": \"{{ $json.scene_titles[3] }}\",\n    \"Text-5.text\": \"{{ $json.scene_titles[4] }}\"\n  }\n}","method":"POST","options":{},"sendBody":true,"contentType":"raw","sendHeaders":true,"rawContentType":"application/json","headerParameters":{"parameters":[{"name":"Authorization","value":"=Bearer {{ $('Set API Keys').item.json['Creatomate API Key'] }}"},{"name":"Content-Type","value":"application/json"}]}},"executeOnce":true,"typeVersion":4.2},{"id":"89c0e958-7690-4f3d-af49-3e9776f2c979","name":"Notify me on Discord","type":"n8n-nodes-base.discord","position":[2780,1140],"webhookId":"1541bc50-06e4-48e8-8c76-23850ee4edf6","parameters":{"content":"=A new Resume Studio POV video has been created: {{ $json.final_output }}","options":{},"authentication":"webhook"},"typeVersion":2},{"id":"14a09794-5e02-4880-b33d-139a91726dda","name":"Once Per Day","type":"n8n-nodes-base.scheduleTrigger","position":[-600,1220],"parameters":{"rule":{"interval":[{"triggerAtHour":7}]}},"typeVersion":1.2},{"id":"4de1f1c7-52ad-4e00-ad22-b4c3c0f718d8","name":"Load Google Sheet","type":"n8n-nodes-base.googleSheets","position":[-180,1220],"parameters":{"options":{"returnFirstMatch":true},"filtersUI":{"values":[{"lookupValue":"for production","lookupColumn":"production"}]},"sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1cjd8p_yx-M-3gWLEd5TargtoB35cW-3y66AOTNMQrrM/edit#gid=0","cachedResultName":"Sheet1"},"documentId":{"__rl":true,"mode":"list","value":"1cjd8p_yx-M-3gWLEd5TargtoB35cW-3y66AOTNMQrrM","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1cjd8p_yx-M-3gWLEd5TargtoB35cW-3y66AOTNMQrrM/edit?usp=drivesdk","cachedResultName":"Sheet Template"}},"typeVersion":4.5,"alwaysOutputData":true},{"id":"e5c83690-1696-43aa-a0db-164ca128dd67","name":"Create List","type":"n8n-nodes-base.code","position":[280,1140],"parameters":{"jsCode":"// Get the text directly from the OpenAI response\nconst text = $input.first().json.choices[0].message.content;\n\n// Split the text on literal '\\\\n', trim, and filter empty lines\nconst lines = text.split('\\\\n').map(line => line.trim()).filter(line => line !== '');\n\n// Create an array of items for n8n\nconst items = lines.map(line => ({\n  json: {\n    response: { text: line }\n  }\n}));\n\n// Return the array of items\nreturn items;"},"typeVersion":2},{"id":"ed99df67-2068-4c8b-a6ba-e67d234f03c4","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[1560,920],"parameters":{"color":3,"width":1360,"height":380,"content":"## 5. 📥Complete video with [Creatomate](https://creatomate.com/)\n### (total cost: $0.38 approx. with the Essential plan credits | Free trial credits available)\n1. First, the list of videos/captions is combined with the generated voice over into a single item containing all 3 elements.\n2. Those are then passed over to the Creatomate Template ID you specified, replacing the template captions/video/audio with your generated ones.\n3. When the video is finished rendering, it's then uploaded to Google Drive and the permissions set so it can be accessed with a link.\n4. Then we update the original Google Sheet template with the information from our generation, including tokens to calculate cost, then mark this idea as completed.\n5. Finally, we send a notification to via [webhook to the Discord server](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks) when the video is ready to be downloaded and used!\n\n"},"typeVersion":1},{"id":"e7064a56-c500-4f9f-a54a-c4352c263b56","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[-320,280],"parameters":{"width":620,"height":420,"content":"# 🤖 AI-Powered Short-Form Video Generator with OpenAI, Flux, Kling, and ElevenLabs\n\n## 📃Before you get started, you'll need:\n- [n8n installation](https://n8n.partnerlinks.io/n8nTTVideoGenTemplate) (tested on version 1.81.4)\n- [OpenAI API Key](https://platform.openai.com/api-keys) (free trial credits available)\n- [PiAPI](https://piapi.ai/?via=n8n) (free trial credits available)\n- [Eleven Labs](https://try.elevenlabs.io/n8n) (free account)\n- [Creatomate API Key](https://creatomate.com/) (free trial credits available)\n- Google Sheets API enabled in [Google Cloud Console](https://console.cloud.google.com/apis/api/sheets.googleapis.com/overview)\n- Google Drive API enabled in [Google Cloud Console](https://console.cloud.google.com/apis/api/drive.googleapis.com/overview)\n- OAuth 2.0 Client ID and Client Secret from your [Google Cloud Console Credentials](https://console.cloud.google.com/apis/credentials)\n"},"typeVersion":1},{"id":"4ddb7249-9785-4f51-b35c-b9a0c6a66e3b","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[-480,780],"parameters":{"color":7,"width":920,"height":700,"content":"## 1. 🗨️Generate video captions from ideas in a Google Sheet\n\n1. Setup your API keys for [PiAPI](https://piapi.ai/?via=n8n), [Eleven Labs](https://try.elevenlabs.io/n8n), and [Creatomate](https://creatomate.com/).\n- Once logged in to your Creatomate account, create a new video template and click \"source code\" in the top right. [Paste this JSON code](https://pastebin.com/c7aMTeLK). This will be your example template for this workflow.\n- In your Creatomate template, click the \"Use Template\" button in the top right and then click \"API Integration\" and you'll see your template_id. Set this value as your Creatomate Template ID in the Set API Keys node\n\n2. The next node will load a Google Sheet, you can copy the [Google Sheet Template](https://docs.google.com/spreadsheets/d/1cjd8p_yx-M-3gWLEd5TargtoB35cW-3y66AOTNMQrrM/edit?usp=sharing), simply choose File > Make a copy. Then in the Google Sheets node, connect to your copied sheet template.\n\n3. Next, we generate 5 captions for our video idea with OpenAI. You can edit this node to see the prompt and change it to your needs.\n\n4. In the final two nodes, we use custom javascript code to turn the OpenAI response into a list. Then, it validates to make sure the list was formed correctly (incase of an OpenAI failure to follow instructions)\n"},"typeVersion":1},{"id":"57ee2f8f-5371-4dab-b661-c58b25c7dd55","name":"Wait1","type":"n8n-nodes-base.wait","position":[1920,1140],"webhookId":"206d0cdf-b71f-44a7-909f-97df885c471a","parameters":{"unit":"minutes","amount":3},"typeVersion":1.1},{"id":"33781e51-ef30-437b-8499-94e39bfb38fa","name":"Get Final Video","type":"n8n-nodes-base.httpRequest","position":[2040,1140],"parameters":{"url":"=https://api.creatomate.com/v1/renders/{{ $('Render Final Video').item.json.id }}","options":{},"sendHeaders":true,"headerParameters":{"parameters":[{"name":"Authorization","value":"=Bearer {{ $('Set API Keys').item.json['Creatomate API Key'] }}"},{"name":"Content-Type","value":"application/json"}]}},"executeOnce":true,"typeVersion":4.2},{"id":"b0d0fe6f-39c2-4da6-9fcf-b0151ed2c351","name":"Upload Final Video","type":"n8n-nodes-base.googleDrive","position":[2300,1140],"parameters":{"name":"=POV-{{ $('Render Final Video').item.json.id }}.mp4","driveId":{"__rl":true,"mode":"list","value":"My Drive"},"options":{},"folderId":{"__rl":true,"mode":"list","value":"1w1EQ8xyth6w7AbX2wpDI3vInfYeRy8vH","cachedResultUrl":"https://drive.google.com/drive/folders/1w1EQ8xyth6w7AbX2wpDI3vInfYeRy8vH","cachedResultName":"Resume Studio"}},"credentials":{"googleDriveOAuth2Api":{"id":"2TbhWtnbRfSloGxX","name":"Google Drive account"}},"typeVersion":3},{"id":"3893d1de-7464-48ad-91a3-14b867c2a516","name":"Get Raw File","type":"n8n-nodes-base.httpRequest","position":[2160,1140],"parameters":{"url":"={{ $json.url }}","options":{"response":{"response":{"responseFormat":"file"}}}},"typeVersion":4.2},{"id":"74de5f28-f081-4ec5-a47e-681eb845f701","name":"Set Permissions","type":"n8n-nodes-base.googleDrive","position":[2440,1140],"parameters":{"fileId":{"__rl":true,"mode":"id","value":"={{ $json.id }}"},"options":{},"operation":"share","permissionsUi":{"permissionsValues":{"role":"writer","type":"anyone","allowFileDiscovery":true}}},"credentials":{"googleDriveOAuth2Api":{"id":"2TbhWtnbRfSloGxX","name":"Google Drive account"}},"typeVersion":3},{"id":"a2c07158-e949-4b5b-a92e-f4b021742831","name":"Update Google Sheet","type":"n8n-nodes-base.googleSheets","position":[2600,1140],"parameters":{"columns":{"value":{"id":"={{ $('Load Google Sheet').first().json.id }}","width":"={{ $('Get Raw File').item.json.width }}","height":"={{ $('Get Raw File').item.json.height }}","model1":"={{ $('Generate Video Captions').item.json.model }}","model2":"={{ $('Pair Videos with Audio').item.json.model }}","model3":"={{ $('Generate Script').item.json.model }}","duration":"={{ $('Get Raw File').item.json.duration }}","fluxCost":"0.075","frameRate":"={{ $('Get Raw File').item.json.frame_rate }}","klingCost":"2.3","production":"done","publishing":"for publishing","final_output":"={{ $('Upload Final Video').item.json.webContentLink }}","prompt1 input tokens":"={{ $('Generate Video Captions').item.json.usage.prompt_tokens }}","prompt2 input tokens":"={{ $('Pair Videos with Audio').item.json.input_tokens }}","prompt3 input tokens":"={{ $('Generate Script').item.json.usage.prompt_tokens }}","prompt1 output tokens":"={{ $('Generate Video Captions').item.json.usage.completion_tokens }}","prompt2 output tokens":"={{ $('Pair Videos with Audio').item.json.output_tokens }}","prompt3 output tokens":"={{ $('Generate Script').item.json.usage.completion_tokens }}"},"schema":[{"id":"id","type":"string","display":true,"removed":false,"required":false,"displayName":"id","defaultMatch":true,"canBeUsedToMatch":true},{"id":"idea","type":"string","display":true,"removed":false,"required":false,"displayName":"idea","defaultMatch":false,"canBeUsedToMatch":true},{"id":"caption","type":"string","display":true,"removed":false,"required":false,"displayName":"caption","defaultMatch":false,"canBeUsedToMatch":true},{"id":"production","type":"string","display":true,"removed":false,"required":false,"displayName":"production","defaultMatch":false,"canBeUsedToMatch":true},{"id":"environment_prompt","type":"string","display":true,"removed":false,"required":false,"displayName":"environment_prompt","defaultMatch":false,"canBeUsedToMatch":true},{"id":"publishing","type":"string","display":true,"removed":false,"required":false,"displayName":"publishing","defaultMatch":false,"canBeUsedToMatch":true},{"id":"final_output","type":"string","display":true,"removed":false,"required":false,"displayName":"final_output","defaultMatch":false,"canBeUsedToMatch":true},{"id":"width","type":"string","display":true,"removed":false,"required":false,"displayName":"width","defaultMatch":false,"canBeUsedToMatch":true},{"id":"height","type":"string","display":true,"removed":false,"required":false,"displayName":"height","defaultMatch":false,"canBeUsedToMatch":true},{"id":"duration","type":"string","display":true,"removed":false,"required":false,"displayName":"duration","defaultMatch":false,"canBeUsedToMatch":true},{"id":"frameRate","type":"string","display":true,"removed":false,"required":false,"displayName":"frameRate","defaultMatch":false,"canBeUsedToMatch":true},{"id":"model1","type":"string","display":true,"removed":false,"required":false,"displayName":"model1","defaultMatch":false,"canBeUsedToMatch":true},{"id":"prompt1 input tokens","type":"string","display":true,"removed":false,"required":false,"displayName":"prompt1 input tokens","defaultMatch":false,"canBeUsedToMatch":true},{"id":"prompt1 output tokens","type":"string","display":true,"removed":false,"required":false,"displayName":"prompt1 output tokens","defaultMatch":false,"canBeUsedToMatch":true},{"id":"model1 cost","type":"string","display":true,"removed":false,"required":false,"displayName":"model1 cost","defaultMatch":false,"canBeUsedToMatch":true},{"id":"model2","type":"string","display":true,"removed":false,"required":false,"displayName":"model2","defaultMatch":false,"canBeUsedToMatch":true},{"id":"prompt2 input tokens","type":"string","display":true,"removed":false,"required":false,"displayName":"prompt2 input tokens","defaultMatch":false,"canBeUsedToMatch":true},{"id":"prompt2 output tokens","type":"string","display":true,"removed":false,"required":false,"displayName":"prompt2 output tokens","defaultMatch":false,"canBeUsedToMatch":true},{"id":"model2 cost","type":"string","display":true,"removed":false,"required":false,"displayName":"model2 cost","defaultMatch":false,"canBeUsedToMatch":true},{"id":"model3","type":"string","display":true,"removed":false,"required":false,"displayName":"model3","defaultMatch":false,"canBeUsedToMatch":true},{"id":"prompt3 input tokens","type":"string","display":true,"removed":false,"required":false,"displayName":"prompt3 input tokens","defaultMatch":false,"canBeUsedToMatch":true},{"id":"prompt3 output tokens","type":"string","display":true,"removed":false,"required":false,"displayName":"prompt3 output tokens","defaultMatch":false,"canBeUsedToMatch":true},{"id":"model3 cost","type":"string","display":true,"removed":false,"required":false,"displayName":"model3 cost","defaultMatch":false,"canBeUsedToMatch":true},{"id":"cmCost","type":"string","display":true,"removed":false,"required":false,"displayName":"cmCost","defaultMatch":false,"canBeUsedToMatch":true},{"id":"upgradeCmCost","type":"string","display":true,"removed":false,"required":false,"displayName":"upgradeCmCost","defaultMatch":false,"canBeUsedToMatch":true},{"id":"fluxCost","type":"string","display":true,"removed":false,"required":false,"displayName":"fluxCost","defaultMatch":false,"canBeUsedToMatch":true},{"id":"klingCost","type":"string","display":true,"removed":false,"required":false,"displayName":"klingCost","defaultMatch":false,"canBeUsedToMatch":true},{"id":"totalCost","type":"string","display":true,"removed":false,"required":false,"displayName":"totalCost","defaultMatch":false,"canBeUsedToMatch":true},{"id":"datePosted","type":"string","display":true,"removed":false,"required":false,"displayName":"datePosted","defaultMatch":false,"canBeUsedToMatch":true},{"id":"row_number","type":"string","display":true,"removed":true,"readOnly":true,"required":false,"displayName":"row_number","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":["id"],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"update","sheetName":{"__rl":true,"mode":"list","value":"gid=0","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1cjd8p_yx-M-3gWLEd5TargtoB35cW-3y66AOTNMQrrM/edit#gid=0","cachedResultName":"Sheet1"},"documentId":{"__rl":true,"mode":"list","value":"1cjd8p_yx-M-3gWLEd5TargtoB35cW-3y66AOTNMQrrM","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1cjd8p_yx-M-3gWLEd5TargtoB35cW-3y66AOTNMQrrM/edit?usp=drivesdk","cachedResultName":"Sheet Template"}},"credentials":{"googleSheetsOAuth2Api":{"id":"3IOU2VjBnR4hGohx","name":"Google Sheets account"}},"typeVersion":4.5},{"id":"62423325-f9da-4cdf-8864-c011fb4fa14f","name":"Set API Keys","type":"n8n-nodes-base.set","notes":"SET BEFORE STARTING","position":[-380,1220],"parameters":{"options":{},"assignments":{"assignments":[{"id":"35659353-d8e2-4677-876b-401b549605a0","name":"PiAPI Key","type":"string","value":""},{"id":"c4927dd6-c597-48fe-b7c1-bbffcf5ff02f","name":"ElevenLabs API Key","type":"string","value":""},{"id":"f5e90c05-dd24-4918-9005-4c87a4fb344d","name":"Creatomate API Key","type":"string","value":""},{"id":"d0ebba50-5a99-4090-adcb-d18aa0b21be2","name":"Creatomate Template ID","type":"string","value":""}]}},"notesInFlow":true,"typeVersion":3.4},{"id":"4252d793-5f16-4d5e-bb78-9b155aef5d3e","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[-440,1160],"parameters":{"color":3,"width":220,"height":220,"content":"## DO THIS FIRST\n"},"typeVersion":1},{"id":"845d5b4a-8a3f-4d0d-afce-39aa4e349a7b","name":"Validate list formatting","type":"n8n-nodes-base.if","position":[280,1280],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"2681c0e9-aa45-4f0f-8933-6e6de324c7aa","operator":{"type":"array","operation":"lengthGt","rightType":"number"},"leftValue":"={{$input.all()}}","rightValue":1}]}},"typeVersion":2.2},{"id":"98a3761e-544a-473c-aa7f-cc14390750d8","name":"Get Audio from Video","type":"@n8n/n8n-nodes-langchain.openAi","notes":"Extract the audio from video for generate the description","position":[3820,1360],"parameters":{"options":{},"resource":"audio","operation":"transcribe"},"credentials":{"openAiApi":{"id":"XJdxgMSXFgwReSsh","name":"n8n key"}},"notesInFlow":true,"retryOnFail":true,"typeVersion":1,"waitBetweenTries":5000},{"id":"ec498643-1ef1-42e5-90ee-ec49d0e2b63b","name":"Generate Description for Videos  in Tiktok and Instagram","type":"@n8n/n8n-nodes-langchain.openAi","notes":"Request to OpenAi for generate description with the audio extracted from the video","position":[4060,1360],"parameters":{"modelId":{"__rl":true,"mode":"list","value":"gpt-4o","cachedResultName":"GPT-4O"},"options":{},"messages":{"values":[{"role":"system","content":"You are an expert assistant in creating engaging social media video titles."},{"content":"=I'm going to upload a video to social media. Here are some examples of descriptions that have worked well on Instagram:\n\nFollow and save for later. Discover InfluencersDe, the AI tool that automates TikTok creation and publishing to drive traffic to your website. Perfect for entrepreneurs and brands.\n#digitalmarketing #ugc #tiktok #ai #influencersde #contentcreation\n\nDiscover the video marketing revolution with InfluencersDe!\n.\n.\n.\n#socialmedia #videomarketing #ai #tiktok #influencersde #growthhacking\n\nDon't miss InfluencersDe, the tool that transforms your marketing strategy with just one click!\n.\n.\n.\n#ugc #ai #tiktok #digitalmarketing #influencersde #branding\n\nCan you create another title for the Instagram post based on this recognized audio from the video?\n\nAudio: {{ $('Get Audio from Video').item.json.text }}\n\nIMPORTANT: Reply only with the description, don't add anything else."}]}},"credentials":{"openAiApi":{"id":"XJdxgMSXFgwReSsh","name":"n8n key"}},"notesInFlow":true,"retryOnFail":true,"typeVersion":1.4,"waitBetweenTries":5000},{"id":"2f9f753d-86f3-4489-9dd2-a691f2da80ba","name":"Upload Video and Description to Tiktok","type":"n8n-nodes-base.httpRequest","notes":"Generate in upload-post.com the token and add to the credentials in the header-> Authorization: Apikey (token here)","position":[4880,940],"parameters":{"url":"https://api.upload-post.com/api/upload","method":"POST","options":{},"sendBody":true,"contentType":"multipart-form-data","authentication":"genericCredentialType","bodyParameters":{"parameters":[{"name":"title","value":"={{ $('Generate Description for Videos  in Tiktok and Instagram').item.json.message.content.replaceAll(\"\\\"\", \"\") }}"},{"name":"platform[]","value":"tiktok"},{"name":"video","parameterType":"formBinaryData","inputDataFieldName":"data"},{"name":"user","value":"Add user generated in upload-post"}]},"genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"WNjAx7UqrEZ1JDrR","name":"VituManco"}},"notesInFlow":true,"typeVersion":4.2},{"id":"4f007ef7-3f0a-4b4d-8dca-96028f29dd0c","name":"Upload Video and Description to Instagram","type":"n8n-nodes-base.httpRequest","notes":"Generate in upload-post.com the token and add to the credentials in the header-> Authorization: Apikey (token here)","position":[4880,1140],"parameters":{"url":"https://api.upload-post.com/api/upload","method":"POST","options":{},"sendBody":true,"contentType":"multipart-form-data","authentication":"genericCredentialType","bodyParameters":{"parameters":[{"name":"title","value":"={{ $('Generate Description for Videos  in Tiktok and Instagram').item.json.message.content.replaceAll(\"\\\"\", \"\") }}"},{"name":"platform[]","value":"instagram"},{"name":"video","parameterType":"formBinaryData","inputDataFieldName":"data"},{"name":"user","value":"Add user generated in upload-post"}]},"genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"47dO31ED0WIaJkR6","name":"Header Auth account"}},"notesInFlow":true,"typeVersion":4.2},{"id":"3805750b-65c4-4f28-b811-967681eda0ff","name":"Upload Video and Description to Youtube","type":"n8n-nodes-base.httpRequest","notes":"Generate in upload-post.com the token and add to the credentials in the header-> Authorization: Apikey (token here)","position":[4880,1360],"parameters":{"url":"https://api.upload-post.com/api/upload","method":"POST","options":{},"sendBody":true,"contentType":"multipart-form-data","authentication":"genericCredentialType","bodyParameters":{"parameters":[{"name":"title","value":"={{ $('Generate Description for Videos  in Tiktok and Instagram').item.json.message.content.replaceAll(\"\\\"\", \"\").substring(0, 70) }}\n"},{"name":"platform[]","value":"youtube"},{"name":"video","parameterType":"formBinaryData","inputDataFieldName":"data"},{"name":"user","value":"Add user generated in upload-post"}]},"genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"47dO31ED0WIaJkR6","name":"Header Auth account"}},"notesInFlow":true,"typeVersion":4.2},{"id":"754e3f54-87cd-4b50-947e-a9b20ce2d2ab","name":"Upload Video and Description to Facebook","type":"n8n-nodes-base.httpRequest","notes":"Generate in upload-post.com the token and add to the credentials in the header-> Authorization: Apikey (token here)","position":[4880,1600],"parameters":{"url":"https://api.upload-post.com/api/upload","method":"POST","options":{},"sendBody":true,"contentType":"multipart-form-data","authentication":"genericCredentialType","bodyParameters":{"parameters":[{"name":"title","value":"={{ $('Generate Description for Videos  in Tiktok and Instagram').item.json.message.content.replaceAll(\"\\\"\", \"\") }}"},{"name":"platform[]","value":"facebook"},{"name":"video","parameterType":"formBinaryData","inputDataFieldName":"data"},{"name":"user","value":"Add user generated in upload-post"},{"name":"facebook_page_id","value":"61556896550301"}]},"genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"47dO31ED0WIaJkR6","name":"Header Auth account"}},"notesInFlow":true,"typeVersion":4.2},{"id":"4090c098-2381-4e57-8e53-d24a2bed57cd","name":"Upload Video and Description to Linkedin","type":"n8n-nodes-base.httpRequest","notes":"Generate in upload-post.com the token and add to the credentials in the header-> Authorization: Apikey (token here)","position":[4880,1840],"parameters":{"url":"https://api.upload-post.com/api/upload","method":"POST","options":{},"sendBody":true,"contentType":"multipart-form-data","authentication":"genericCredentialType","bodyParameters":{"parameters":[{"name":"title","value":"={{ $('Generate Description for Videos  in Tiktok and Instagram').item.json.message.content.replaceAll(\"\\\"\", \"\") }}"},{"name":"platform[]","value":"linkedin"},{"name":"video","parameterType":"formBinaryData","inputDataFieldName":"data"},{"name":"user","value":"Add user generated in upload-post"}]},"genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"47dO31ED0WIaJkR6","name":"Header Auth account"}},"notesInFlow":true,"typeVersion":4.2},{"id":"cd9fbbf5-262e-43bc-9c09-382516de1cca","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","position":[2940,920],"parameters":{"width":2480,"height":1160,"content":"## 6. Upload to all social networks with upload-post.com\n### (premium plan 15$ | Free trial credits available)\n\n\n\nThis automation will automatically create descriptions from videos and upload it to Instagram, TikTok, Youtube, Facebook and Linkedin.\n\n## How to Use\n1. Generate an API token at upload-post.com and add to Upload to Tiktok and Upload to Instagram nodes etc\n2. Customize the OpenAI prompt for your specific use case\n3. Optional: Configure Telegram for error notifications\n\n## Requirements\n- upload-post.com account\n- OpenAI API key\n"},"typeVersion":1},{"id":"f3524df6-484b-40e6-a9a3-f4d2211f3988","name":"Read Video from Google Drive","type":"n8n-nodes-base.readBinaryFile","position":[4420,1360],"parameters":{"filePath":"={{ $('Write video').item.json.originalFilename.replaceAll(\" \", \"_\") }}","dataPropertyName":"datavideo"},"typeVersion":1},{"id":"f082675c-1682-4679-88df-ae410e323f5b","name":"Write video","type":"n8n-nodes-base.writeBinaryFile","position":[3440,1360],"parameters":{"options":{},"fileName":"={{ $json.originalFilename.replaceAll(\" \", \"_\") }}"},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"8f78312c-a5e3-48f0-a386-e1251586a6e7","connections":{"Wait1":{"main":[[{"node":"Get Final Video","type":"main","index":0}]]},"Get Video":{"main":[[{"node":"Fail check","type":"main","index":0}]]},"Get image":{"main":[[{"node":"Check for failures","type":"main","index":0}]]},"Wait 3min":{"main":[[{"node":"Get image","type":"main","index":0}]]},"Wait 5min":{"main":[[{"node":"Generate Image","type":"main","index":0}]]},"Fail check":{"main":[[{"node":"Wait to retry","type":"main","index":0}],[{"node":"Match captions with videos","type":"main","index":1}]]},"Wait 10min":{"main":[[{"node":"Get Video","type":"main","index":0}]]},"Create List":{"main":[[{"node":"Validate list formatting","type":"main","index":0}]]},"Write video":{"main":[[{"node":"Get Audio from Video","type":"main","index":0}]]},"Get Raw File":{"main":[[{"node":"Upload Final Video","type":"main","index":0},{"node":"Write video","type":"main","index":0}]]},"Once Per Day":{"main":[[{"node":"Set API Keys","type":"main","index":0}]]},"Set API Keys":{"main":[[{"node":"Load Google Sheet","type":"main","index":0}]]},"List Elements":{"main":[[{"node":"Pair Videos with Audio","type":"main","index":0}]]},"Wait to retry":{"main":[[{"node":"Image-to-Video","type":"main","index":0}]]},"Generate Image":{"main":[[{"node":"Wait 3min","type":"main","index":0}]]},"Generate voice":{"main":[[{"node":"Upload Voice Audio","type":"main","index":0}]]},"Image-to-Video":{"main":[[{"node":"Wait 10min","type":"main","index":0}]]},"List Elements1":{"main":[[{"node":"Pair Videos with Audio","type":"main","index":1}]]},"Generate Script":{"main":[[{"node":"Generate voice","type":"main","index":0}]]},"Get Final Video":{"main":[[{"node":"Get Raw File","type":"main","index":0}]]},"Set Permissions":{"main":[[{"node":"Update Google Sheet","type":"main","index":0}]]},"Load Google Sheet":{"main":[[{"node":"Generate Video Captions","type":"main","index":0}]]},"Check for failures":{"main":[[{"node":"Wait 5min","type":"main","index":0}],[{"node":"Image-to-Video","type":"main","index":0}]]},"Render Final Video":{"main":[[{"node":"Wait1","type":"main","index":0}]]},"Upload Final Video":{"main":[[{"node":"Set Permissions","type":"main","index":0}]]},"Upload Voice Audio":{"main":[[{"node":"Set Access Permissions","type":"main","index":0}]]},"Update Google Sheet":{"main":[[{"node":"Notify me on Discord","type":"main","index":0}]]},"Get Audio from Video":{"main":[[{"node":"Generate Description for Videos  in Tiktok and Instagram","type":"main","index":0}]]},"Notify me on Discord":{"main":[[]]},"Calculate Token Usage":{"main":[[{"node":"Generate Image","type":"main","index":0}]]},"Generate Image Prompts":{"main":[[{"node":"Calculate Token Usage","type":"main","index":0}]]},"Pair Videos with Audio":{"main":[[{"node":"Render Final Video","type":"main","index":0}]]},"Set Access Permissions":{"main":[[{"node":"List Elements1","type":"main","index":0}]]},"Generate Video Captions":{"main":[[{"node":"Create List","type":"main","index":0}]]},"Validate list formatting":{"main":[[{"node":"Generate Image Prompts","type":"main","index":0},{"node":"Match captions with videos","type":"main","index":0},{"node":"Generate Script","type":"main","index":0}],[{"node":"Generate Video Captions","type":"main","index":0}]]},"Match captions with videos":{"main":[[{"node":"List Elements","type":"main","index":0}]]},"Read Video from Google Drive":{"main":[[{"node":"Upload Video and Description to Tiktok","type":"main","index":0},{"node":"Upload Video and Description to Instagram","type":"main","index":0},{"node":"Upload Video and Description to Youtube","type":"main","index":0},{"node":"Upload Video and Description to Facebook","type":"main","index":0},{"node":"Upload Video and Description to Linkedin","type":"main","index":0}]]},"Generate Description for Videos  in Tiktok and Instagram":{"main":[[{"node":"Read Video from Google Drive","type":"main","index":0}]]}}}


name: Scrape business leads from Google Maps using OpenAI and Google Sheets
author_name: Dr. Firas
author_username: drfiras
categories: []
created_at: 2025-04-05T19:50:44.805Z
updated_at: 2025-04-05T19:50:44.805Z
url: https://n8n.io/workflows/3443
scraped_at: 2025-06-19 22:07:56
description:
  Google Maps Data Extraction Workflow for Lead Generation

  This workflow is ideal for sales teams, marketers, entrepreneurs, and researchers looking to efficiently gather detailed business information from Google Maps for:

  Lead generation  
  Market analysis  
  Competitive research

  Who Is This Workflow For?

  Sales professionals** aiming to build targeted contact lists  
  Marketers** looking for localized business data  
  Researchers** needing organized, comprehensive business information  

  Problem This Workflow Solves

  Manually gathering business contact details from Google Maps is:

  Tedious  
  Error-prone  
  Time-consuming  

  This workflow automates data extraction to increase efficiency, accuracy, and productivity.

  What This Workflow Does

  Automates extraction of business data (name, address, phone, email, website) from Google Maps  
  Crawls and extracts additional website content  
  Integrates OpenAI to enhance data processing  
  Stores structured results in Google Sheets for easy access and analysis  
  Uses Google Search API to fill in missing information  

  Setup

  Import the provided n8n workflow JSON into your n8n instance.  
  Set your OpenAI and Google Sheets API credentials.  
  Provide your Google Maps Scraper and Website Content Crawler API keys.  
  Ensure SerpAPI is configured to enhance data completeness.  

  Customizing This Workflow to Your Needs

  Adjust scraping parameters:
    Location  
    Business category  
    Country code  
  Customize Google Sheets output format to fit your current data structure  
  Integrate additional AI processing steps or APIs for richer data enrichment  

  Final Notes

  This structured approach ensures:

  Accurate and compliant data extraction** from Google Maps  
  Streamlined lead generation  
  Actionable and well-organized data ready for business use  

  📄 Documentation: Notion Guide

  Demo Video

  🎥 Watch the full tutorial here: YouTube Demo

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

workflow_json:
  {"id":"qhZvZVCoV3HLjRkq","meta":{"instanceId":"a2b23892dd6989fda7c1209b381f5850373a7d2b85609624d7c2b7a092671d44","templateCredsSetupCompleted":true},"name":"Google Maps FULL","tags":[],"nodes":[{"id":"c5d63d91-ffcc-4c05-a1ee-d78ca955fc85","name":"Trigger - When User Sends Message","type":"@n8n/n8n-nodes-langchain.chatTrigger","position":[-400,-60],"webhookId":"e5c0f357-c0a4-4ebc-9162-0382d8009539","parameters":{"options":{}},"typeVersion":1.1},{"id":"e422761f-a662-4fef-81fe-de42cdb350fc","name":"AI Agent - Lead Collection","type":"@n8n/n8n-nodes-langchain.agent","position":[-160,-60],"parameters":{"options":{"systemMessage":"' UNIFIED AND OPTIMIZED PROMPT FOR DATA EXTRACTION VIA GOOGLE MAPS SCRAPER\n\n' --- 1. Task ---\n' - Collect high-quality professional leads from Google Maps, including:\n'   - Business name\n'   - Address\n'   - Phone number\n'   - Website\n'   - Email\n'   - Other relevant contact details\n' - Deliver organized, accurate, and actionable data.\n\n' --- 2. Context & Collaboration ---\n' - Tools & Sources:\n'   * Google Maps Scraper: Extracts data based on location, business type, and country code \n'     (ISO 3166 Alpha-2 in lowercase).\n'   * Website Scraper: Extracts data from provided URLs (the URL must be passed exactly as received, without quotation marks).\n'   * Google Sheets: Stores and retrieves previously extracted data.\n'   * Internet Search: Provides additional information if the scraping results are incomplete.\n' - Priorities: Accuracy and efficiency, avoiding unnecessary searches.\n\n' --- 3. Ethical Guidelines ---\n' - Only extract publicly accessible professional data.\n' - Do not collect or store personal/sensitive data.\n' - Adhere to scraping policies and data protection regulations.\n' - Error Handling:\n'   * In case of failure or incomplete results, suggest a retry, adjusted search parameters, or an alternative source.\n'   * If Google Sheets is unavailable, notify the user and propose workarounds.\n\n' --- 4. Constraints ---\n' - Country codes must follow the ISO 3166 Alpha-2 format in lowercase (e.g., \"fr\" for France).\n' - When using the Website Scraper, pass the URL exactly as provided, without quotation marks or modifications.\n' - Validate and correctly format all data (no duplicates or errors).\n' - Store results in Google Sheets in an organized and accessible manner.\n\n' --- 5. Final Requirements & Quality Checks ---\n' - Verification: Ensure the country code is always passed in lowercase to the Google Maps Scraper.\n' - URL: If a URL is provided, forward it directly to the Website Scraper without adding quotation marks.\n' - Existing Data: Check Google Sheets to see if the data is already available before performing new scraping.\n' - Supplementary: In case of partial results, propose using Internet Search to complete the information.\n\n' --- 6. Interaction ---\n' - If data already exists in Google Sheets, retrieve and present it to the user instead of launching a new scrape.\n' - If scraping fails or returns incomplete results, suggest alternative actions (e.g., web search, verifying the country code).\n\n' --- 7. Examples ---\n' BAD Example (Google Maps Scraper)\n'   User: \"Find coffee shops in Paris, France.\"\n'   AI: \"Extracting coffee shop data from Google Maps in France.\"\n'   > Issue: The country code \"fr\" was not provided.\n'\n' GOOD Example (Google Maps Scraper)\n'   User: \"Find coffee shops in Paris, France.\"\n'   AI:\n'     - \"Extracting coffee shop data from Google Maps in fr (France).\"\n'     - \"Scraped 50 businesses with names, addresses, phone numbers, and websites.\"\n'     - \"Storing results in Google Sheets under Lead_Generation_Paris_FR.\"\n'\n' BAD Example (Website Scraper)\n'   User: \"Scrape data from https://www.example.com/\"\n'   AI: \"Forwarding 'https://www.example.com/' to the Website Scraper.\"\n'   > Issue: Unnecessary quotation marks around the URL.\n'\n' GOOD Example (Website Scraper)\n'   User: \"Scrape data from https://www.example.com/\"\n'   AI:\n'     - \"Forwarding https://www.example.com to the Website Scraper.\"\n'     - \"Processing data extraction and storing results in Google Sheets.\"\n\n' --- 8. Output Format ---\n' - Responses should be concise and informative.\n' - Present data in a structured manner (e.g., business name, address, phone, website, etc.).\n' - If data already exists, clearly display the retrieved information from Google Sheets.\n\n' --- Additional Context & Details ---\n'\n' You interact with scraping APIs and databases to retrieve, update, and manage lead information.\n' Always pass country information using lowercase ISO 3166 Alpha-2 format when using the Google Maps Scraper.\n' If a URL is provided, it must be passed exactly as received, without quotation marks, to the Website Scraper.\n'\n' Known details:\n' You extract business names, addresses, phone numbers, websites, emails, and other relevant contact information.\n'\n' The URL must be passed exactly as provided (e.g., https://www.example.com/) without quotation marks or formatting changes.\n' Google Maps Scraper requires location, business type, and ISO 3166 Alpha-2 country codes to extract business listings.\n'\n' Context:\n' - System environment:\n'   You have direct integration with scraping tools, Internet search capabilities, and Google Sheets.\n'   You interact with scraping APIs and databases to retrieve, update, and manage lead information.\n'\n' Role:\n' You are a Lead Generation & Web Scraping Agent.\n' Your primary responsibility is to identify, collect, and organize relevant business leads by scraping websites, Google Maps, and performing Internet searches.\n' Ensure all extracted data is structured, accurate, and stored properly for easy access and analysis.\n' You have access to two scraping tools:\n'   1. Website Scraper – Requires only the raw URL to extract data from a specific website.\n'      - The URL must be passed exactly as provided (e.g., https://www.example.com/) without quotation marks or formatting changes.\n'   2. Google Maps Scraper – Requires location, business type, and ISO 3166 Alpha-2 country codes to extract business listings.\n\n' --- FINAL INSTRUCTIONS ---\n' 1. Adhere to all the directives and constraints above when extracting data from Google Maps (or other sources).\n' 2. Systematically check if data already exists in Google Sheets.\n' 3. In case of failure or partial results, propose an adjustment to the query or resort to Internet search.\n' 4. Ensure ethical compliance: only collect public data and do not store sensitive information.\n'\n' This prompt will guide the AI agent to efficiently extract and manage business data using Google Maps Scraper (and other mentioned tools)\n' while adhering to the structure, ISO country code standards, and ethical handling of information.\n"}},"typeVersion":1.8},{"id":"8469f6f8-e56e-433f-8439-ac0f568b01b1","name":"GPT-4o - Generate & Process Requests","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[-360,160],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"credentials":{"openAiApi":{"id":"6h3DfVhNPw9I25nO","name":"OpenAi account"}},"typeVersion":1.2},{"id":"8f89996c-f5d1-48e3-8023-9c5d4c8db12a","name":"Memory - Track Recent Context","type":"@n8n/n8n-nodes-langchain.memoryBufferWindow","position":[-180,160],"parameters":{"contextWindowLength":50},"typeVersion":1.3},{"id":"ef32b577-47a2-489f-8b5a-3640126a0ff9","name":"Tool - Scrape Google Maps Business Data","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[160,160],"parameters":{"name":"extract_google_maps","workflowId":{"__rl":true,"mode":"list","value":"9rD7iD6sbXqDX44S","cachedResultName":"Google Maps - sous 1 - Extract Google maps"},"description":"Extract data from hundreds of places fast. Scrape Google Maps by keyword, category, location, URLs & other filters. Get addresses, contact info, opening hours, popular times, prices, menus & more. Export scraped data, run the scraper via API, schedule and monitor runs, or integrate with other tools.","workflowInputs":{"value":{"city":"={{ $fromAI('city', ``, 'string') }}","search":"={{ $fromAI('search', ``, 'string') }}","countryCode":"={{ $fromAI('countryCode', ``, 'string') }}","state/county":"={{ $fromAI('state_county', ``, 'string') }}"},"schema":[{"id":"search","type":"string","display":true,"required":false,"displayName":"search","defaultMatch":false,"canBeUsedToMatch":true},{"id":"city","type":"string","display":true,"required":false,"displayName":"city","defaultMatch":false,"canBeUsedToMatch":true},{"id":"state/county","type":"string","display":true,"required":false,"displayName":"state/county","defaultMatch":false,"canBeUsedToMatch":true},{"id":"countryCode","type":"string","display":true,"removed":false,"required":false,"displayName":"countryCode","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.1},{"id":"86a6eafe-9ffc-4d58-85f7-eef7171eeb8e","name":"Fallback - Enrich with Google Search","type":"@n8n/n8n-nodes-langchain.toolSerpApi","position":[-20,160],"parameters":{"options":{}},"credentials":{"serpApi":{"id":"FlfGC4PlqpLMJYRU","name":"SerpAPI account"}},"typeVersion":1},{"id":"37409653-0409-4f2d-8105-9216f974f6a8","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-780,-200],"parameters":{"width":1300,"height":540,"content":"# AI-Powered Lead Generation Workflow\n\nThis workflow extracts business data from Google Maps and associated websites using an AI agent.\n\n## Dependencies\n- **OpenAI API**\n- **Google Sheets API**\n- **Apify Actors**: Google Maps Scraper \n- **Apify Actors**: Website Content Crawler\n- **SerpAPI**: Used as a fallback to enrich data\n\n## External Setup Guide\n**Notion** : [Guide](https://automatisation.notion.site/GOOGLE-MAPS-SCRAPER-1cc3d6550fd98005a99cea02986e7b05)\n"},"typeVersion":1},{"id":"0b42dfae-49e6-4117-8a5d-d1f396f22dcb","name":"Tool - Crawl Business Website","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[340,160],"parameters":{"name":"Website_Content_Crawler","workflowId":{"__rl":true,"mode":"list","value":"I7KceT8Mg1lW7BW4","cachedResultName":"Google Maps - sous 2 - Extract Google"},"description":"Crawl websites and extract text content to feed AI models, LLM applications, vector databases, or RAG pipelines. The Actor supports rich formatting using Markdown, cleans the HTML, downloads files, and integrates well with 🦜🔗 LangChain, LlamaIndex, and the wider LLM ecosystem.","workflowInputs":{"value":{},"schema":[],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.1},{"id":"8a713b20-99e6-4df1-88ce-698ffc3c1e31","name":"Trigger - On Subworkflow Start","type":"n8n-nodes-base.executeWorkflowTrigger","position":[-460,520],"parameters":{"inputSource":"jsonExample","jsonExample":"{\n  \"search\": \"carpenter\",\n  \"city\": \"san francisco\",\n  \"state/county\": \"california\",\n  \"countryCode\": \"us\"\n}"},"typeVersion":1.1},{"id":"59af012d-de3f-4a44-b3ad-e587857b554d","name":"Scrape Google Maps (via Apify)","type":"n8n-nodes-base.httpRequest","position":[-240,520],"parameters":{"url":"https://api.apify.com/v2/acts/2Mdma1N6Fd0y3QEjR/run-sync-get-dataset-items","method":"POST","options":{},"jsonBody":"={\n    \"city\": \"{{ $json.city }}\",\n    \"countryCode\": \"{{ $json.countryCode }}\",\n    \"locationQuery\": \"{{ $json.city }}\",\n    \"maxCrawledPlacesPerSearch\": 5,\n    \"searchStringsArray\": [\n        \"{{ $json.search }}\"\n    ],\n    \"skipClosedPlaces\": false\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"Content-Type","value":"application/json"},{"name":"Authorization","value":"Bearer <token>"}]}},"typeVersion":4.2},{"id":"b1c40871-aa57-4b15-9f19-34a07dc6c45f","name":"Save Extracted Data to Google Sheets","type":"n8n-nodes-base.googleSheets","position":[-20,520],"parameters":{"operation":"append","sheetName":{"__rl":true,"mode":"list","value":"","cachedResultUrl":"","cachedResultName":""},"documentId":{"__rl":true,"mode":"id","value":"="}},"credentials":{"googleSheetsOAuth2Api":{"id":"51us92xkOlrvArhV","name":"Google Sheets account"}},"typeVersion":4.5},{"id":"679f2af5-0024-4a71-8c04-dcbccc8f00c8","name":"Aggregate Business Listings","type":"n8n-nodes-base.aggregate","position":[200,520],"parameters":{"options":{},"aggregate":"aggregateAllItemData"},"typeVersion":1},{"id":"dff1191a-b9f4-4ba6-ba42-a479fab76a5b","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-780,380],"parameters":{"color":4,"width":1300,"height":440,"content":"# 📍 Google Maps Extractor Subworkflow\n\nThis subworkflow handles business data extraction from Google Maps using the Apify Google Maps Scraper.\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Purpose\n- Automates the collection of business leads based on:\n  - Search term (e.g., plumber, agency)\n  - City and region\n  - ISO 3166 Alpha-2 country code"},"typeVersion":1},{"id":"dd691f9c-15e2-4b4a-a6eb-8765905a2cb4","name":"Scrape Website Content (via Apify)","type":"n8n-nodes-base.httpRequest","position":[-320,1000],"parameters":{"url":"https://api.apify.com/v2/acts/aYG0l9s7dbB7j3gbS/run-sync-get-dataset-items","method":"POST","options":{},"jsonBody":"={\n    \"aggressivePrune\": false,\n    \"clickElementsCssSelector\": \"[aria-expanded=\\\"false\\\"]\",\n    \"clientSideMinChangePercentage\": 15,\n    \"crawlerType\": \"playwright:adaptive\",\n    \"debugLog\": false,\n    \"debugMode\": false,\n    \"expandIframes\": true,\n    \"ignoreCanonicalUrl\": false,\n    \"keepUrlFragments\": false,\n    \"proxyConfiguration\": {\n        \"useApifyProxy\": true\n    },\n    \"readableTextCharThreshold\": 100,\n    \"removeCookieWarnings\": true,\n    \"removeElementsCssSelector\": \"nav, footer, script, style, noscript, svg, img[src^='data:'],\\n[role=\\\"alert\\\"],\\n[role=\\\"banner\\\"],\\n[role=\\\"dialog\\\"],\\n[role=\\\"alertdialog\\\"],\\n[role=\\\"region\\\"][aria-label*=\\\"skip\\\" i],\\n[aria-modal=\\\"true\\\"]\",\n    \"renderingTypeDetectionPercentage\": 10,\n    \"saveFiles\": false,\n    \"saveHtml\": false,\n    \"saveHtmlAsFile\": false,\n    \"saveMarkdown\": true,\n    \"saveScreenshots\": false,\n    \"startUrls\": [\n        {\n            \"url\": \"{{ $json.query }}\",\n            \"method\": \"GET\"\n        }\n    ],\n    \"useSitemaps\": false\n}","sendBody":true,"sendHeaders":true,"specifyBody":"json","headerParameters":{"parameters":[{"name":"Content-Type","value":"application/json"},{"name":"Authorization","value":"Bearer apify_api_8UZf2KdZTkPihmNauBubgDsjAYTfKP4nsQSN"}]}},"typeVersion":4.2},{"id":"7cc813a7-e1a5-40fe-a76a-3e52438cf2f4","name":"Save Website Data to Google Sheets","type":"n8n-nodes-base.googleSheets","position":[-100,1000],"parameters":{"columns":{"value":{},"schema":[{"id":"url","type":"string","display":true,"removed":false,"required":false,"displayName":"url","defaultMatch":false,"canBeUsedToMatch":true},{"id":"crawl","type":"string","display":true,"removed":false,"required":false,"displayName":"crawl","defaultMatch":false,"canBeUsedToMatch":true},{"id":"metadata","type":"string","display":true,"removed":false,"required":false,"displayName":"metadata","defaultMatch":false,"canBeUsedToMatch":true},{"id":"screenshotUrl","type":"string","display":true,"removed":false,"required":false,"displayName":"screenshotUrl","defaultMatch":false,"canBeUsedToMatch":true},{"id":"text","type":"string","display":true,"removed":false,"required":false,"displayName":"text","defaultMatch":false,"canBeUsedToMatch":true},{"id":"markdown","type":"string","display":true,"removed":false,"required":false,"displayName":"markdown","defaultMatch":false,"canBeUsedToMatch":true},{"id":"debug","type":"string","display":true,"removed":false,"required":false,"displayName":"debug","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"autoMapInputData","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false},"options":{},"operation":"append","sheetName":{"__rl":true,"mode":"list","value":1886744055,"cachedResultUrl":"https://docs.google.com/spreadsheets/d/1JewfKbdS6gJhVFz0Maz6jpoDxQrByKyy77I5s7UvLD4/edit#gid=1886744055","cachedResultName":"MYWEBBASE"},"documentId":{"__rl":true,"mode":"list","value":"1JewfKbdS6gJhVFz0Maz6jpoDxQrByKyy77I5s7UvLD4","cachedResultUrl":"https://docs.google.com/spreadsheets/d/1JewfKbdS6gJhVFz0Maz6jpoDxQrByKyy77I5s7UvLD4/edit?usp=drivesdk","cachedResultName":"GoogleMaps_LEADS"}},"credentials":{"googleSheetsOAuth2Api":{"id":"51us92xkOlrvArhV","name":"Google Sheets account"}},"typeVersion":4.5},{"id":"6c20b427-48e8-4ba1-885e-7db71406a0db","name":"Aggregate Website Content","type":"n8n-nodes-base.aggregate","position":[120,1000],"parameters":{"options":{},"aggregate":"aggregateAllItemData"},"typeVersion":1},{"id":"7b1ff556-f212-4ab5-9995-deeb83f68da4","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-780,860],"parameters":{"color":5,"width":1300,"height":400,"content":"# 🌐 Website Content Crawler Subworkflow\n\nThis subworkflow processes URLs to extract readable website content using Apify's Website Content Crawler.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n## Purpose\n- Extracts detailed and structured content from business websites.\n- Enhances leads with enriched, on-site information."},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"fd75b3e6-1dba-4e01-8c95-fdd9dd07fac4","connections":{"Memory - Track Recent Context":{"ai_memory":[[{"node":"AI Agent - Lead Collection","type":"ai_memory","index":0}]]},"Tool - Crawl Business Website":{"ai_tool":[[{"node":"AI Agent - Lead Collection","type":"ai_tool","index":0}]]},"Scrape Google Maps (via Apify)":{"main":[[{"node":"Save Extracted Data to Google Sheets","type":"main","index":0}]]},"Trigger - On Subworkflow Start":{"main":[[{"node":"Scrape Google Maps (via Apify)","type":"main","index":0}]]},"Trigger - When User Sends Message":{"main":[[{"node":"AI Agent - Lead Collection","type":"main","index":0}]]},"Save Website Data to Google Sheets":{"main":[[{"node":"Aggregate Website Content","type":"main","index":0}]]},"Scrape Website Content (via Apify)":{"main":[[{"node":"Save Website Data to Google Sheets","type":"main","index":0}]]},"Fallback - Enrich with Google Search":{"ai_tool":[[{"node":"AI Agent - Lead Collection","type":"ai_tool","index":0}]]},"GPT-4o - Generate & Process Requests":{"ai_languageModel":[[{"node":"AI Agent - Lead Collection","type":"ai_languageModel","index":0}]]},"Save Extracted Data to Google Sheets":{"main":[[{"node":"Aggregate Business Listings","type":"main","index":0}]]},"Tool - Scrape Google Maps Business Data":{"ai_tool":[[{"node":"AI Agent - Lead Collection","type":"ai_tool","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-06-19 22:07:56
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: 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-06-19 22:07:56
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: 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-06-19 22:07:56
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: 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-06-19 22:07:56
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-06-19 22:07:56
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-06-19 22:07:56
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}]]}}}


name: AI-Powered Telegram Task Manager with MCP Server
author_name: Francis Njenga
author_username: gatura
categories: []
created_at: 2025-04-22T04:27:33.277Z
updated_at: 2025-04-22T04:27:33.277Z
url: https://n8n.io/workflows/3656
scraped_at: 2025-06-19 22:07:56
description:
  Detailed Description
  The ToDo App workflow is designed to streamline task management through Telegram and Google Tasks integration. This workflow allows users to create, update, and manage tasks via Telegram messages, leveraging AI capabilities to enhance user interaction. The expected outcome is a seamless experience where users can manage their tasks efficiently without needing to switch between applications.

  Who is this for?
  This workflow is intended for:
  Individuals** looking for an efficient way to manage their tasks directly from Telegram.
  Teams** that require a collaborative task management solution integrated with Google Tasks.
  Developers** interested in automating task management processes using n8n and Telegram.

  What problem does this workflow solve?
  Managing tasks can often be cumbersome, especially when switching between different applications. This workflow addresses the following problems:
  Fragmented Task Management**: Users can manage tasks directly from Telegram, reducing the need to switch to Google Tasks.
  Inefficient Communication**: By integrating AI, users can interact with the task management system in a conversational manner, making it more intuitive.
  Task Updates**: Users can easily update task statuses and details through simple messages, enhancing productivity.

  What this workflow does
  The ToDo App workflow performs the following functions:
  Incoming Message Handling: Listens for messages sent to a Telegram bot.
  Task Creation: Allows users to create new tasks based on their messages.
  Task Updates: Users can update existing tasks by sending specific commands.
  Task Retrieval: Retrieves today's and upcoming tasks from Google Tasks.
  Voice Note Transcription: Supports voice messages, converting them into text for task management.
  AI Assistance: Utilizes an AI agent to assist users in managing their tasks effectively.

  Setup
  Prerequisites
  Before setting up the workflow, ensure you have the following:
  n8n Account**: Sign up for an n8n account if you don't have one.
  Telegram Bot**: Create a Telegram bot and obtain the API token.
  Google Tasks API**: Set up Google Tasks API and obtain OAuth2 credentials.
  OpenAI API Key**: Sign up for OpenAI and obtain an API key for AI functionalities.

  Setup Process
  Upload the JSON for this workflow and setup the authentication for the different tools.

  How to customize this workflow
  To adapt the ToDo App workflow to different needs, consider the following customizations:
  Change Task Management Platform**: If you prefer a different task management tool, replace the Google Tasks nodes with your preferred service's API.
  Modify AI Responses**: Adjust the AI agent's system message to change how it interacts with users.
  Add Additional Commands**: Expand the workflow by adding more commands for different task management functionalities (e.g., deleting tasks).
  Integrate Other Messaging Platforms**: If you want to use a different messaging service, replace the Telegram nodes with the appropriate nodes for that service.

  Conclusion
  The ToDo App workflow provides a powerful solution for managing tasks through Telegram, enhancing productivity and user experience. By following the setup instructions and customization options, users can tailor the workflow to meet their specific needs, making task management more efficient and accessible.

nodes_used:
  ["n8n-nodes-base.telegram","@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.lmChatOpenAi","@n8n/n8n-nodes-langchain.memoryBufferWindow","@n8n/n8n-nodes-langchain.openAi","@n8n/n8n-nodes-langchain.mcpClientTool"]

workflow_json:
  {"meta":{"instanceId":"be27b2af86ae3a5dc19ef2a1947644c0aec45fd8c88f29daa7dea6f0ce537691","templateCredsSetupCompleted":true},"nodes":[{"id":"ca8b122d-1739-4377-ac99-e20dd2341342","name":"Incoming Message","type":"n8n-nodes-base.telegramTrigger","position":[-1020,-320],"webhookId":"75921955-c8ed-4ff6-8de2-e436c6bbe69d","parameters":{"updates":["message"],"additionalFields":{}},"credentials":{"telegramApi":{"id":"ayMpCvQ69GjrbPdP","name":"gatu_pa_bot"}},"typeVersion":1.2},{"id":"68f7568b-e677-454b-a1e8-6c07a05e7570","name":"MCP Server Trigger","type":"@n8n/n8n-nodes-langchain.mcpTrigger","position":[-860,240],"webhookId":"562ffc95-cf8e-4d4d-8f5b-29b3ff22d5ee","parameters":{"path":"562ffc95-cf8e-4d4d-8f5b-29b3ff22d5ee"},"typeVersion":1},{"id":"635b8ecc-0f50-477d-8e19-631f868e30f6","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[340,-320],"parameters":{"options":{"systemMessage":"=You are a helpful assistant. Whenever askes to update a task, call the get_tasks tools first to retrieve the appropriate task ids then use that to update the tasks.\n\nToday's date: {{ $now }}\n"}},"typeVersion":1.8},{"id":"ab7740dc-bac2-4044-8317-40d90252d992","name":"MCP Client","type":"@n8n/n8n-nodes-langchain.mcpClientTool","position":[540,-100],"parameters":{"sseEndpoint":"https://ai.gatuservices.info/mcp/562ffc95-cf8e-4d4d-8f5b-29b3ff22d5ee/sse"},"typeVersion":1},{"id":"5298eee0-747a-496a-a3a2-e395f7c1caa1","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[300,-100],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"credentials":{"openAiApi":{"id":"lcpI0YZU9bebg3uW","name":"OpenAi account"}},"typeVersion":1.2},{"id":"c5b7e10d-2d7c-403c-bcb5-a10033252f97","name":"Simple Memory","type":"@n8n/n8n-nodes-langchain.memoryBufferWindow","position":[420,-100],"parameters":{"sessionKey":"={{ $('Incoming Message').item.json.message.from.id }}","sessionIdType":"customKey","contextWindowLength":20},"typeVersion":1.3},{"id":"06d2e8c8-3912-45cd-a074-4eea27c2e5eb","name":"chatInput","type":"n8n-nodes-base.set","position":[80,-220],"parameters":{"options":{},"assignments":{"assignments":[{"id":"ab70dc2d-35d0-4742-988f-ed7077633467","name":"chatInput","type":"string","value":"={{ $json.message.text }}"},{"id":"6439fc2c-dc2d-41fc-b8a3-b33ef80d2878","name":"id","type":"number","value":"={{ $json.message.from.id }}"}]}},"typeVersion":3.4},{"id":"a9309816-8c1d-435c-ad49-2e45053718c1","name":"create_todays_task","type":"n8n-nodes-base.googleTasksTool","position":[-1020,460],"parameters":{"task":"MDg2MzM1OTA5NzI0NzUzNjUwNjc6MDow","title":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Title', `Title summary of the task to be done`, 'string') }}","additionalFields":{"notes":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Notes', `Detailed description of the task`, 'string') }}","dueDate":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Due_Date', `Date the task should be completed`, 'string') }}","completed":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Completion_Date', `Date the task was completed`, 'string') }}"}},"credentials":{"googleTasksOAuth2Api":{"id":"8sBGA2BWJuF6SObU","name":"Connected Account"}},"typeVersion":1},{"id":"ad6cfc1a-7094-434a-98d1-a6f030067091","name":"chatOutput","type":"n8n-nodes-base.set","position":[740,-320],"parameters":{"options":{},"assignments":{"assignments":[{"id":"df6bd510-e63f-41b1-b5b4-d2c612d5b8d0","name":"chatOutput","type":"string","value":"={{ $json.output }}"}]}},"typeVersion":3.4},{"id":"e342066f-3cf8-4926-94df-798e831226be","name":"sendMessage","type":"n8n-nodes-base.telegram","position":[960,-320],"webhookId":"c5eb133f-338f-4918-8e49-83ac339d841b","parameters":{"text":"={{ $json.chatOutput }}","chatId":"={{ $('Incoming Message').item.json.message.chat.id }}","additionalFields":{"appendAttribution":false,"disable_notification":false}},"credentials":{"telegramApi":{"id":"ayMpCvQ69GjrbPdP","name":"gatu_pa_bot"}},"typeVersion":1.2},{"id":"e4a1bc16-549f-46a2-92a8-a06e6023089c","name":"create_upcoming_task","type":"n8n-nodes-base.googleTasksTool","position":[-900,460],"parameters":{"task":"OFVvNlh6ZmhScHVvNll4dw","title":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Title', `Title summary of the task to be done`, 'string') }}","additionalFields":{"notes":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Notes', `Detailed description of the task`, 'string') }}","dueDate":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Due_Date', `Date the task should be completed`, 'string') }}","completed":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Completion_Date', `Date the task was completed`, 'string') }}"}},"credentials":{"googleTasksOAuth2Api":{"id":"8sBGA2BWJuF6SObU","name":"Connected Account"}},"typeVersion":1},{"id":"df71bb02-016d-4d56-b80d-404a60c0e7cf","name":"complete_task","type":"n8n-nodes-base.googleTasksTool","position":[-780,460],"parameters":{"task":"RS1rbkNCS2JsdVFnVl80cg","taskId":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Task_ID', `The task id tom be marked as completed. Get it from the get tasks tool`, 'string') }}","operation":"update","updateFields":{}},"credentials":{"googleTasksOAuth2Api":{"id":"8sBGA2BWJuF6SObU","name":"Connected Account"}},"typeVersion":1},{"id":"a33812bd-986e-4762-87a0-199ff8a7c9aa","name":"get_todays_tasks","type":"n8n-nodes-base.googleTasksTool","position":[-660,460],"parameters":{"task":"MDg2MzM1OTA5NzI0NzUzNjUwNjc6MDow","operation":"getAll","returnAll":true,"additionalFields":{}},"credentials":{"googleTasksOAuth2Api":{"id":"8sBGA2BWJuF6SObU","name":"Connected Account"}},"typeVersion":1},{"id":"dcb3a6c9-5d7c-4fe6-8b52-f07cf74cfa0c","name":"get_upcoming_tasks","type":"n8n-nodes-base.googleTasksTool","position":[-540,460],"parameters":{"task":"OFVvNlh6ZmhScHVvNll4dw","operation":"getAll","returnAll":true,"additionalFields":{}},"credentials":{"googleTasksOAuth2Api":{"id":"8sBGA2BWJuF6SObU","name":"Connected Account"}},"typeVersion":1},{"id":"ce63c24a-ce2f-4e06-8ae5-7de75540d438","name":"Switch","type":"n8n-nodes-base.switch","position":[-800,-320],"parameters":{"rules":{"values":[{"outputKey":"Voice Note","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"8415cc8d-65a2-448e-a106-1ceb54634dfd","operator":{"type":"object","operation":"exists","singleValue":true},"leftValue":"={{ $json.message.voice }}","rightValue":""}]},"renameOutput":true}]},"options":{"fallbackOutput":"extra"}},"typeVersion":3.2},{"id":"a58488c3-38b8-4492-9f13-a900c7697812","name":"audio_id","type":"n8n-nodes-base.set","position":[-580,-420],"parameters":{"options":{},"assignments":{"assignments":[{"id":"eb7f5d62-e4f3-4b4e-9f1b-6c329feafb3e","name":"file_id","type":"string","value":"={{ $json.message.voice.file_id }}"},{"id":"803031b8-6b21-47fa-b339-ad674ccbbb1e","name":"file_unique_id","type":"string","value":"={{ $json.message.voice.file_unique_id }}"}]}},"typeVersion":3.4},{"id":"83c2ecae-b601-4669-b820-b5c35d3f936e","name":"download_audio","type":"n8n-nodes-base.telegram","position":[-360,-420],"webhookId":"c2dbc0eb-0f3a-4f11-9525-804bd5bef4b1","parameters":{"fileId":"={{ $json.file_id }}","resource":"file"},"credentials":{"telegramApi":{"id":"ayMpCvQ69GjrbPdP","name":"gatu_pa_bot"}},"typeVersion":1.2},{"id":"4a496e3a-2e3a-4ce0-9344-192847de1760","name":"transcribeAudio","type":"@n8n/n8n-nodes-langchain.openAi","position":[-140,-420],"parameters":{"options":{},"resource":"audio","operation":"transcribe"},"credentials":{"openAiApi":{"id":"lcpI0YZU9bebg3uW","name":"OpenAi account"}},"typeVersion":1.8},{"id":"38b6aa37-d279-4b1b-be42-7f7cc1bbe688","name":"audioInput","type":"n8n-nodes-base.set","position":[80,-420],"parameters":{"options":{},"assignments":{"assignments":[{"id":"d57b4fc2-10f7-46cd-a89c-0021a92f41d1","name":"chatInput","type":"string","value":"={{ $json.text }}"}]}},"typeVersion":3.4},{"id":"e524f12f-205f-4fc8-b2f0-b308ec4066b7","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-1060,-500],"parameters":{"color":4,"width":2180,"height":540,"content":"## Main Function to Receive and Send Telegram Messages\n"},"typeVersion":1},{"id":"709b252a-b5e8-4c7e-8bcd-a7092d588070","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-1060,140],"parameters":{"color":3,"width":640,"height":480,"content":"## MCP Server to Carry Out Actions"},"typeVersion":1}],"pinData":{"Incoming Message":[{"message":{"chat":{"id":6043747866,"type":"private","first_name":"Gatu"},"date":1745294191,"from":{"id":6043747866,"is_bot":false,"first_name":"Gatu","language_code":"en"},"voice":{"file_id":"AwACAgQAAxkBAAMYaAcTb6Sm3bpJ_8Cc2q1q4vC7MLYAAg8ZAAJAOjlQQhWQOxUBqfU2BA","duration":2,"file_size":9854,"mime_type":"audio/ogg","file_unique_id":"AgADDxkAAkA6OVA"},"message_id":24},"update_id":656804764}]},"connections":{"Switch":{"main":[[{"node":"audio_id","type":"main","index":0}],[{"node":"chatInput","type":"main","index":0}]]},"AI Agent":{"main":[[{"node":"chatOutput","type":"main","index":0}]]},"audio_id":{"main":[[{"node":"download_audio","type":"main","index":0}]]},"chatInput":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"MCP Client":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"audioInput":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"chatOutput":{"main":[[{"node":"sendMessage","type":"main","index":0}]]},"Simple Memory":{"ai_memory":[[{"node":"AI Agent","type":"ai_memory","index":0}]]},"complete_task":{"ai_tool":[[{"node":"MCP Server Trigger","type":"ai_tool","index":0}]]},"download_audio":{"main":[[{"node":"transcribeAudio","type":"main","index":0}]]},"transcribeAudio":{"main":[[{"node":"audioInput","type":"main","index":0}]]},"Incoming Message":{"main":[[{"node":"Switch","type":"main","index":0}]]},"get_todays_tasks":{"ai_tool":[[{"node":"MCP Server Trigger","type":"ai_tool","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"create_todays_task":{"ai_tool":[[{"node":"MCP Server Trigger","type":"ai_tool","index":0}]]},"get_upcoming_tasks":{"ai_tool":[[{"node":"MCP Server Trigger","type":"ai_tool","index":0}]]},"create_upcoming_task":{"ai_tool":[[{"node":"MCP Server Trigger","type":"ai_tool","index":0}]]}}}


name: Build a Chatbot, Voice and Phone Agent with Voiceflow, Google Calendar and RAG
author_name: Davide
author_username: n3witalia
categories: []
created_at: 2025-04-22T06:42:30.604Z
updated_at: 2025-04-22T06:42:30.604Z
url: https://n8n.io/workflows/3657
scraped_at: 2025-06-19 22:07:56
description:
  Voiceflow is a no-code platform that allows you to design, prototype, and deploy conversational assistants across multiple channels—such as chat, voice, and phone—with advanced logic and natural language understanding. It supports integration with APIs, webhooks, and even tools like Twilio for phone agents. It's perfect for building customer support agents, voice bots, or intelligent assistants.

  This workflow connects n8n and Voiceflow with tools like Google Calendar, Qdrant (vector database), OpenAI, and an order tracking API to power a smart, multi-channel conversational agent.



  There are 3 main webhook endpoints in n8n that Voiceflow interacts with:

  n8n_order – receives user input related to order tracking, queries an API, and responds with tracking status.
  n8n_appointment – processes appointment booking, reformats date input using OpenAI, and creates a Google Calendar event.
  n8n_rag – handles general product/service questions using a RAG (Retrieval-Augmented Generation) system backed by:
     Google Drive document ingestion,
     Qdrant vector store for search,
     and OpenAI models for context-based answers.

  Each webhook is connected to a corresponding "Capture" block inside Voiceflow, which sends data to n8n and waits for the response.

  How It Works  
  This n8n workflow integrates Voiceflow for chatbot/voice interactions, Google Calendar for appointment scheduling, and RAG (Retrieval-Augmented Generation) for knowledge-based responses. Here’s the flow:  

  Trigger**:  
    Three webhooks (n8n_order, n8n_appointment, n8n_rag) receive inputs from Voiceflow (chat, voice, or phone calls).  
    Each webhook routes requests to specific functions:  
      Order Tracking: Fetches order status via an external API.  
      Appointment Scheduling: Uses OpenAI to parse dates, creates Google Calendar events, and confirms via WhatsApp.  
      RAG System: Queries a Qdrant vector store (populated with Google Drive documents) to answer customer questions using GPT-4.  

  AI Processing**:  
    OpenAI Chains: Convert natural language dates to Google Calendar formats and generate responses.  
    RAG Pipeline: Embeds documents (via OpenAI), stores them in Qdrant, and retrieves context-aware answers.  
    Voiceflow Integration: Routes responses back to Voiceflow for multi-channel delivery (chat, voice, or phone).  

  Outputs**:  
    Confirmation messages (e.g., "Event created successfully").  
    Dynamic responses for orders, appointments, or product support. 

  Setup Steps  

  Prerequisites:  
  APIs**:  
    Google Calendar & Drive OAuth credentials.  
    Qdrant vector database (hosted or cloud).  
    OpenAI API key (for GPT-4 and embeddings).  

  Configuration:  
  Qdrant Setup:  
     Run the "Create collection" and "Refresh collection" nodes to initialize the vector store.  
     Populate it with documents using the Google Drive → Qdrant pipeline (embeddings generated via OpenAI).  

  Voiceflow Webhooks:  
     Link Voiceflow’s "Captures" to n8n’s webhook URLs (n8n_order, n8n_appointment, n8n_rag).  

  Google Calendar:  
     Authenticate the Google Calendar node and set event templates (e.g., summary, description).  

  RAG System:  
     Configure the Qdrant vector store and OpenAI embeddings nodes.  
     Adjust the Retrieve Agent’s system prompt for domain-specific queries (e.g., electronics store support).   

  Optional:  
  Add Twilio for phone-agent capabilities.  
  Customize OpenAI prompts for tone/accuracy.  




  PS. You can import a Twilio number to assign it to your agent for becoming a Phone Agent

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

nodes_used:
  ["n8n-nodes-base.httpRequest","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":"MMDt8lGtac2oU8nI","meta":{"instanceId":"a4bfc93e975ca233ac45ed7c9227d84cf5a2329310525917adaf3312e10d5462","templateCredsSetupCompleted":true},"name":"Build a Chatbot, Voice Agent and Phone Agent with Voiceflow, Google Calendar and RAG","tags":[],"nodes":[{"id":"20605948-5277-4fd7-9ba0-63f645bf2dcc","name":"n8n_order","type":"n8n-nodes-base.webhook","position":[-340,-140],"webhookId":"9ff7a394-5b4b-4790-a96b-c41c4ba27fa5","parameters":{"path":"9ff7a394-5b4b-4790-a96b-c41c4ba27fa5","options":{},"responseMode":"responseNode"},"typeVersion":2},{"id":"9ef7971e-f679-4d5e-b347-3238d51a06d6","name":"Google Calendar","type":"n8n-nodes-base.googleCalendar","position":[300,280],"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 with {{ $('n8n_appointment').item.json.query.Email }}","description":"Event description"}},"credentials":{"googleCalendarOAuth2Api":{"id":"8RFK3u13g2PJEGa9","name":"Google Calendar account"}},"typeVersion":1.3},{"id":"17b9f162-c4a3-43ec-b640-a68ebc67b0c9","name":"OpenAI Chat Model3","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[-120,480],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"credentials":{"openAiApi":{"id":"4zwP0MSr8zkNvvV9","name":"OpenAi account"}},"typeVersion":1.2},{"id":"5b40db3c-6c98-4fea-9c3b-98ba7e13bc30","name":"Concert start date","type":"@n8n/n8n-nodes-langchain.chainLlm","position":[-80,280],"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.query.Appointment_date }}","promptType":"define","hasOutputParser":true},"typeVersion":1.6},{"id":"8931d21a-7c30-40ae-b0b0-1f5f6868b3a3","name":"n8n_appointment","type":"n8n-nodes-base.webhook","position":[-340,280],"webhookId":"f5edfe92-649b-40da-ab35-f818ccb55ad4","parameters":{"path":"f5edfe92-649b-40da-ab35-f818ccb55ad4","options":{},"responseMode":"responseNode"},"typeVersion":2},{"id":"fa3e66ca-de09-496b-be14-483b33386e07","name":"Retrive Qdrant Vector Store","type":"@n8n/n8n-nodes-langchain.vectorStoreQdrant","position":[20,1280],"parameters":{"options":{},"qdrantCollection":{"__rl":true,"mode":"list","value":"scarperia","cachedResultName":"scarperia"}},"credentials":{"qdrantApi":{"id":"iyQ6MQiVaF3VMBmt","name":"QdrantApi account"}},"typeVersion":1},{"id":"ea7be112-1949-47b7-b68b-ae2f3a7b1b71","name":"Embeddings OpenAI2","type":"@n8n/n8n-nodes-langchain.embeddingsOpenAi","position":[-20,1460],"parameters":{"options":{}},"credentials":{"openAiApi":{"id":"4zwP0MSr8zkNvvV9","name":"OpenAi account"}},"typeVersion":1.2},{"id":"e61ff57f-a109-41e0-87f3-522b1fa78dd6","name":"RAG","type":"@n8n/n8n-nodes-langchain.toolVectorStore","position":[180,1080],"parameters":{"name":"company_data","description":"Retrive data about company knowledge from vector store"},"typeVersion":1},{"id":"fce158b8-73a3-42c1-baf3-9f2ae979fe15","name":"OpenAI Chat Model2","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[-20,1080],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"credentials":{"openAiApi":{"id":"4zwP0MSr8zkNvvV9","name":"OpenAi account"}},"typeVersion":1.2},{"id":"e2bcfa68-3642-4e49-89cb-e08faade984c","name":"OpenAI Chat Model1","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[340,1300],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"credentials":{"openAiApi":{"id":"4zwP0MSr8zkNvvV9","name":"OpenAi account"}},"typeVersion":1.2},{"id":"2a79c66c-040b-4ca2-ad91-a0683d0d2996","name":"Retrive Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[60,860],"parameters":{"text":"={{ $json.query.Question }}","agent":"conversationalAgent","options":{"systemMessage":"You are an AI-powered assistant for an electronics store. 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":"be516c9c-d2fb-4dea-9a3b-9674be5ea689","name":"n8n_rag","type":"n8n-nodes-base.webhook","position":[-360,860],"webhookId":"edb1e894-1210-4902-a34f-a014bbdad8d8","parameters":{"path":"edb1e894-1210-4902-a34f-a014bbdad8d8","options":{},"responseMode":"responseNode"},"typeVersion":2},{"id":"2412721d-7353-4a27-8068-5c90872c7a51","name":"Tracking response","type":"n8n-nodes-base.set","position":[360,-140],"parameters":{"options":{},"assignments":{"assignments":[{"id":"86f332ff-7b89-4dd4-8df9-06c081625d33","name":"text","type":"string","value":"=Your order status is: {{ $json.status }}"}]}},"typeVersion":3.4},{"id":"4965d781-1452-42c9-8a84-baacb5abe97f","name":"Calendar response","type":"n8n-nodes-base.set","position":[500,280],"parameters":{"options":{},"assignments":{"assignments":[{"id":"0fe6fe50-9263-479a-ab01-ca1d15ce2412","name":"text","type":"string","value":"L'evento è stato creato con successo"}]}},"typeVersion":3.4},{"id":"5311be28-2878-41ce-a70f-4e4aebcea0f9","name":"Webhook tracking response","type":"n8n-nodes-base.respondToWebhook","position":[700,-140],"parameters":{"options":{}},"typeVersion":1.1},{"id":"84d8558f-e6fd-400e-ae2e-0b5fec309561","name":"API URL Tracking","type":"n8n-nodes-base.httpRequest","position":[20,-140],"parameters":{"url":"URL_TRACKING","options":{},"sendBody":true,"bodyParameters":{"parameters":[{"name":"Order number","value":"={{ $json.Order_number }}"},{"name":"Email","value":"={{ $json.Order_number }}"}]}},"typeVersion":4.2},{"id":"32eb8645-c56e-4db4-8870-f28161cba048","name":"Webhook calendar response","type":"n8n-nodes-base.respondToWebhook","position":[700,280],"parameters":{"options":{}},"typeVersion":1.1},{"id":"72e7f085-d1e7-4967-aaa5-161ff0e83c06","name":"Structured Output Parser","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[140,480],"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":"3822b875-73f0-4700-8fc4-e4d3285f593a","name":"Webhook RAG response","type":"n8n-nodes-base.respondToWebhook","position":[700,860],"parameters":{"options":{}},"typeVersion":1.1},{"id":"0b43f63b-3c00-4db4-8b28-9938add9fdbe","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[1100,-1320],"parameters":{"width":1140,"height":2200,"content":"# STEP 6 - VOICEFLOW\n\n- Register on [Voiceflow](https://www.voiceflow.com/) \n- Create the workflow as shown in the following image\n![image](https://i.postimg.cc/3rSPwMn2/langflow.png)\n- There are 3 \"Captures\":\n-- n8n_order\n-- n8n_appointment\n-- n8n_rag\n- Add in the created functions the url of the corresponding n8n Webhook trigger node\n- Test your Agent\n- Get your projectID\n- In the Widget section choose Chat or Voice and copy the installation script\n![image](https://i.postimg.cc/855gyTZP/voiceflow-agent.png)\n![image](https://i.postimg.cc/5Nn4Sk43/voiceflow-agent2.png)\n\nPS. You can import a Twilio number to assign it to your agent for becoming a Phone Agent\n![image](https://i.postimg.cc/cLymTTFv/voiceflow-agent3.png)\n\n"},"typeVersion":1},{"id":"589165c8-920d-40e3-8e28-50e94dd37555","name":"When clicking ‘Test workflow’","type":"n8n-nodes-base.manualTrigger","position":[-380,-1120],"parameters":{},"typeVersion":1},{"id":"74c314bb-c445-42f8-8f9d-2ab646486044","name":"Qdrant Vector Store","type":"@n8n/n8n-nodes-langchain.vectorStoreQdrant","position":[600,-1000],"parameters":{"mode":"insert","options":{},"qdrantCollection":{"__rl":true,"mode":"id","value":"="}},"credentials":{"qdrantApi":{"id":"iyQ6MQiVaF3VMBmt","name":"QdrantApi account"}},"typeVersion":1},{"id":"01c05ac3-ac5c-4f1a-a756-db8de4a30e56","name":"Create collection","type":"n8n-nodes-base.httpRequest","position":[-80,-1260],"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":"2d7adb45-aae7-4617-b1d1-5a23f3eb3b20","name":"Refresh collection","type":"n8n-nodes-base.httpRequest","position":[-80,-1000],"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":"5e406bd7-8a93-4db2-8d3d-e92e8c9f4f01","name":"Get folder","type":"n8n-nodes-base.googleDrive","position":[140,-1000],"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":"f1f883fb-c9d1-42e6-98c2-791ed85e959f","name":"Download Files","type":"n8n-nodes-base.googleDrive","position":[360,-1000],"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":"5fd88e03-3638-4d38-8df4-246e4a5f2bda","name":"Embeddings OpenAI","type":"@n8n/n8n-nodes-langchain.embeddingsOpenAi","position":[580,-800],"parameters":{"options":{}},"credentials":{"openAiApi":{"id":"4zwP0MSr8zkNvvV9","name":"OpenAi account"}},"typeVersion":1.1},{"id":"3740a841-e272-44f9-b76d-51fb90137fd3","name":"Default Data Loader","type":"@n8n/n8n-nodes-langchain.documentDefaultDataLoader","position":[760,-800],"parameters":{"options":{},"dataType":"binary"},"typeVersion":1},{"id":"075d1038-d1fd-4527-8eda-961f20c7869a","name":"Token Splitter","type":"@n8n/n8n-nodes-langchain.textSplitterTokenSplitter","position":[760,-600],"parameters":{"chunkSize":300,"chunkOverlap":30},"typeVersion":1},{"id":"57cc8eaf-26b3-480f-ab5d-c8646519cfa3","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[120,-1320],"parameters":{"color":6,"width":880,"height":220,"content":"# STEP 1\n\n## Create Qdrant Collection\nChange:\n- QDRANTURL\n- COLLECTION"},"typeVersion":1},{"id":"70bc0676-c0ea-4de8-8659-bfb8b0ea653f","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[-100,-1060],"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":"411c4f55-ae41-49b5-a821-df1a3d8fefec","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[-380,660],"parameters":{"color":5,"width":1220,"content":"# STEP 5\nIf required retrive the informations by RAG system"},"typeVersion":1},{"id":"49d1fe78-4c38-4508-84c3-3a571ad9a2b0","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[-360,-360],"parameters":{"color":5,"width":1220,"content":"# STEP 3\nIf required retrive the informations by Order system\n- Set your API URL Tracking service"},"typeVersion":1},{"id":"23d42754-0126-4b3a-91b0-b489ef83b36c","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","position":[-360,80],"parameters":{"color":5,"width":1220,"content":"# STEP 4\nIf required retrive the informations by Appointment system"},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"20a19983-4edb-4179-a2d2-e2f53d0daf85","connections":{"RAG":{"ai_tool":[[{"node":"Retrive Agent","type":"ai_tool","index":0}]]},"n8n_rag":{"main":[[{"node":"Retrive Agent","type":"main","index":0}]]},"n8n_order":{"main":[[{"node":"API URL Tracking","type":"main","index":0}]]},"Get folder":{"main":[[{"node":"Download Files","type":"main","index":0}]]},"Retrive Agent":{"main":[[{"node":"Webhook RAG response","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":[[{"node":"Calendar response","type":"main","index":0}]]},"n8n_appointment":{"main":[[{"node":"Concert start date","type":"main","index":0}]]},"API URL Tracking":{"main":[[{"node":"Tracking response","type":"main","index":0}]]},"Calendar response":{"main":[[{"node":"Webhook calendar response","type":"main","index":0}]]},"Embeddings OpenAI":{"ai_embedding":[[{"node":"Qdrant Vector Store","type":"ai_embedding","index":0}]]},"Tracking response":{"main":[[{"node":"Webhook tracking response","type":"main","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}]]},"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}]]},"Structured Output Parser":{"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: Publish image & video to multiple social media (X, Instagram, Facebook and more)
author_name: Davide
author_username: n3witalia
nodes_used: ["n8n-nodes-base.httpRequest"]
categories: []
created_at: 2025-04-23T10:11:00.160Z
updated_at: 2025-04-23T10:11:00.160Z
url: https://n8n.io/workflows/3669
scraped_at: 2025-06-19 22:07:56
description:
  This Workflow streamlines the process of publishing posts (image or video) to multiple social media platforms using a unified form and a third-party API service called Upload-Post.

  The automation starts with a form trigger, allowing users to submit content (text and media) through a simple frontend interface. Users select the platform (Instagram, LinkedIn, Facebook, X, TikTok, Threads), choose the profile name, write a caption, and upload a photo or video.

  How It Works  
  Automates cross-platform social media posting via Upload-Post, handling both images (JPEG) and videos (MP4). Here’s the process:  

  Trigger**:  
    A form submission captures user inputs:  
      Platform (Instagram, LinkedIn, Facebook, X, TikTok, Threads).  
      Account (pre-configured profile name).  
      Caption and file (image/video).  
      Optional Facebook Page ID for targeted posting.  

  Routing**:  
    The "Video or Photo?" Switch node checks the file’s MIME type:  
      Image: Routes to the "Post photo" HTTP node (uploads via upload_photos API).  
      Video: Routes to the "Post video" HTTP node (uploads via upload API).  

  API Integration**:  
    Both nodes send data to Upload-Post.com’s API, including:  
      Caption, account name, platform, and file binary.  
      Facebook ID (if provided).  

  Success/Failure Handling**:  
    The "Result Photo/Video" nodes parse the API response.  

  Setup Steps  

  Prerequisites:  
  Upload-Post.com API Key**:  
    Get it from the API Keys dashboard.  
    Free tier allows 10 uploads/month.  

  Configuration:  
  API Authentication:  
     In the HTTP Request nodes (Post photo/Post video), set the Authorization header:  
       Name: Authorization  
       Value: Apikey YOUR_API_KEY_HERE.  

  Form Customization:  
     Adjust the "On form submission" node to:  
       Add/remove platforms (e.g., YouTube when approved).  
       Modify file type restrictions (default: .jpg, .mp4).  

  Account Mapping:  
     Ensure the "Account" field matches profiles configured in Upload-Post.com (e.g., test1, test2).  

  Facebook Page Integration:  
     Optional: Add a Facebook Page ID field for page-specific posts.  

  Testing:  
     Submit test forms with images/videos.  
     Verify API responses and success/failure messages.  

  Optional Enhancements:  
  Add error logging (e.g., save failed attempts to a database).  
  Extend to YouTube once API support is confirmed.  

  Key Features:  
  Multi-Platform**: Post to 6+ social networks simultaneously.  
  User-Friendly**: Simple form interface for non-technical users.  
  Error Handling**: Clear feedback for success/failure cases.  

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

workflow_json:
  {"id":"r1u4HOJu5j5sP27x","meta":{"instanceId":"a4bfc93e975ca233ac45ed7c9227d84cf5a2329310525917adaf3312e10d5462"},"name":"Social Media Publisher","tags":[],"nodes":[{"id":"f5050652-6170-41c6-b3c3-0f6616c9d575","name":"On form submission","type":"n8n-nodes-base.formTrigger","position":[-380,120],"webhookId":"bb578d47-feaa-4973-96df-659089838de5","parameters":{"options":{},"formTitle":"Post Publisher","formFields":{"values":[{"fieldType":"dropdown","fieldLabel":"Platform","fieldOptions":{"values":[{"option":"instagram"},{"option":"linkedin"},{"option":"facebook"},{"option":"x"},{"option":"tiktok"},{"option":"threads"}]},"requiredField":true},{"fieldLabel":"Account","placeholder":"User Profile name set on Upload-post.com","requiredField":true},{"fieldType":"textarea","fieldLabel":"Caption","requiredField":true},{"fieldType":"file","fieldLabel":"Upload","multipleFiles":false,"requiredField":true,"acceptFileTypes":".jpg,.mp4"},{"fieldLabel":"Facebook Id","placeholder":"Facebook page Id (eg. 00000111122222)"}]}},"typeVersion":2.2},{"id":"e9d8b8c9-3e40-420d-98c3-82c92f1c53c7","name":"Post photo","type":"n8n-nodes-base.httpRequest","position":[220,-180],"parameters":{"url":"https://api.upload-post.com/api/upload_photos","method":"POST","options":{},"sendBody":true,"contentType":"multipart-form-data","authentication":"genericCredentialType","bodyParameters":{"parameters":[{"name":"title","value":"={{ $json.Caption }}"},{"name":"user","value":"={{ $json.Account }}"},{"name":"platform[]","value":"={{ $json.Platform }}"},{"name":"photos[]","parameterType":"formBinaryData","inputDataFieldName":"=Upload"},{"name":"facebook_id","value":"={{ $('On form submission').item.json['Facebook Id'] }}"}]},"genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"DEE2XGvhGodgbAJh","name":"Upload-post.com API"}},"typeVersion":4.2},{"id":"04103be2-a1d8-4b00-942b-44e13dffa666","name":"Post video","type":"n8n-nodes-base.httpRequest","position":[220,280],"parameters":{"url":"https://api.upload-post.com/api/upload","method":"POST","options":{},"sendBody":true,"contentType":"multipart-form-data","authentication":"genericCredentialType","bodyParameters":{"parameters":[{"name":"title","value":"={{ $json.Caption }}"},{"name":"user","value":"={{ $json.Account }}"},{"name":"platform[]","value":"={{ $json.Platform }}"},{"name":"video","parameterType":"formBinaryData","inputDataFieldName":"=Upload"}]},"genericAuthType":"httpHeaderAuth"},"credentials":{"httpHeaderAuth":{"id":"DEE2XGvhGodgbAJh","name":"Upload-post.com API"}},"typeVersion":4.2},{"id":"e7803375-20b0-4e12-80a4-b102ba48b6ba","name":"KO Video","type":"n8n-nodes-base.form","position":[880,380],"webhookId":"d03e4286-f252-4a35-a65e-ea8ac96222e4","parameters":{"options":{},"operation":"completion","completionTitle":"=Oops","completionMessage":"There was an error"},"typeVersion":1},{"id":"91f2b501-4021-4ecc-9cc3-4e804d020135","name":"OK Video","type":"n8n-nodes-base.form","position":[880,180],"webhookId":"d03e4286-f252-4a35-a65e-ea8ac96222e4","parameters":{"options":{},"operation":"completion","completionTitle":"=Congratulations!","completionMessage":"Your post has been published correctly"},"typeVersion":1},{"id":"b3eead97-f995-42dc-b937-6d05f284f601","name":"KO Photo","type":"n8n-nodes-base.form","position":[880,-80],"webhookId":"d03e4286-f252-4a35-a65e-ea8ac96222e4","parameters":{"options":{},"operation":"completion","completionTitle":"=Oops","completionMessage":"There was an error"},"typeVersion":1},{"id":"8ead4dfa-cb9e-4ab4-b52c-7a681876269f","name":"OK Photo","type":"n8n-nodes-base.form","position":[880,-280],"webhookId":"d03e4286-f252-4a35-a65e-ea8ac96222e4","parameters":{"options":{},"operation":"completion","completionTitle":"=Congratulations!","completionMessage":"Your post has been published correctly"},"typeVersion":1},{"id":"a5fba676-4e7b-42e2-af36-e9d63458870b","name":"Success Photo?","type":"n8n-nodes-base.if","position":[640,-180],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"loose"},"combinator":"and","conditions":[{"id":"47eee8ce-0237-48f2-b67f-04021d3acda2","operator":{"type":"string","operation":"equals"},"leftValue":"={{ $json.result }}\n","rightValue":"true"}]},"looseTypeValidation":true},"typeVersion":2.2},{"id":"310853de-ab7e-481e-8efa-5a681f08032b","name":"Success Video?","type":"n8n-nodes-base.if","position":[660,280],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"loose"},"combinator":"and","conditions":[{"id":"47eee8ce-0237-48f2-b67f-04021d3acda2","operator":{"type":"string","operation":"equals"},"leftValue":"={{ $json.result }}\n","rightValue":"true"}]},"looseTypeValidation":true},"typeVersion":2.2},{"id":"81ec87fc-9298-4cd6-8a46-45ee6cb050b3","name":"Result Photo","type":"n8n-nodes-base.set","position":[440,-180],"parameters":{"options":{},"assignments":{"assignments":[{"id":"551c5179-055a-415e-bf17-61f2a5dd2769","name":"=result","type":"string","value":"={{ $json.results[$('Video or Photo?').item.json.Platform].success.toBoolean() }}"}]}},"typeVersion":3.4},{"id":"936ac765-0e7c-411d-b70d-bdfbe8e180a6","name":"Result Video","type":"n8n-nodes-base.set","position":[440,280],"parameters":{"options":{},"assignments":{"assignments":[{"id":"551c5179-055a-415e-bf17-61f2a5dd2769","name":"=result","type":"string","value":"={{ $json.results[$('Video or Photo?').item.json.Platform].success.toBoolean() }}"}]}},"typeVersion":3.4},{"id":"3a3d66ae-7ecd-43aa-a905-10afdab753b3","name":"Video or Photo?","type":"n8n-nodes-base.switch","position":[-120,120],"parameters":{"rules":{"values":[{"outputKey":"Image","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"879af56a-8979-4d9d-9acd-6009d821f6a7","operator":{"type":"string","operation":"equals"},"leftValue":"={{ $json.Upload.mimetype }}","rightValue":"image/jpeg"}]},"renameOutput":true},{"outputKey":"Video","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"d7ee147d-d775-4b81-b043-0873c535b400","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $json.Upload.mimetype }}","rightValue":"video/mp4"}]},"renameOutput":true}]},"options":{}},"typeVersion":3.2},{"id":"76d1cc06-8bb5-43cd-8dcc-2da1656b0335","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-400,-1020],"parameters":{"width":1380,"height":680,"content":"## SETTINGS\n\n- Find your API key in your [Upload-Post Manage Api Keys](https://app.upload-post.com/) 10 FREE uploads per month\n- Set the the \"Auth Header\":\n-- Name: Authorization\n-- Value: Apikey YOUR_API_KEY_HERE\n- Create profiles to manage your social media accounts. The \"Profile\" you choose will be used in the field \"Account\" on form submission (eg. test1 or test2).  \n\n![image](https://i.postimg.cc/N0BHdcQ4/uploadpost.png)\n\nApr-2025: YouTube integration is currently being verified by Google, and may not work as expected.\n"},"typeVersion":1},{"id":"e9b40e23-cde9-459d-b490-8adda6b9253f","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-400,-1240],"parameters":{"color":3,"width":1380,"height":180,"content":"## Upload video and photo on TikTok, X, Facebook, Youtube, Instagram, Threads and Linkedin\n\nSimplify your social media workflow with our powerful platform designed for content creators and marketers.\n\nUpload your video once and let Upload-Post distribute it across all your connected social media accounts effortlessly."},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"ac29ff60-2d87-4646-ae63-ab543f3849de","connections":{"Post photo":{"main":[[{"node":"Result Photo","type":"main","index":0}]]},"Post video":{"main":[[{"node":"Result Video","type":"main","index":0}]]},"Result Photo":{"main":[[{"node":"Success Photo?","type":"main","index":0}]]},"Result Video":{"main":[[{"node":"Success Video?","type":"main","index":0}]]},"Success Photo?":{"main":[[{"node":"OK Photo","type":"main","index":0}],[{"node":"KO Photo","type":"main","index":0}]]},"Success Video?":{"main":[[{"node":"OK Video","type":"main","index":0}],[{"node":"KO Video","type":"main","index":0}]]},"Video or Photo?":{"main":[[{"node":"Post photo","type":"main","index":0}],[{"node":"Post video","type":"main","index":0}]]},"On form submission":{"main":[[{"node":"Video or Photo?","type":"main","index":0}]]}}}


name: Medical Q&A Chatbot for Urology using RAG with Pinecone and GPT-4o
author_name: HoangSP
author_username: hoangsp
categories: []
created_at: 2025-04-23T10:20:39.925Z
updated_at: 2025-04-23T10:20:39.925Z
url: https://n8n.io/workflows/3670
scraped_at: 2025-06-19 22:07:56
description:
  Medical Q&A Chatbot for Urology using RAG with Pinecone and GPT-4o

  This template provides an AI-powered Q&A assistant for the Urology domain using Retrieval-Augmented Generation (RAG). It uses Pinecone for vector search and GPT-4o for conversational responses.

  🧠 Use Case

  This chatbot is designed for clinics or medical pages that want to automate question answering for Urology-related conditions. It uses a vector store of domain knowledge to return verified responses.

  🔧 Requirements

  ✅ OpenAI API key (GPT-4o or GPT-4o-mini)
  ✅ Pinecone account with an active index
  ✅ Verified Urology documents embedded into Pinecone

  ⚙️ Setup Instructions

  Create a Pinecone vector index and connect it using the Pinecone credentials node.
  Upload Urology-related documents to embed using the Create Embeddings for Urology Docs node.
  Customize the chatbot system message to reflect your medical specialty.
  Deploy this chatbot on your website or link it with Telegram via the chat trigger node.

  🛠️ Components

  chatTrigger: Listens for user messages and starts the workflow.
  Medical AI Agent: GPT-based agent guided by domain-specific instructions.
  RAG Tool Vector Store: Fetches relevant documents from Pinecone using vector search.
  Memory Buffer: Maintains conversation context.
  Create Embeddings for Urology Docs: Encodes documents into vector format.

  📝 Customization

  You can replace the knowledge base with any other medical domain by:
  Updating the documents stored in Pinecone.
  Modifying the system prompt in the AI Agent node.

  📣 CTA

  This chatbot is ideal for clinics, medical consultants, or educational websites wanting a reliable AI assistant in Urology.

nodes_used:
  ["@n8n/n8n-nodes-langchain.agent","@n8n/n8n-nodes-langchain.embeddingsOpenAi","@n8n/n8n-nodes-langchain.lmChatOpenAi","@n8n/n8n-nodes-langchain.memoryBufferWindow","@n8n/n8n-nodes-langchain.vectorStorePinecone","@n8n/n8n-nodes-langchain.toolVectorStore"]

workflow_json:
  {"id":"q07AalYfXfiMc0p2","meta":{"instanceId":"2b69b24ad1a51b447e1a0d6f8c70b16aca715ccfaf123eb531f92865766fce1c","templateCredsSetupCompleted":true},"name":"Medical Q&A Assistant for Urology using RAG with Pinecone and GPT-4o","tags":[],"nodes":[{"id":"58bf7bd0-00c7-4d7a-98f3-e18d053afa9f","name":"When chat message received","type":"@n8n/n8n-nodes-langchain.chatTrigger","position":[100,-20],"webhookId":"27dd7366-236c-4050-9fe0-575818987a21","parameters":{"public":true,"options":{},"initialMessages":"Dr. Hiep - Urologist - Phone: 090xxxxxxx\nInformation provided by a certified urologist\n\n"},"typeVersion":1.1},{"id":"6f689a95-9b4b-45c1-b407-023b05610ed9","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[540,-20],"parameters":{"text":"=Input content: {{ $json.chatInput }}","options":{"systemMessage":"=You are an AI expert specializing in Andrology and Urology.\n\nYour role is to provide user-friendly, medically relevant answers **based entirely on information gathered from the Vector Database**.\n\n⚠️ DO NOT create or assume any outside or fabricated information.\n\n🗣️ Tone & Style:\n- ✅ Clear, simple and informative\n- 🧑‍⚕️ Friendly and easy to understand for non-physician users\n- ❌ Avoid overly clinical or doctor-to-doctor language\n\n📌 Response guidelines:\n- Look at the information content of the previously asked KH for each answer, to synthesize information and make accurate suggestions\n- ❌ Do not speculate or make assumptions\n- ✅ Use only verified vector-based data (collected context)\n- 📝 Format your response with bullet points with emojis/symbols:\n- 📌 Common causes: ...\n- 💊 Symptoms may include: ...\n- ⚠️ Note: ...\n- 🚫 DO NOT provide a treatment plan or prescription medicine\n\n❓After answering, gently ask 1–2 follow-up questions to gather more context for the user. Avoid the stiff Q&A style — use friendly, caring expressions such as:\n- \"Have you tried anything to relieve the discomfort?\"\n- \"Can you share how long you've had this condition?\"\nUse open-ended questions, such as: Are there any other issues that you're concerned about that we'd like you to address.\n\nLeave the customer:\n- Would you like me to summarize the issues you're describing, and send the content back to you...\nWhen the customer wants to see the doctor or make an appointment, send the information:\n👨‍⚕️ To make an appointment, you can:\n\nContact Dr. Hiep directly, CK II - Andrology - Urology. Zalo: 0777471932\nHave information about the symptoms you are experiencing ready to help your doctor better understand your condition.\n\n🚫 If the vector data does not include relevant information:\nReply politely:\n**\"I do not have enough information to answer this question at this time. Please consider consulting another reliable source or a medical professional.\"**\n\n✅ **Always end your response with a professional Call to Action (CTA):\n\nTôi là trợ lý AI. Để được tư vấn chuyên môn, vui lòng liên hệ với:\nBác sĩ Hiệp, CK II Tiết niệu - Nam Khoa\nZalo: 0777471932\n🌐 **Always reply in Vietnamese.**\n"},"promptType":"define"},"typeVersion":1.9},{"id":"8e0a08fa-9063-4cce-b982-650d54b1dd68","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[460,200],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"credentials":{"openAiApi":{"id":"ScDgXbCy0e7Omp6y","name":"OpenAi account 3"}},"typeVersion":1.2},{"id":"d9399f27-3fa5-499a-89d2-d3b3aa8ff467","name":"Simple Memory","type":"@n8n/n8n-nodes-langchain.memoryBufferWindow","position":[620,200],"parameters":{"sessionKey":"={{ $json.sessionId }}","sessionIdType":"customKey"},"typeVersion":1.3},{"id":"6af61985-4453-48ac-9e5a-ea7e5482374a","name":"OpenAI Chat Model1","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[1100,480],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"credentials":{"openAiApi":{"id":"ScDgXbCy0e7Omp6y","name":"OpenAi account 3"}},"typeVersion":1.2},{"id":"034fea52-646f-4146-908c-e6128d1f764f","name":"Answer questions with a vector store","type":"@n8n/n8n-nodes-langchain.toolVectorStore","position":[900,220],"parameters":{"name":"Knowledge","topK":10,"description":"Urology & Andrology Dataset"},"typeVersion":1},{"id":"4ab86662-617a-4592-b008-062ca5f9cfa7","name":"Pinecone Vector Store","type":"@n8n/n8n-nodes-langchain.vectorStorePinecone","position":[700,380],"parameters":{"options":{},"pineconeIndex":{"__rl":true,"mode":"list","value":"namkhoaa2z","cachedResultName":"namkhoaa2z"}},"credentials":{"pineconeApi":{"id":"wB3phIJE9xu2lIvy","name":"PineconeApi account 2"}},"typeVersion":1.1},{"id":"6e14d1c6-7615-4f2c-84e5-67b94d37d8c9","name":"Embeddings OpenAI","type":"@n8n/n8n-nodes-langchain.embeddingsOpenAi","position":[720,640],"parameters":{"options":{}},"credentials":{"openAiApi":{"id":"ScDgXbCy0e7Omp6y","name":"OpenAi account 3"}},"typeVersion":1.2},{"id":"06831eef-7986-4b56-8eef-94180cfe9a57","name":"🟢 Trigger","type":"n8n-nodes-base.stickyNote","position":[-200,-20],"parameters":{"content":"🟢 Trigger: Activated when a user sends a new message to the chatbot.\n"},"typeVersion":1},{"id":"671e8c95-1585-42cb-9fb7-046266b1eef9","name":"🧠 AI Agent Logic","type":"n8n-nodes-base.stickyNote","position":[420,-120],"parameters":{"width":500,"height":260,"content":"🧠 Main AI logic: Receives user input, gathers context, and generates a friendly response.\n"},"typeVersion":1},{"id":"dc0ddbe5-0025-4998-99a8-4d67c954b6da","name":"🤖 GPT-4o Model","type":"n8n-nodes-base.stickyNote","position":[160,200],"parameters":{"content":"🤖 Uses GPT-4o-mini to understand and generate conversation based on context.\n"},"typeVersion":1},{"id":"a58774f9-9b3c-4e8d-b829-77f1ba8763bf","name":"🧠 Session Memory","type":"n8n-nodes-base.stickyNote","position":[1000,360],"parameters":{"content":"💬 Renders final answer using GPT-4o-mini based on retrieved knowledge.\n"},"typeVersion":1},{"id":"2be54256-0caf-4fe5-9dbc-5ac0db5223bc","name":"📚 Vector Store Search","type":"n8n-nodes-base.stickyNote","position":[560,160],"parameters":{"content":"🧠 Stores user session context to support multi-turn dialogue.\n"},"typeVersion":1},{"id":"87e3319f-a466-4e04-942f-bf32d681f32b","name":"🧩 Pinecone Search","type":"n8n-nodes-base.stickyNote","position":[440,380],"parameters":{"content":"📚 Connects to the medical vector database (RAG) to search for relevant documents.\n"},"typeVersion":1},{"id":"fc8c0d2d-9975-41b0-9732-42660e648610","name":"🧬 Embeddings","type":"n8n-nodes-base.stickyNote","position":[440,620],"parameters":{"content":"🧬 Transforms input into embeddings for Pinecone to use in vector search.\n"},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"68ff049a-9917-47de-b3a0-2edf29614efb","connections":{"Simple Memory":{"ai_memory":[[{"node":"AI Agent","type":"ai_memory","index":0}]]},"Embeddings OpenAI":{"ai_embedding":[[{"node":"Pinecone Vector Store","type":"ai_embedding","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"OpenAI Chat Model1":{"ai_languageModel":[[{"node":"Answer questions with a vector store","type":"ai_languageModel","index":0}]]},"Pinecone Vector Store":{"ai_vectorStore":[[{"node":"Answer questions with a vector store","type":"ai_vectorStore","index":0}]]},"When chat message received":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"Answer questions with a vector store":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]}}}


name: Real-time Crypto News & Sentiment Analysis via Telegram with GPT-4o
author_name: Don Jayamaha Jr
author_username: don-the-gem-dealer
categories: []
created_at: 2025-04-27T02:48:10.901Z
updated_at: 2025-04-27T02:48:10.901Z
url: https://n8n.io/workflows/3751
scraped_at: 2025-06-19 22:07:56
description:
  Stay on top of the latest crypto news and market sentiment instantly, all inside Telegram!  
  This workflow aggregates articles from the top crypto news sources, filters for your topic of interest, and summarizes key news and market sentiment using GPT-4o AI. Ideal for crypto traders, investors, analysts, and market watchers needing fast, intelligent news briefings.

  &gt; 💬 Just type a coin name (e.g., "Bitcoin", "Solana", "DeFi") into your Telegram AI Agent—and get a smart news digest.

  How It Works

  Telegram Bot Trigger  
     User sends a keyword (e.g., "Ethereum") of questions to the Telegram AI Agent.

  Keyword Extraction (AI-Powered)  
     An AI agent identifies the main topic for better targeting.

  News Aggregation  
     Pulls articles from 9 major crypto news RSS feeds:  
     
       Cointelegraph  
       Bitcoin Magazine  
       CoinDesk  
       Bitcoinist  
       NewsBTC  
       CryptoPotato  
       99Bitcoins  
       CryptoBriefing  
       Crypto.news  

  Filtering  
     Finds and merges articles relevant to the user's keyword.

  AI Summarization  
     GPT-4o generates a 3-part summary:
       News Summary  
       Market Sentiment Analysis  
       List of Article Links

  Telegram Response  
     Sends a structured, easy-to-read digest back to the user.

  🔍 What You Can Do with This Workflow

  🔹 Summarize breaking news for any crypto project or keyword  
  🔹 Monitor real-time market sentiment on Bitcoin, DeFi, NFTs, and more  
  🔹 Stay ahead of FUD, bullish trends, and major news events  
  🔹 Quickly brief yourself or your team via Telegram  
  🔹 Use it as a foundation for more advanced crypto alert bots

  ✅ Example User Inputs

  ✅ "Bitcoin" → Latest Bitcoin news and sentiment summary  
  ✅ "Solana" → Updates on Solana projects, price movements, and community trends  
  ✅ "NFT" → Aggregated news about NFT markets and launches  
  ✅ "Layer 2" → Insights on Optimism, Arbitrum, and other L2s  

  🛠️ Setup Instructions

  Create a Telegram Bot  
     Use @BotFather and obtain the Bot Token.

  Configure Telegram Credentials in n8n  
     Add your bot token under Telegram API Credentials.

  Configure OpenAI API  
     Add your OpenAI credentials for GPT-4o access.

  Update Telegram Send Node  
     In the Telegram Send node, replace the placeholder chatId with your real Telegram user or group chat ID.

  Deploy and Test  
     Start chatting with your bot: e.g., "Ethereum" or "DeFi".

  📌 Workflow Highlights

  9 major crypto news sources combined**
  Smart keyword matching** with AI query parsing
  Summarized insights** in human-readable format
  Reference links** included for deeper reading
  Instant delivery** via Telegram

  🚀 Get ahead of the crypto market—automate your news and sentiment monitoring with AI inside Telegram!

nodes_used:
  ["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":"8v4dynjkHSLVGJSG","meta":{"instanceId":"a5283507e1917a33cc3ae615b2e7d5ad2c1e50955e6f831272ddd5ab816f3fb6","templateCredsSetupCompleted":true},"name":"Crypto News & Sentiment","tags":[],"nodes":[{"id":"e10ed4da-ab3e-4ff0-b489-a3ed9e88e042","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[-1340,1520],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini"},"options":{}},"credentials":{"openAiApi":{"id":"yUizd8t0sD5wMYVG","name":"OpenAi account"}},"typeVersion":1.2},{"id":"edb76989-766a-43e6-bf49-3896a1d257dd","name":"Set Query","type":"n8n-nodes-base.set","position":[-780,1340],"parameters":{"options":{},"assignments":{"assignments":[{"id":"9128e9e7-d1b8-4e89-8422-849b8dd519d8","name":"query","type":"string","value":"={{ $json.output }}"},{"id":"b6adc989-7d3c-4dbb-a659-603591cf1f58","name":"sessionId","type":"string","value":"={{ $('Adds the sessionId').item.json.sessionId }}"}]}},"typeVersion":3.4},{"id":"0ef0571a-d0c2-4f05-898e-1aed56b02d56","name":"Crypto News & Sentiment Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[-1280,1340],"parameters":{"text":"={{ $('Send Crypto or Company Name for Analysis').item.json.message.text }}","options":{"systemMessage":"Your job is to analyze the keyword of the question and output it as a single word."},"promptType":"define"},"typeVersion":1.8},{"id":"8f7859fa-e80c-4c0e-b8b5-5593d5108f5f","name":"RSS Cointelegraph","type":"n8n-nodes-base.rssFeedRead","position":[-160,500],"parameters":{"url":"https://cointelegraph.com/rss","options":{}},"typeVersion":1.1},{"id":"5ce9dc61-de8e-4b3a-a0e2-4c077a28e0d4","name":"RSS Bitcoinmagazine","type":"n8n-nodes-base.rssFeedRead","position":[-160,660],"parameters":{"url":"https://bitcoinmagazine.com/.rss/full/","options":{}},"typeVersion":1.1},{"id":"d2491728-8a51-4384-adfa-8636f8d8cacd","name":"RSS Coindesk","type":"n8n-nodes-base.rssFeedRead","position":[-160,820],"parameters":{"url":"https://www.coindesk.com/arc/outboundfeeds/rss/","options":{}},"typeVersion":1.1},{"id":"60b17a68-b7b0-444f-8bbc-4d9ccfba6892","name":"RSS Bitcoinist","type":"n8n-nodes-base.rssFeedRead","position":[-160,980],"parameters":{"url":"https://bitcoinist.com/feed/","options":{}},"typeVersion":1.1},{"id":"82b50de0-68a7-4660-b6d9-fa01922c2492","name":"RSS Newsbtc","type":"n8n-nodes-base.rssFeedRead","position":[-160,1140],"parameters":{"url":"https://www.newsbtc.com/feed/","options":{}},"typeVersion":1.1},{"id":"90f9a5be-8eb2-4073-9c18-50478ba4890b","name":"RSS Cryptopotato","type":"n8n-nodes-base.rssFeedRead","position":[-160,1500],"parameters":{"url":"https://cryptopotato.com/feed/","options":{}},"typeVersion":1.1},{"id":"6428c19d-c66c-4577-b6ca-8c0c82a757fa","name":"RSS 99bitcoins","type":"n8n-nodes-base.rssFeedRead","position":[-160,1680],"parameters":{"url":"https://99bitcoins.com/feed/","options":{}},"typeVersion":1.1},{"id":"b2fc6584-cd64-4b90-91cf-b9bfdc483203","name":"RSS Cryptobriefing","type":"n8n-nodes-base.rssFeedRead","position":[-160,1860],"parameters":{"url":"https://cryptobriefing.com/feed/","options":{}},"typeVersion":1.1},{"id":"8be5859b-bb82-4ece-9aa5-5bfbc27e4cca","name":"RSS Crypto.news","type":"n8n-nodes-base.rssFeedRead","position":[-160,2020],"parameters":{"url":"https://crypto.news/feed/","options":{}},"typeVersion":1.1},{"id":"b5f393de-a3da-47a4-8a19-ebf53c29051d","name":"Merge All Articles","type":"n8n-nodes-base.merge","position":[520,1180],"parameters":{"numberInputs":10},"typeVersion":3.1},{"id":"ce4da50f-ecff-4d13-a90d-e62db6bc3ef9","name":"Filter by Query","type":"n8n-nodes-base.code","position":[760,1320],"parameters":{"jsCode":"const term = $node[\"Set Query\"].json.query.toLowerCase();\nreturn items.filter(item => {\n  const j            = item.json;\n  const title        = (j.title || \"\").toLowerCase();\n  const snippet      = (j.contentSnippet || j.description || \"\").toLowerCase();\n  const fullContent  = (j.content || \"\").toLowerCase();\n  return title.includes(term)\n      || snippet.includes(term)\n      || fullContent.includes(term);\n});"},"typeVersion":2},{"id":"566e842f-8e2c-491c-87b5-5f1d322a9de8","name":"Build Prompt","type":"n8n-nodes-base.code","position":[1080,1320],"parameters":{"jsCode":"const q   = $node[\"Set Query\"].json.query;\nconst list = items\n  .map(i => `- ${i.json.title} (${i.json.link})`)\n  .join(\"\\n\");\nconst prompt = `\nYou are a crypto-industry news analyst.\nSummarize current news and market sentiment for **${q}** based on these articles:\n${list}\n\nAnswer in 3 parts:\n1. Summary of News\n2. Market Sentiment\n3. Links to reference news articles\n`;\nreturn [{ json: { prompt } }];"},"typeVersion":2},{"id":"2f5b2eb5-bc2e-432d-b0c8-44c6822b831b","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[2080,1020],"parameters":{"color":3,"width":300,"height":580,"content":"## Send Telegram Response\n\nSends the final AI-generated summary to the user.\n⚠️ Replace chatId with a dynamic value like << Telegram ID here >> to ensure it sends to the right user."},"typeVersion":1},{"id":"d9f178d6-b834-4a18-b8a5-ab1261b99ca6","name":"Adds the sessionId","type":"n8n-nodes-base.set","position":[-1740,1340],"parameters":{"options":{},"assignments":{"assignments":[{"id":"87c63e75-94e4-432c-b15f-8762aa340215","name":"sessionId","type":"string","value":"={{ $json.message.chat.id }}"}]}},"typeVersion":3.4},{"id":"4dd3e531-ab2a-4930-a127-08adb5bde409","name":"Summarize News & Sentiment (GPT-4o)","type":"@n8n/n8n-nodes-langchain.openAi","position":[1360,1320],"parameters":{"modelId":{"__rl":true,"mode":"list","value":"gpt-4o","cachedResultName":"GPT-4O"},"options":{},"messages":{"values":[{"content":"={{ $node[\"Build Prompt\"].json.prompt }}"},{"role":"assistant","content":"You are a crypto‐industry news analyst. Summarize sentiment clearly and concisely."}]}},"credentials":{"openAiApi":{"id":"yUizd8t0sD5wMYVG","name":"OpenAi account"}},"typeVersion":1.8},{"id":"b0da1d25-9c17-49a1-85f4-82425e7c9f91","name":"Prepare Telegram Message","type":"n8n-nodes-base.set","position":[1780,1320],"parameters":{"options":{},"assignments":{"assignments":[{"id":"565fb705-ac83-4a96-9343-2e29e348cc4f","name":"summary","type":"string","value":"={{ $json.message.content }}"}]}},"typeVersion":3.4},{"id":"95cb909b-51f4-4661-9db5-e8181a7efffe","name":"Sends Response","type":"n8n-nodes-base.telegram","position":[2180,1320],"webhookId":"8018c16f-426e-4a8b-8fbf-55cc013d1226","parameters":{"text":"={{ $json.summary }}","chatId":"<< Add Telegram ID here >>","additionalFields":{"appendAttribution":false}},"credentials":{"telegramApi":{"id":"YDlV4LtcNcmNqk4y","name":"Crypto_News_and_Sentiment_bot"}},"typeVersion":1.2},{"id":"a783bddf-7d70-4345-88f3-c474a50bdea0","name":"Send Crypto or Company Name for Analysis","type":"n8n-nodes-base.telegramTrigger","position":[-2180,1340],"webhookId":"37a1f055-1670-472d-9850-d89555b7ed47","parameters":{"updates":["message"],"additionalFields":{}},"credentials":{"telegramApi":{"id":"YDlV4LtcNcmNqk4y","name":"Crypto_News_and_Sentiment_bot"}},"typeVersion":1.2},{"id":"d847a178-c0f2-482b-8773-ac0362435dfd","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-2320,1200],"parameters":{"color":4,"width":380,"height":360,"content":"## Telegram Setup \nThis bot listens for incoming messages in Telegram. To use it, create a bot with @BotFather and paste your bot token into the credentials."},"typeVersion":1},{"id":"75ee14cf-6236-4f45-b864-b422f18c8214","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-1860,1220],"parameters":{"width":360,"height":320,"content":"## Initialize Chat Session\nStores the user's chat ID as sessionId, which is used to manage conversation memory across steps."},"typeVersion":1},{"id":"674f2555-752d-4ffc-894c-efd705f32887","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[-1440,1200],"parameters":{"color":6,"width":600,"height":460,"content":"##  Extract Keyword \nThis AI agent parses the user input and returns a single-word keyword to help match relevant news articles."},"typeVersion":1},{"id":"bece27b1-bc60-44f7-bdc9-6ec61f7a2e5b","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[-320,300],"parameters":{"color":5,"width":460,"height":1980,"content":"## News Aggregators\nPulls articles from major crypto news sources. You can add more RSS feeds here to expand coverage."},"typeVersion":1},{"id":"7f7a2949-4147-4ab9-bb52-99c1bb2205ed","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[440,980],"parameters":{"color":2,"width":480,"height":760,"content":"## Merge & Filter News\nCombines all RSS articles and filters them using the extracted keyword to match only relevant results."},"typeVersion":1},{"id":"d19d53c0-7d23-4ccb-9a68-dc2855e5b73d","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[1000,1140],"parameters":{"color":7,"width":260,"height":360,"content":"## Prepare AI Prompt\nConstructs the input prompt for GPT-4o with a list of filtered articles. Output includes summary, sentiment, and article links."},"typeVersion":1},{"id":"17607891-ed84-4cca-ad3d-c398e5652a8c","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","position":[1320,1100],"parameters":{"color":3,"width":340,"height":440,"content":"## Summarize News & Sentiment (GPT-4o)\nUses OpenAI GPT-4o to generate a concise summary of the news, analyze market sentiment, and return formatted results.\n\n"},"typeVersion":1},{"id":"9d47eb56-4469-4f42-84a1-6f76bb7fa598","name":"Sticky Note8","type":"n8n-nodes-base.stickyNote","position":[1720,1060],"parameters":{"color":6,"height":460,"content":"## Format for Telegram\n\nExtracts the AI summary and prepares it for Telegram delivery. Change the variable if you want to include other data.\n\n\n"},"typeVersion":1},{"id":"7c02860b-f865-4ff9-baeb-0903a76278d9","name":"Sticky Note9","type":"n8n-nodes-base.stickyNote","position":[1140,320],"parameters":{"width":520,"content":"## ✅ How to Use This Template\n \n🛠 1. Connect your Telegram bot\n🤖 2. Add your OpenAI credentials\n📰 3. Customize the RSS feeds (optional)\n✅ 4. Start your bot and send a query like “Bitcoin” or “NFT”"},"typeVersion":1}],"active":false,"pinData":{},"settings":{"executionOrder":"v1"},"versionId":"ae250264-5df8-4341-b198-5272baeadc38","connections":{"Set Query":{"main":[[{"node":"RSS Cointelegraph","type":"main","index":0},{"node":"RSS Bitcoinmagazine","type":"main","index":0},{"node":"RSS Coindesk","type":"main","index":0},{"node":"RSS Bitcoinist","type":"main","index":0},{"node":"RSS Newsbtc","type":"main","index":0},{"node":"RSS Cryptopotato","type":"main","index":0},{"node":"RSS 99bitcoins","type":"main","index":0},{"node":"RSS Cryptobriefing","type":"main","index":0},{"node":"RSS Crypto.news","type":"main","index":0}]]},"RSS Newsbtc":{"main":[[{"node":"Merge All Articles","type":"main","index":4}]]},"Build Prompt":{"main":[[{"node":"Summarize News & Sentiment (GPT-4o)","type":"main","index":0}]]},"RSS Coindesk":{"main":[[{"node":"Merge All Articles","type":"main","index":2}]]},"RSS 99bitcoins":{"main":[[{"node":"Merge All Articles","type":"main","index":7}]]},"RSS Bitcoinist":{"main":[[{"node":"Merge All Articles","type":"main","index":3}]]},"Filter by Query":{"main":[[{"node":"Build Prompt","type":"main","index":0}]]},"RSS Crypto.news":{"main":[[{"node":"Merge All Articles","type":"main","index":9}]]},"RSS Cryptopotato":{"main":[[{"node":"Merge All Articles","type":"main","index":6}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"Crypto News & Sentiment Agent","type":"ai_languageModel","index":0}]]},"RSS Cointelegraph":{"main":[[{"node":"Merge All Articles","type":"main","index":0}]]},"Adds the sessionId":{"main":[[{"node":"Crypto News & Sentiment Agent","type":"main","index":0}]]},"Merge All Articles":{"main":[[{"node":"Filter by Query","type":"main","index":0}]]},"RSS Cryptobriefing":{"main":[[{"node":"Merge All Articles","type":"main","index":8}]]},"RSS Bitcoinmagazine":{"main":[[{"node":"Merge All Articles","type":"main","index":1}]]},"Prepare Telegram Message":{"main":[[{"node":"Sends Response","type":"main","index":0}]]},"Crypto News & Sentiment Agent":{"main":[[{"node":"Set Query","type":"main","index":0}]]},"Summarize News & Sentiment (GPT-4o)":{"main":[[{"node":"Prepare Telegram Message","type":"main","index":0}]]},"Send Crypto or Company Name for Analysis":{"main":[[{"node":"Adds the sessionId","type":"main","index":0}]]}}}


name: Build your own N8N Workflows MCP Server
author_name: Jimleuk
author_username: jimleuk
categories: []
created_at: 2025-04-28T09:09:58.852Z
updated_at: 2025-04-28T09:09:58.852Z
url: https://n8n.io/workflows/3770
scraped_at: 2025-06-19 22:07:56
description:
  This n8n template shows you how to create an MCP server out of your existing n8n workflows. With this, any MCP client connected can get more done with powerful end-to-end workflows rather than just simple tools.

  Designing agent tools for outcome rather than utility has been a long recommended practice of mine and it applies well when it comes to building MCP servers; In gist, agents to be making the least amount of calls possible to complete a task.

  This is why n8n can be a great fit for MCP servers! This template connects your agent/MCP client (like Claude Desktop) to your existing workflows by allowing the AI to discover, manage and run these workflows indirectly.

  How it works
  An MCP trigger is used and attaches 4 custom workflow tools to discover and manage existing workflows to use and 1 custom workflow tool to execute them.
  We'll introduce an idea of "available" workflows which the agent is allowed to use. This will help limit and avoid some issues when trying to use every workflow such as clashes or non-production.
  The n8n node is a core node which taps into your n8n instance API and is able to retrieve all workflows or filter by tag. For our example, we've tagged the workflows we want to use with "mcp" and these are exposed through the tool "search workflows".
  Redis is used as our main memory for keeping track of which workflows are "available". The tools we have are "add Workflow", "remove workflow" and "list workflows". The agent should be able to manage this autonomously.
  Our approach to allow the agent to execute workflows is to use the Subworkflow trigger. The tricky part is figuring out the input schema for each but was eventually solved by pulling this information out of the workflow's template JSON and adding it as part of the "available" workflow's description. To pass parameters through the Subworkflow trigger, we can do so via the passthrough method - which is that incoming data is used when parameters are not explicitly set within the node.
  When running, the agent will not see the "available" workflows immediately but will need to discover them via "list" and "search". The human will need to make the agent aware that these workflows will be preferred when answering queries or completing tasks.

  How to use
  First, decide which workflows will be made visible to the MCP server. This example uses the tag of "mcp" but you can all workflows or filter in other ways.
  Next, ensure these workflows have Subworkflow triggers with input schema set. This is how the MCP server will run them.
  Set the MCP server to "active" which turns on production mode and makes available to production URL.
  Use this production URL in your MCP client. For Claude Desktop, see the instructions here - https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-langchain.mcptrigger/#integrating-with-claude-desktop.
  There is a small learning curve which will shape how you communicate with this MCP server so be patient and test. The MCP server will work better if there is a focused goal in mind ie. Research and report, rather than just a collection of unrelated tools.

  Requirements
  N8N API key to filter for selected workflows.
  N8N workflows with Subworkflow triggers!
  Redis for memory and tracking the "available" workflows.
  MCP Client or Agent for usage such as Claude Desktop - https://claude.ai/download

  Customising this workflow
  If your targeted workflows do not use the subworkflow trigger, it is possible to amend the executeTool to use HTTP requests for webhooks.
  Managing available workflows helps if you have many workflows where some may be too similar for the agent. If this isn't a problem for you however, feel free to remove the concept of "available" and let the agent discover and use all workflows!

nodes_used:
  ["n8n-nodes-base.redis","@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":"408f9fb9940c3cb18ffdef0e0150fe342d6e655c3a9fac21f0f644e8bedabcd9","templateCredsSetupCompleted":true},"nodes":[{"id":"e3ed1048-bad0-4e91-bfb5-aef3e1883de4","name":"Simplify Workflows","type":"n8n-nodes-base.set","position":[-1740,0],"parameters":{"options":{},"assignments":{"assignments":[{"id":"821226b0-12ad-4d1d-81c3-dfa3c286cce4","name":"id","type":"string","value":"={{ $json.id }}"},{"id":"629d95d6-2501-4ad4-a5ed-e557237e1cc2","name":"name","type":"string","value":"={{ $json.name }}"},{"id":"30699f7c-98d3-44ee-9749-c5528579f7e6","name":"description","type":"string","value":"={{\n$json.nodes\n  .filter(node => node.type === 'n8n-nodes-base.stickyNote')\n  .filter(node => node.parameters.content.toLowerCase().includes('try it out'))\n  .map(node => node.parameters.content.substr(0,255) + '...')\n  .join('\\n')\n}}"},{"id":"6199c275-1ced-4f72-ba59-cb068db54c1b","name":"parameters","type":"string","value":"={{\n(function(node) {\n  if (!node) return {};\n  const inputs = node.parameters.workflowInputs.values;\n  return {\n    \"type\": \"object\",\n    \"required\": inputs.map(input => input.name),\n    \"properties\": inputs.reduce((acc, input) => ({\n      ...acc,\n      [input.name]: { type: input.type ?? 'string' }\n    }), {})\n  }\n})(\n$json.nodes\n  .filter(node => node.type === 'n8n-nodes-base.executeWorkflowTrigger')\n  .first()\n)\n.toJsonString()\n}}"}]}},"executeOnce":false,"typeVersion":3.4},{"id":"a935f5b6-3a35-49e7-870c-87e4daf0ad13","name":"When Executed by Another Workflow","type":"n8n-nodes-base.executeWorkflowTrigger","position":[-3060,600],"parameters":{"workflowInputs":{"values":[{"name":"operation"},{"name":"workflowIds"},{"name":"parameters","type":"object"}]}},"typeVersion":1.1},{"id":"2ff5e521-5288-47a9-af49-55a1bbbfb4f4","name":"Operations","type":"n8n-nodes-base.switch","position":[-2660,560],"parameters":{"rules":{"values":[{"outputKey":"Add","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"3254a8f9-5fd3-4089-be16-cc3fd20639b8","operator":{"type":"string","operation":"equals"},"leftValue":"={{ $('When Executed by Another Workflow').first().json.operation }}","rightValue":"addWorkflow"}]},"renameOutput":true},{"outputKey":"remove","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"a33dd02d-5192-48c9-b569-eafddabd2462","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $('When Executed by Another Workflow').first().json.operation }}","rightValue":"removeWorkflow"}]},"renameOutput":true},{"outputKey":"list","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"2d68dc3f-a213-47f8-8453-1bceae404653","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $('When Executed by Another Workflow').first().json.operation }}","rightValue":"listWorkflows"}]},"renameOutput":true},{"outputKey":"search","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"2146a87e-1a50-4caa-a2ee-f7f6fc2b19c9","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $('When Executed by Another Workflow').first().json.operation }}","rightValue":"searchWorkflows"}]},"renameOutput":true},{"outputKey":"execute","conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"98b25a51-2cb5-49af-9609-827245595dc9","operator":{"name":"filter.operator.equals","type":"string","operation":"equals"},"leftValue":"={{ $('When Executed by Another Workflow').first().json.operation }}","rightValue":"executeWorkflow"}]},"renameOutput":true}]},"options":{}},"typeVersion":3.2},{"id":"5b78271a-6474-4d87-a344-72f7f63822dc","name":"Get MCP-tagged Workflows","type":"n8n-nodes-base.n8n","position":[-2400,200],"parameters":{"filters":{"tags":"mcp"},"requestOptions":{}},"credentials":{"n8nApi":{"id":"5vELmsVPmK4Bkqkg","name":"n8n account"}},"typeVersion":1},{"id":"1197d29e-b124-4576-846d-876ad16de6e9","name":"Filter Matching Ids","type":"n8n-nodes-base.filter","position":[-2180,200],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"90c97733-48de-4402-8388-5d49e3534388","operator":{"type":"boolean","operation":"true","singleValue":true},"leftValue":"={{\n$json.id\n  ? $('When Executed by Another Workflow').first().json.workflowIds.split(',').includes($json.id)\n  : false\n}}","rightValue":"={{ $json.id }}"}]}},"executeOnce":false,"typeVersion":2.2,"alwaysOutputData":true},{"id":"81623298-c3e7-4e20-86a9-d2587b302f28","name":"Store In Memory","type":"n8n-nodes-base.redis","position":[-1520,0],"parameters":{"key":"mcp_n8n_tools","value":"={{\n($('Get Memory').item.json.data?.parseJson() ?? [])\n  .concat($input.all().map(item => item.json))\n  .toJsonString()\n}}","operation":"set"},"credentials":{"redis":{"id":"zU4DA70qSDrZM1El","name":"Redis account (localhost)"}},"executeOnce":true,"typeVersion":1},{"id":"5ff0ea2f-a2ee-4cc3-bdf9-153ce5973770","name":"AddTool Success","type":"n8n-nodes-base.set","position":[-1300,0],"parameters":{"options":{},"assignments":{"assignments":[{"id":"d921063f-e8ed-44a8-95a0-4402ecde6c5d","name":"=response","type":"string","value":"={{ $('Simplify Workflows').all().length }} tools were added successfully."}]}},"executeOnce":true,"typeVersion":3.4},{"id":"1d3169cc-15cd-4296-9e63-bb162322e5e2","name":"AddTool Error","type":"n8n-nodes-base.set","position":[-1740,200],"parameters":{"options":{},"assignments":{"assignments":[{"id":"8c4e0763-a4ff-4e8a-a992-13e4e12a5685","name":"response","type":"string","value":"Expected Tools matching Ids given, but none found."}]}},"executeOnce":true,"typeVersion":3.4},{"id":"6149a950-c1ed-44b4-aee6-3daeabf8ba01","name":"Get Memory","type":"n8n-nodes-base.redis","position":[-2860,600],"parameters":{"key":"mcp_n8n_tools","options":{},"operation":"get","propertyName":"data"},"credentials":{"redis":{"id":"zU4DA70qSDrZM1El","name":"Redis account (localhost)"}},"typeVersion":1},{"id":"3c538002-45f7-4a2f-9ef4-5aede63235ab","name":"Split Out","type":"n8n-nodes-base.splitOut","position":[-2180,400],"parameters":{"options":{},"fieldToSplitOut":"data"},"typeVersion":1},{"id":"d41e48e0-d610-4e18-9942-842419c99c83","name":"Filter Matching IDs","type":"n8n-nodes-base.filter","position":[-1960,400],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"d2c149fb-d115-449b-9b74-f3c2f8ff7950","operator":{"type":"boolean","operation":"false","singleValue":true},"leftValue":"={{\n$json.id\n  ? $('Operations').first().json.workflowIds.split(',').includes($json.id)\n  : false\n}}","rightValue":""}]}},"typeVersion":2.2,"alwaysOutputData":true},{"id":"21d8cdda-bb47-42cd-a056-809a5556b438","name":"Store In Memory1","type":"n8n-nodes-base.redis","position":[-1520,500],"parameters":{"key":"mcp_n8n_tools","value":"={{ $input.all().flatMap(item => item.json.data).compact() }}","operation":"set"},"credentials":{"redis":{"id":"zU4DA70qSDrZM1El","name":"Redis account (localhost)"}},"executeOnce":true,"typeVersion":1},{"id":"5a391d0a-ba13-4d54-85fd-eb2f6a935614","name":"Remove Tool Success","type":"n8n-nodes-base.set","position":[-1300,400],"parameters":{"options":{},"assignments":{"assignments":[{"id":"1368947f-6625-4e2e-ae27-0fcad0a1d12a","name":"response","type":"string","value":"={{ $('When Executed by Another Workflow').first().json.workflowIds.split(',').length }} tool(s) removed successfully."}]}},"typeVersion":3.4},{"id":"65dfecc4-43ba-4518-adbf-9676c5cb1377","name":"Convert to JSON","type":"n8n-nodes-base.set","position":[-2400,400],"parameters":{"options":{},"assignments":{"assignments":[{"id":"bce29a06-cff6-4409-96d2-04cc858a0e98","name":"data","type":"array","value":"={{ $json.data.parseJson() }}"}]}},"typeVersion":3.4},{"id":"b8b64fc2-63cf-4b17-9b6d-9d94aec10065","name":"listTools Success","type":"n8n-nodes-base.set","position":[-2400,600],"parameters":{"options":{},"assignments":{"assignments":[{"id":"bce29a06-cff6-4409-96d2-04cc858a0e98","name":"response","type":"array","value":"={{\n$json.data\n  ? $json.data.parseJson()\n  : []\n}}"}]}},"typeVersion":3.4},{"id":"d4fd9e74-f040-4b3c-8ce0-371315a0d130","name":"Get MCP-tagged Workflows1","type":"n8n-nodes-base.n8n","position":[-2180,600],"parameters":{"filters":{"tags":"mcp"},"requestOptions":{}},"credentials":{"n8nApi":{"id":"5vELmsVPmK4Bkqkg","name":"n8n account"}},"typeVersion":1},{"id":"d58922c4-b721-4228-83cb-0b1d9632bbc6","name":"Simplify Workflows1","type":"n8n-nodes-base.set","position":[-1960,600],"parameters":{"options":{},"assignments":{"assignments":[{"id":"821226b0-12ad-4d1d-81c3-dfa3c286cce4","name":"id","type":"string","value":"={{ $json.id }}"},{"id":"629d95d6-2501-4ad4-a5ed-e557237e1cc2","name":"name","type":"string","value":"={{ $json.name }}"},{"id":"30699f7c-98d3-44ee-9749-c5528579f7e6","name":"description","type":"string","value":"={{\n$json.nodes\n  .filter(node => node.type === 'n8n-nodes-base.stickyNote')\n  .filter(node => node.parameters.content.toLowerCase().includes('try it out'))\n  .map(node => node.parameters.content.substr(0,255) + '...')\n  .join('\\n')\n}}"},{"id":"137221ef-f0a3-4441-bae7-d9d4a22e05b7","name":"parameters","type":"string","value":"={{\n(function(node) {\n  if (!node) return {};\n  const inputs = node.parameters.workflowInputs.values;\n  return {\n    \"type\": \"object\",\n    \"required\": inputs.map(input => input.name),\n    \"properties\": inputs.reduce((acc, input) => ({\n      ...acc,\n      [input.name]: { type: input.type ?? 'string' }\n    }), {})\n  }\n})(\n$json.nodes\n  .filter(node => node.type === 'n8n-nodes-base.executeWorkflowTrigger')\n  .first()\n)\n.toJsonString()\n}}"}]}},"executeOnce":false,"typeVersion":3.4},{"id":"b44b1115-5153-4b98-979f-219a32b693de","name":"listTools Success1","type":"n8n-nodes-base.aggregate","position":[-1740,600],"parameters":{"options":{},"aggregate":"aggregateAllItemData","destinationFieldName":"response"},"typeVersion":1},{"id":"e9d9a33c-ebfa-4f74-a4da-fb6b6f6f6df5","name":"Get Parameters","type":"n8n-nodes-base.set","position":[-1920,1020],"parameters":{"mode":"raw","options":{},"jsonOutput":"={{ $('When Executed by Another Workflow').first().json.parameters }}"},"typeVersion":3.4},{"id":"c028324a-5c79-4ce9-afd6-097b6f75a74a","name":"executeTool Result","type":"n8n-nodes-base.aggregate","position":[-1440,1020],"parameters":{"options":{},"aggregate":"aggregateAllItemData","destinationFieldName":"response"},"typeVersion":1},{"id":"9eeac3cb-af7e-44c7-8891-6ff4367d0b54","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[-3600,1040],"parameters":{"options":{"systemMessage":"=You are a helpful assistant who only uses workflows to answer questions and perform tasks.\n* When asked to complete a task, you will assume there is a workflow which you can use. Do not generate custom scripts or raw commands - use a workflow isntead.\n* Only use the available active workflows as listed using the \"listWorkflows\" tool.\n* Workflows returned by \"listWorkflows\" tool are active in the pool and do not need to be added again.\n* Always ask the user before adding workflows to the availble pool.\n* You do not need to confirm each step with the user when executing workflows.\n* When executing the workflow, the required parameters schema for it is listed in the workflow's profile. To get this profile, use the listWokflows tool.\n* If no available workflows are suitable and you are not able to complete the task, simply let the user know.\n* Do not search for workflows in the directory unless the user requests."}},"typeVersion":1.8},{"id":"23601548-7863-403e-a671-267bf592b824","name":"When chat message received","type":"@n8n/n8n-nodes-langchain.chatTrigger","position":[-3840,1040],"webhookId":"86a50552-8058-4896-bd7e-ab95eba073ce","parameters":{"options":{}},"typeVersion":1.1},{"id":"54ed210d-e1b8-4bd7-85e4-88678111a45e","name":"MCP Client","type":"@n8n/n8n-nodes-langchain.mcpClientTool","position":[-3360,1240],"parameters":{"sseEndpoint":"=<Production URL of MCP Server>"},"typeVersion":1},{"id":"c612da64-9cc1-4601-a987-cd2023fd1863","name":"Simple Memory","type":"@n8n/n8n-nodes-langchain.memoryBufferWindow","position":[-3500,1240],"parameters":{"contextWindowLength":30},"typeVersion":1.3},{"id":"77a9fd22-c31c-49e4-9d5f-af572b137925","name":"Convert to JSON1","type":"n8n-nodes-base.set","position":[-2360,1120],"parameters":{"options":{},"assignments":{"assignments":[{"id":"bce29a06-cff6-4409-96d2-04cc858a0e98","name":"data","type":"array","value":"={{ $json.data.parseJson() }}"}]}},"typeVersion":3.4},{"id":"3377aa25-4190-4bdc-be20-b4e324212060","name":"Has Workflow Available?","type":"n8n-nodes-base.if","position":[-2140,1120],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"9c9df00b-b090-4773-8012-1824b4eeb13f","operator":{"type":"object","operation":"exists","singleValue":true},"leftValue":"={{\n$json.data.find(d => d.id === $('When Executed by Another Workflow').item.json.workflowIds)\n}}","rightValue":""}]}},"typeVersion":2.2},{"id":"92b1bb21-d739-47f0-a278-92ffa5a10cbf","name":"ExecuteTool Error","type":"n8n-nodes-base.set","position":[-1920,1220],"parameters":{"options":{},"assignments":{"assignments":[{"id":"2fa3e311-e836-42f4-922a-fae19d8e0267","name":"response","type":"string","value":"=Expected workflow to be available but not yet added. You can only use workflows which have been added to the available pool. Use the listWorkflows tool to see available workflows."}]}},"typeVersion":3.4},{"id":"529e35e0-cf11-405a-9011-e6f7f2122a4e","name":"Workflow Exists?","type":"n8n-nodes-base.if","position":[-1960,200],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"15aef770-639e-4df0-900f-29013ccd00c4","operator":{"type":"object","operation":"notEmpty","singleValue":true},"leftValue":"={{ $json }}","rightValue":""}]}},"typeVersion":2.2},{"id":"ba278834-c774-4a3d-8ebc-f64ac77317c2","name":"N8N Workflows MCP Server","type":"@n8n/n8n-nodes-langchain.mcpTrigger","position":[-3720,240],"webhookId":"4625bcf4-0dd9-4562-a70f-6fee41f6f12d","parameters":{"path":"4625bcf4-0dd9-4562-a70f-6fee41f6f12d"},"typeVersion":1},{"id":"ed940612-4772-4377-afe2-5484a8978665","name":"Add Workflow","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[-3800,460],"parameters":{"name":"addWorkflow","workflowId":{"__rl":true,"mode":"id","value":"={{ $workflow.id }}"},"description":"Adds one or more workflows by ID to the available pool of workflows for the agent. You can get a list of workflows by calling the listTool tool.","workflowInputs":{"value":{"operation":"addWorkflow","parameters":"null","workflowIds":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('workflowIds', ``, 'string') }}"},"schema":[{"id":"operation","type":"string","display":true,"required":false,"displayName":"operation","defaultMatch":false,"canBeUsedToMatch":true},{"id":"workflowIds","type":"string","display":true,"required":false,"displayName":"workflowIds","defaultMatch":false,"canBeUsedToMatch":true},{"id":"parameters","type":"object","display":true,"required":false,"displayName":"parameters","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.1},{"id":"e7d5096c-3545-43fd-aa1f-495dc041ccce","name":"RemoveWorkflow","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[-3700,560],"parameters":{"name":"removeWorkflow","workflowId":{"__rl":true,"mode":"id","value":"={{ $workflow.id }}"},"description":"Removes one or more workflows by ID from the available pool of workflows for the agent.","workflowInputs":{"value":{"operation":"removeWorkflow","parameters":"null","workflowIds":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('workflowIds', ``, 'string') }}"},"schema":[{"id":"operation","type":"string","display":true,"required":false,"displayName":"operation","defaultMatch":false,"canBeUsedToMatch":true},{"id":"workflowIds","type":"string","display":true,"required":false,"displayName":"workflowIds","defaultMatch":false,"canBeUsedToMatch":true},{"id":"parameters","type":"object","display":true,"required":false,"displayName":"parameters","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.1},{"id":"c20b63dc-e768-4529-a08c-5370853fc4c9","name":"List Workflows","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[-3580,660],"parameters":{"name":"listTool","workflowId":{"__rl":true,"mode":"id","value":"={{ $workflow.id }}"},"description":"Lists the available pool of workflows for the agent.","workflowInputs":{"value":{"operation":"listWorkflows","parameters":"null","workflowIds":"null"},"schema":[{"id":"operation","type":"string","display":true,"required":false,"displayName":"operation","defaultMatch":false,"canBeUsedToMatch":true},{"id":"workflowIds","type":"string","display":true,"required":false,"displayName":"workflowIds","defaultMatch":false,"canBeUsedToMatch":true},{"id":"parameters","type":"object","display":true,"required":false,"displayName":"parameters","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.1},{"id":"88fb8a1e-2f4c-4ff1-8be9-0f7afee2dd4d","name":"SearchWorkflows","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[-3460,560],"parameters":{"name":"searchTool","workflowId":{"__rl":true,"mode":"id","value":"={{ $workflow.id }}"},"description":"Returns all workflows which can be added to the pool of available workflows for the agent.","workflowInputs":{"value":{"operation":"searchWorkflows","parameters":"null","workflowIds":"null"},"schema":[{"id":"operation","type":"string","display":true,"required":false,"displayName":"operation","defaultMatch":false,"canBeUsedToMatch":true},{"id":"workflowIds","type":"string","display":true,"required":false,"displayName":"workflowIds","defaultMatch":false,"canBeUsedToMatch":true},{"id":"parameters","type":"object","display":true,"required":false,"displayName":"parameters","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.1},{"id":"c643c007-de89-4d94-9739-aeb2032c792f","name":"ExecuteWorkflow","type":"@n8n/n8n-nodes-langchain.toolWorkflow","position":[-3340,460],"parameters":{"name":"executeTool","workflowId":{"__rl":true,"mode":"id","value":"={{ $workflow.id }}"},"description":"Executes a workflow which has been added to the pool of available workflows for the agent.","workflowInputs":{"value":{"operation":"executeWorkflow","parameters":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('parameters', ``, 'string') }}","workflowIds":"={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('workflowIds', ``, 'string') }}"},"schema":[{"id":"operation","type":"string","display":true,"required":false,"displayName":"operation","defaultMatch":false,"canBeUsedToMatch":true},{"id":"workflowIds","type":"string","display":true,"required":false,"displayName":"workflowIds","defaultMatch":false,"canBeUsedToMatch":true},{"id":"parameters","type":"object","display":true,"required":false,"displayName":"parameters","defaultMatch":false,"canBeUsedToMatch":true}],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":false}},"typeVersion":2.1},{"id":"4f1c1559-8d50-48b1-94f2-542e0bb4d494","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-3920,80],"parameters":{"color":7,"width":720,"height":740,"content":"## 1. Add 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":"54d61491-04dc-4263-96e0-67827842ca07","name":"Execute Workflow with PassThrough Variables","type":"n8n-nodes-base.executeWorkflow","position":[-1660,1020],"parameters":{"options":{"waitForSubWorkflow":true},"workflowId":{"__rl":true,"mode":"id","value":"={{ $('When Executed by Another Workflow').first().json.workflowIds }}"},"workflowInputs":{"value":{},"schema":[],"mappingMode":"defineBelow","matchingColumns":[],"attemptToConvertTypes":false,"convertFieldsToString":true}},"executeOnce":false,"typeVersion":1.2},{"id":"1042884f-a44c-4757-9ff9-3a5cc81058f2","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[-2600,-140],"parameters":{"color":7,"width":740,"height":300,"content":"## 2. Dynamically manage a list of \"Available\" Workflows\n[Learn more about the n8n node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.n8n)\n\nThe idea is to limit the number of workflows the agent has access to in order to ensure undesired workflows or duplication of similar workflows are avoided. Here, we do this by managing a virtual list of workflows in memory using Redis - under the hood, it's just an array to store Workflow details.\n\nGood to note, the intended workflows must have **Subworkflow triggers** and ideally, with input schema set as well. This template analyses each workflow's JSON and captures its input schema as part of the workflow's description. Doing so,  when it comes time to execute, the agent will know in what format to set the parameters when calling the subworkflow.\n"},"typeVersion":1},{"id":"903ead44-3eab-4606-aa4e-e66378bb5f7e","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[-2420,820],"parameters":{"color":7,"width":1160,"height":600,"content":"## 3. Let the Agent execute any N8N Workflow\n[Learn more about the Execute Workflow node](https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.executeworkflow/)\n\nFinally once the agent has gathered the required workflows, it will start performing the requested task by executing one or more available workflows. The desired behaviour is that the agent will use \"listWorkflows\" to see which workflows are \"active\" and then plan out how to use them. Attempts to use a workflow before adding it to the available pool will result in an error response."},"typeVersion":1},{"id":"194fbcbc-a7bb-41c8-9289-a214b1415386","name":"OpenAI Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[-3660,1240],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4.1-mini","cachedResultName":"gpt-4.1-mini"},"options":{}},"credentials":{"openAiApi":{"id":"8gccIjcuf3gvaoEr","name":"OpenAi account"}},"typeVersion":1.2},{"id":"aee33258-cf30-4cb4-ab58-7bef7ba27b65","name":"Is Empty Array?","type":"n8n-nodes-base.if","position":[-1740,400],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"2cd1b233-fb24-45d5-9efd-1db44b817809","operator":{"type":"array","operation":"empty","singleValue":true},"leftValue":"={{ $input.all().flatMap(item => item.json.data).compact() }}","rightValue":""}]}},"typeVersion":2.2},{"id":"b367a25f-e679-4a71-910e-27f1aa686816","name":"Delete Key","type":"n8n-nodes-base.redis","position":[-1520,300],"parameters":{"key":"mcp_n8n_tools","operation":"delete"},"credentials":{"redis":{"id":"zU4DA70qSDrZM1El","name":"Redis account (localhost)"}},"executeOnce":true,"typeVersion":1},{"id":"eec527e1-db4d-4294-a076-379ebd9640a9","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[-3920,860],"parameters":{"color":7,"width":740,"height":560,"content":"## 4. Connect any Agent with a MCP Client\nUse this agent to test your MCP server. Note, i"},"typeVersion":1},{"id":"c9b51f36-f9bd-4a60-b195-8da229462331","name":"Sticky Note4","type":"n8n-nodes-base.stickyNote","position":[-2880,820],"parameters":{"color":5,"width":320,"height":400,"content":"* **AddWorkflow**\n  This tool adds (or rather, appends) workflows to our \"available\" list.\n* **RemoveWorkflow**\n  This tool removes a workflow entry from our list.\n* **listWorkflows**\n  This tool displays the current state of the workflows list and the available workflows within it. Useful for checking which workflows have been added to the list.\n* **searchWorkflows**\n  For now, this tools just pulls the existing workflows from the n8n instance and returns it to the agent. Given more resources, you may want to swap this out for a indexed search instead (you'll need to build this yourself!)."},"typeVersion":1},{"id":"91b2859a-7563-4ebd-ae61-c9a487e18d81","name":"Sticky Note5","type":"n8n-nodes-base.stickyNote","position":[-4600,-180],"parameters":{"width":600,"height":1440,"content":"## Try it out!\n### This n8n template shows you how to create an MCP server out of your existing n8n workflows. With this, any MCP client connected can get more done with powerful end-to-end workflows rather than just simple tools.\n\nDesigning agent tools for outcome rather than utility has been a long recommended practice of mine and it applies well when it comes to building MCP servers; In gist, it prefers agents to be making the least calls possible to complete a task.\n\nThis is why n8n can be a great fit for MCP servers! This template connects your agent/MCP client (like Claude Desktop) to your existing workflows by allowing the AI to discover, manage and run these workflows indirectly.\n\n### How it works\n* An MCP trigger is used and attaches 4 custom workflow tools to discover and manage existing workflows to use and 1 custom workflow tool to execute them.\n* We'll introduce an idea of \"available\" workflows which the agent is allowed to use. This will help limit and avoid some issues when trying to use every workflow such as clashes or non-production.\n* The n8n node is a core node which taps into your n8n instance API and is able to retrieve all workflows or filter by tag. For our example, we've tagged the workflows we want to use with \"mcp\" and these are exposed through the tool \"search workflows\".\n* Redis is used as our main memory for keeping track of which workflows are \"available\". The tools we have are \"add Workflow\", \"remove workflow\" and \"list workflows\". The agent should be able to manage this autonomously.\n* Our approach to allow the agent to execute workflows is to use the Subworkflow trigger. The tricky part is figuring out the input schema for each but was eventually solved by pulling this information out of the workflow's template JSON and adding it as part of the \"available\" workflow's description. To pass parameters through the Subworkflow trigger, we can do so via the passthrough method - which is that incoming data is used when parameters are not explicitly set within the node.\n* When running, the agent will not see the \"available\" workflows immediately but will need to discover them via \"list\" and \"search\". The human will need to make the agent aware that these workflows will be preferred when answering queries or completing tasks.\n\n### How to use\n* First, decide which workflows will be made visible to the MCP server. This example uses the tag of \"mcp\" but you can all workflows or filter in other ways.\n* Next, ensure these workflows have Subworkflow triggers with input schema set. This is how the MCP server will run them.\n* Set the MCP server to \"active\" which turns on production mode and makes available to production URL.\n* Use this production URL in your MCP client. For Claude Desktop, see the instructions here - https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-langchain.mcptrigger/#integrating-with-claude-desktop.\n* There is a small learning curve which will shape how you communicate with this MCP server so be patient and test. The MCP server will work better if there is a focused goal in mind ie. Research and report, rather than just a collection of unrelated tools.\n\n### Requirements\n* N8N API key to filter for selected workflows.\n* N8N workflows with Subworkflow triggers!\n* Redis for memory and tracking the \"available\" workflows.\n* MCP Client or Agent for usage such as Claude Desktop - https://claude.ai/download\n\n### Customising this workflow\n* If your targeted workflows do not use the subworkflow trigger, it is possible to amend the executeTool to use HTTP requests for webhooks.\n* Managing available workflows helps if you have many workflows where some may be too similar for the agent. If this isn't a problem for you however, feel free to remove the concept of \"available\" and let the agent discover and use all workflows!"},"typeVersion":1},{"id":"ec3194d2-90c8-4019-a1b5-576c61e9a8b0","name":"Sticky Note6","type":"n8n-nodes-base.stickyNote","position":[-2600,-280],"parameters":{"color":5,"width":380,"height":120,"content":"### How many existing workflows can I use?\nWell, as many as you want really! For this example, I've limited it for workflows which are tagged as \"mcp\" but you can remove this filter to allow all."},"typeVersion":1},{"id":"5f587241-5604-4724-bc01-3c9bc3f7bdc2","name":"Sticky Note7","type":"n8n-nodes-base.stickyNote","position":[-1720,1000],"parameters":{"height":440,"content":"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n### 🚨 Ensure this node does not set the input schema!\nFor passthrough parameters to work, this node should not make available input schema fields. ie. the input fields should not be visible.\n\nIf there are, the node needs to be reset!"},"typeVersion":1}],"pinData":{},"connections":{"Split Out":{"main":[[{"node":"Filter Matching IDs","type":"main","index":0}]]},"Delete Key":{"main":[[{"node":"Remove Tool Success","type":"main","index":0}]]},"Get Memory":{"main":[[{"node":"Operations","type":"main","index":0}]]},"MCP Client":{"ai_tool":[[{"node":"AI Agent","type":"ai_tool","index":0}]]},"Operations":{"main":[[{"node":"Get MCP-tagged Workflows","type":"main","index":0}],[{"node":"Convert to JSON","type":"main","index":0}],[{"node":"listTools Success","type":"main","index":0}],[{"node":"Get MCP-tagged Workflows1","type":"main","index":0}],[{"node":"Convert to JSON1","type":"main","index":0}]]},"Add Workflow":{"ai_tool":[[{"node":"N8N Workflows MCP Server","type":"ai_tool","index":0}]]},"Simple Memory":{"ai_memory":[[{"node":"AI Agent","type":"ai_memory","index":0}]]},"Get Parameters":{"main":[[{"node":"Execute Workflow with PassThrough Variables","type":"main","index":0}]]},"List Workflows":{"ai_tool":[[{"node":"N8N Workflows MCP Server","type":"ai_tool","index":0}]]},"RemoveWorkflow":{"ai_tool":[[{"node":"N8N Workflows MCP Server","type":"ai_tool","index":0}]]},"Convert to JSON":{"main":[[{"node":"Split Out","type":"main","index":0}]]},"ExecuteWorkflow":{"ai_tool":[[{"node":"N8N Workflows MCP Server","type":"ai_tool","index":0}]]},"Is Empty Array?":{"main":[[{"node":"Delete Key","type":"main","index":0}],[{"node":"Store In Memory1","type":"main","index":0}]]},"SearchWorkflows":{"ai_tool":[[{"node":"N8N Workflows MCP Server","type":"ai_tool","index":0}]]},"Store In Memory":{"main":[[{"node":"AddTool Success","type":"main","index":0}]]},"Convert to JSON1":{"main":[[{"node":"Has Workflow Available?","type":"main","index":0}]]},"Store In Memory1":{"main":[[{"node":"Remove Tool Success","type":"main","index":0}]]},"Workflow Exists?":{"main":[[{"node":"Simplify Workflows","type":"main","index":0}],[{"node":"AddTool Error","type":"main","index":0}]]},"OpenAI Chat Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"Simplify Workflows":{"main":[[{"node":"Store In Memory","type":"main","index":0}]]},"Filter Matching IDs":{"main":[[{"node":"Is Empty Array?","type":"main","index":0}]]},"Filter Matching Ids":{"main":[[{"node":"Workflow Exists?","type":"main","index":0}]]},"Simplify Workflows1":{"main":[[{"node":"listTools Success1","type":"main","index":0}]]},"Has Workflow Available?":{"main":[[{"node":"Get Parameters","type":"main","index":0}],[{"node":"ExecuteTool Error","type":"main","index":0}]]},"Get MCP-tagged Workflows":{"main":[[{"node":"Filter Matching Ids","type":"main","index":0}]]},"Get MCP-tagged Workflows1":{"main":[[{"node":"Simplify Workflows1","type":"main","index":0}]]},"When chat message received":{"main":[[{"node":"AI Agent","type":"main","index":0}]]},"When Executed by Another Workflow":{"main":[[{"node":"Get Memory","type":"main","index":0}]]},"Execute Workflow with PassThrough Variables":{"main":[[{"node":"executeTool Result","type":"main","index":0}]]}}}


