AutomationFlowsAI & RAG › Translate and Dub Youtube Videos Using Browseract, Telegram, Gemini & Elevenlabs

Translate and Dub Youtube Videos Using Browseract, Telegram, Gemini & Elevenlabs

ByMadame AI Team | Kai @madame-ai on n8n.io

This workflow transforms any YouTube video into a localized audio experience. It scrapes the video content, translates the transcript into your target language using AI, generates high-quality dubbed audio using ElevenLabs, and delivers the audio files and a summary directly to…

Event trigger★★★★☆ complexityAI-powered20 nodesGoogle Gemini ChatAgentOutput Parser StructuredOpenRouter Chat@Elevenlabs/N8N Nodes ElevenlabsN8N Nodes BrowseractTelegramTelegram Trigger
AI & RAG Trigger: Event Nodes: 20 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #12361 — we link there as the canonical source.

This workflow follows the Agent → Google Gemini Chat recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "wNnS4kC3ttUqjStO",
  "name": "Translate and dub YouTube videos using BrowserAct, Telegrma & Gemini",
  "tags": [],
  "nodes": [
    {
      "id": "a2e5d18a-5631-480e-89ce-41cc812b9444",
      "name": "Validate inputs",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        912,
        800
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f437d203-8a6d-40f1-9911-fee71f95164c",
      "name": "Analyze user Input",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        912,
        640
      ],
      "parameters": {
        "text": "={{ $json.message.text }}",
        "options": {
          "systemMessage": "You are a URL extraction bot. Your only goal is to find the YouTube link in the user's input and output it as raw text.\n\nRules:\n1. Identify the YouTube URL (e.g., youtube.com or youtu.be).\n2. Output ONLY the URL.\n3. Do NOT use Markdown formatting (no backticks, no bolding).\n4. Do NOT include any conversational text (no \"Here is the link\", no \"Found it\").\n5. If there is no link, return the word \"NULL\".\n\nExample Input: \"Please translate this video for me https://www.youtube.com/watch?v=dQw4w9WgXcQ thanks\"\nExample Output: https://www.youtube.com/watch?v=dQw4w9WgXcQ"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3
    },
    {
      "id": "02ea932e-5434-42e9-aa5a-682c38a15a06",
      "name": "Structured Output",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1968,
        944
      ],
      "parameters": {
        "autoFix": true,
        "jsonSchemaExample": "{\n  \"telegram_post\": \"HTML string here...\",\n  \"dubbing_parts\": [\n    {\n      \"text\": \"Translated text for the first section...\",\n      \"file_name\": \"dub_part_1.mp3\",\n      \"caption\": \"Part 1: Introduction\"\n    },\n    {\n      \"text\": \"Translated text for the second section...\",\n      \"file_name\": \"dub_part_2.mp3\",\n      \"caption\": \"Part 2: Advanced Techniques\"\n    }\n  ]\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "f76b656b-e44b-4c97-a452-422024237503",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        1872,
        944
      ],
      "parameters": {
        "model": "google/gemini-2.5-pro",
        "options": {}
      },
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e6a440ed-5a0f-48fa-897d-0e760d669504",
      "name": "Define Language",
      "type": "n8n-nodes-base.set",
      "position": [
        1456,
        736
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "9a21ee10-ff50-4100-9878-9211827faa3f",
              "name": "Target_Language",
              "type": "string",
              "value": "Spanish"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "e9fd6b3c-ded4-411f-8a60-0cc30e8e1323",
      "name": "Convert text to speech",
      "type": "@elevenlabs/n8n-nodes-elevenlabs.elevenLabs",
      "position": [
        3024,
        912
      ],
      "parameters": {
        "text": "={{ $json.text }}",
        "voice": {
          "__rl": true,
          "mode": "list",
          "value": "TX3LPaxmHKxFdv7VOQHJ",
          "cachedResultName": "Liam - Energetic, Social Media Creator"
        },
        "resource": "speech",
        "requestOptions": {},
        "additionalOptions": {
          "model": {
            "__rl": true,
            "mode": "list",
            "value": "eleven_flash_v2_5",
            "cachedResultName": "Eleven Flash v2.5"
          }
        }
      },
      "credentials": {
        "elevenLabsApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "fd4a0b51-d92e-459a-8dfd-1af67ed71275",
      "name": "Extract Youtube Transcript",
      "type": "n8n-nodes-browseract.browserAct",
      "position": [
        1264,
        736
      ],
      "parameters": {
        "type": "WORKFLOW",
        "timeout": 7200,
        "workflowId": "70752502343921927",
        "workflowConfig": {
          "value": {
            "input-Target_Video": "={{ $json.output }}"
          },
          "schema": [
            {
              "id": "input-Target_Video",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "description": "If left blank, the default value defined in BrowserAct will be used.",
              "displayName": "Target_Video",
              "defaultMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "input-Target_Video"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "open_incognito_mode": false
      },
      "credentials": {
        "browserActApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a88ed8f6-377e-4739-ac07-ec7a760d52d2",
      "name": "Analyze Transcript and Generate Dub",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1872,
        736
      ],
      "parameters": {
        "text": "=video_data : {{ $('Define Language').first().json.Target_Language }}\nTarget language :{{ $('Extract Youtube Transcript').first().json.output.string }}",
        "options": {
          "systemMessage": "You are a Content Localization & Automation Bot. Your task is to process raw video metadata and generate a structured JSON output containing a Telegram post and a segmented dubbing script.\n\n### INPUT DATA:\nYou will receive a JSON object with:\n- `video_link` (String)\n- `description` (String)\n- `transcript` (String: contains timestamps and text)\n- `target_language` (String: e.g., \"Spanish\", \"French\")\n\n### INSTRUCTIONS:\n\n#### 1. Generate Telegram Post (`telegram_post`)\nCreate an engaging, ready-to-send Telegram post in the **`target_language`**.\n- **Format:** Use valid Telegram HTML tags only: `<b>` for bolding headlines, `<i>` for emphasis, and `<a href=\"URL\">text</a>` for links.\n- **Content:**\n  - **Headline:** A catchy, translated title based on the description.\n  - **Body:** A concise summary of the video's value.\n  - **Link:** Embed the `video_link` cleanly using an HTML anchor tag.\n- **Constraint:** Keep total length under 1000 characters.\n\n#### 2. Generate Dubbing Scripts (`dubbing_parts`)\nTranslate the `transcript` into the **`target_language`**.\n- **Clean Up:** **REMOVE all timestamps** (e.g., \"0:00\") and speaker labels. Keep only the spoken text.\n- **Splitting:** If the text is long (over 2500 characters), split it into multiple logical parts (e.g., Intro, Main Body).\n- **Structure:** For each split part, generate an object with:\n  - `text`: The translated text to be sent to ElevenLabs.\n  - `file_name`: A clean filename without spaces (e.g., `audio_part_1.mp3`).\n  - `caption`: A short, descriptive user-facing label (e.g., \"Part 1: Introduction\" or \"Part 2: The Tutorial\").\n\n### OUTPUT FORMAT:\nOutput **strictly valid JSON** only. Do not use Markdown formatting (no ```json blocks).\n\n{\n  \"telegram_post\": \"HTML string here...\",\n  \"dubbing_parts\": [\n    {\n      \"text\": \"Translated text for the first section...\",\n      \"file_name\": \"dub_part_1.mp3\",\n      \"caption\": \"Part 1: Introduction\"\n    },\n    {\n      \"text\": \"Translated text for the second section...\",\n      \"file_name\": \"dub_part_2.mp3\",\n      \"caption\": \"Part 2: Advanced Techniques\"\n    }\n  ]\n}"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3
    },
    {
      "id": "051a4cb9-1f5d-446e-9a51-86305cdfc35d",
      "name": "Check Output",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1968,
        1072
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "df31ed0c-f266-4d26-93af-cfdec0b0ea79",
      "name": "Send Summary Back to Bot",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2816,
        736
      ],
      "parameters": {
        "text": "={{ $json.output.telegram_post }}",
        "chatId": "={{ $('User Sends Message to Bot').first().json.message.chat.id }}",
        "additionalFields": {
          "parse_mode": "HTML",
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "4922285b-51fd-46b2-a53e-49d443678e32",
      "name": "Split Generated Dubbed Content",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        2576,
        896
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "output.dubbing_parts"
      },
      "typeVersion": 1
    },
    {
      "id": "2a6218e0-c70f-4629-8a79-910c1a44565b",
      "name": "Send Dubbed Audio File",
      "type": "n8n-nodes-base.telegram",
      "position": [
        3248,
        912
      ],
      "parameters": {
        "chatId": "={{ $('User Sends Message to Bot').first().json.message.chat.id }}",
        "operation": "sendAudio",
        "binaryData": true,
        "additionalFields": {
          "caption": "={{ $('Loop Over Generated Items').first().json.caption }}",
          "fileName": "={{ $('Loop Over Generated Items').first().json.file_name }}",
          "parse_mode": "HTML"
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "d124c11a-6baa-4742-af24-f0b14edae011",
      "name": "Process Initialization Alert",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1264,
        592
      ],
      "parameters": {
        "text": "=I've got you; give me a minute.",
        "chatId": "={{ $('User Sends Message to Bot').first().json.message.chat.id }}",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "9a349b82-c0a1-4071-a6f3-7daf4fea4348",
      "name": "User Sends Message to Bot",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        720,
        640
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "7d85a88e-8c3e-4928-9fde-fb24a593ea88",
      "name": "Documentation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        48
      ],
      "parameters": {
        "width": 380,
        "height": 520,
        "content": "## \u26a1 Workflow Overview & Setup\n\n**Summary:** This automation takes a YouTube URL from Telegram, scrapes the transcript using BrowserAct, translates it into a target language, generates a dubbed audio version via ElevenLabs, and sends both a summary and the audio back to the user.\n\n### Requirements\n* **Credentials:** Telegram, BrowserAct, OpenRouter (GPT-4), Google Gemini (PaLM), ElevenLabs.\n* **Mandatory:** BrowserAct API (Template: **YouTube Translator & Auto Dubber**)\n\n### How to Use\n1.  **Credentials:** Set up your Telegram, BrowserAct, AI, and ElevenLabs API keys in n8n.\n2.  **BrowserAct Template:** Ensure you have the **YouTube Translator & Auto Dubber** template saved in your BrowserAct account.\n3.  **Interaction:** Send a YouTube link to your Telegram bot (e.g., \"Translate this video: https://youtu.be/...\").\n\n### Need Help?\n[How to Find Your BrowserAct API Key & Workflow ID](https://docs.browseract.com)\n[How to Connect n8n to BrowserAct](https://docs.browseract.com)\n[How to Use & Customize BrowserAct Templates](https://docs.browseract.com)"
      },
      "typeVersion": 1
    },
    {
      "id": "7966e009-2d27-4ea1-a5fb-cbb065d2b2b5",
      "name": "Step 1 Explanation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        688,
        432
      ],
      "parameters": {
        "color": 7,
        "width": 876,
        "height": 140,
        "content": "### \ud83d\udd0d Step 1: Input Analysis & Extraction\n\nThe workflow intercepts Telegram messages to identify YouTube links. An AI agent extracts the clean URL from natural language requests. If a valid link is found, the system sets the target language (default: Spanish) and initiates the scraping process."
      },
      "typeVersion": 1
    },
    {
      "id": "fe1ae87f-a709-4e39-839a-9fbe0b4e63c6",
      "name": "Step 2 Explanation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1648,
        576
      ],
      "parameters": {
        "color": 7,
        "width": 764,
        "height": 124,
        "content": "### \ud83d\udcdc Step 2: Transcript Scrape & Translation\n\nBrowserAct automates a browser to extract the full transcript from the YouTube video page. The raw text is then processed by an AI agent that translates the content into the target language, removing timestamps and speaker labels for clean dubbing."
      },
      "typeVersion": 1
    },
    {
      "id": "46429964-4518-48c9-bec3-e4795e45b867",
      "name": "Step 3 Explanation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2576,
        576
      ],
      "parameters": {
        "color": 7,
        "width": 844,
        "height": 124,
        "content": "### \ud83c\udf99\ufe0f Step 3: Dubbing Generation & Asset Delivery\n\nThe translated text is split into manageable segments and sent to ElevenLabs to generate high-quality speech audio in the target language. Simultaneously, a localized summary of the video is posted to Telegram.The generated audio files are sent sequentially to the user via Telegram, complete with captions."
      },
      "typeVersion": 1
    },
    {
      "id": "872560b8-2682-410d-a5b7-a133c76134bf",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        704,
        48
      ],
      "parameters": {
        "color": 6,
        "width": 576,
        "height": 352,
        "content": "@[youtube](vGJ2TdfGMpk)"
      },
      "typeVersion": 1
    },
    {
      "id": "71c512bd-d92e-4b34-885c-c2afaa2489c0",
      "name": "Loop Over Generated Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        2800,
        896
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "7c11d2ed-a99b-43eb-8dfe-dae765d3bc68",
  "connections": {
    "Check Output": {
      "ai_languageModel": [
        [
          {
            "node": "Structured Output",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Define Language": {
      "main": [
        [
          {
            "node": "Analyze Transcript and Generate Dub",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Validate inputs": {
      "ai_languageModel": [
        [
          {
            "node": "Analyze user Input",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output": {
      "ai_outputParser": [
        [
          {
            "node": "Analyze Transcript and Generate Dub",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Analyze user Input": {
      "main": [
        [
          {
            "node": "Process Initialization Alert",
            "type": "main",
            "index": 0
          },
          {
            "node": "Extract Youtube Transcript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Analyze Transcript and Generate Dub",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Convert text to speech": {
      "main": [
        [
          {
            "node": "Send Dubbed Audio File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Dubbed Audio File": {
      "main": [
        [
          {
            "node": "Loop Over Generated Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Generated Items": {
      "main": [
        [],
        [
          {
            "node": "Convert text to speech",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "User Sends Message to Bot": {
      "main": [
        [
          {
            "node": "Analyze user Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Youtube Transcript": {
      "main": [
        [
          {
            "node": "Define Language",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Generated Dubbed Content": {
      "main": [
        [
          {
            "node": "Loop Over Generated Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Transcript and Generate Dub": {
      "main": [
        [
          {
            "node": "Send Summary Back to Bot",
            "type": "main",
            "index": 0
          },
          {
            "node": "Split Generated Dubbed Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow transforms any YouTube video into a localized audio experience. It scrapes the video content, translates the transcript into your target language using AI, generates high-quality dubbed audio using ElevenLabs, and delivers the audio files and a summary directly to…

Source: https://n8n.io/workflows/12361/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

This workflow transforms your Telegram bot into an intelligent creative assistant. It can chat conversationally, fetch trending image prompts from PromptHero for inspiration, or perform a deep "remix"

Telegram Trigger, Output Parser Structured, Telegram +6
AI & RAG

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

Output Parser Structured, Telegram, N8N Nodes Tesseractjs +14
AI & RAG

This workflow acts as an AI-powered "Viral Architect" for YouTube creators. Simply send a video topic (e.g., "Kling 2.6") to your Telegram bot, and it will scrape top-performing competitor thumbnails,

Output Parser Structured, N8N Nodes Browseract, OpenRouter Chat +6
AI & RAG

This workflow acts as an intelligent content engine. Simply send a link to your Telegram bot (e.g., a product page or news article), and it will automatically scrape the content, rewrite it into a hig

Google Gemini, Agent, OpenRouter Chat +7
AI & RAG

This workflow transforms text-based resume data into visually stunning images by leveraging Google Gemini's reasoning and vision capabilities. It autonomously analyzes the candidate's profile, selects

HTTP Request, Telegram, Output Parser Structured +7