See llms.txt for all machine-readable content.

Back to Templates

Dub YouTube videos and translate subtitles with ElevenLabs, Claude, and Google Drive

Quick overview

This workflow localizes YouTube (or direct media) videos by creating dubbed MP3 audio tracks with ElevenLabs dubbing and translating SRT subtitles with Claude via an OpenAI-compatible API, then saving outputs to Google Drive and logging results to Google Sheets.

How it works

  1. Triggers on a new YouTube channel upload via RSS or when a user submits the n8n form with a video URL, target languages, and background-audio preference.
  2. Validates the input, expands the language list (defaults from settings for RSS runs), and detects whether the source is YouTube or a direct MP4/MP3 link.
  3. If the source is YouTube, downloads an audio track and selects an SRT caption track via the apimodels.app media endpoint; otherwise it uses the provided direct file URL and skips captions.
  4. Creates one job per target language, starts an ElevenLabs dubbing task via the apimodels.app audio endpoint, and translates the SRT cue-by-cue with Claude while preserving timestamps when captions exist.
  5. Polls each dubbing task until it completes, fails, or times out based on the configured maximum wait.
  6. For completed tasks, downloads the dubbed audio, saves the MP3 (and translated SRT when available) to Google Drive, and appends a “Done” row with Drive links to Google Sheets.
  7. For failures or timeouts, logs a “Failed” row with the error details to Google Sheets and, for form runs, returns an HTML summary page of all languages and links.

Setup

  1. Create an API key on apimodels.app and add it as an OpenAI credential in n8n with base URL https://api.apimodels.app/v1.
  2. Connect Google Drive OAuth2 credentials and set a target Drive folder ID where MP3 and SRT files are saved.
  3. Connect Google Sheets OAuth2 credentials, create a spreadsheet tab named Localization log with the required headers, and paste the Sheet ID into the workflow settings.
  4. Replace YOUR_CHANNEL_ID in the YouTube RSS feed URL to monitor the correct channel, or use the provided n8n form endpoint to submit videos manually.
  5. Review and adjust defaults in the Settings (languages, polling interval, max wait time, and translator model) to match your localization needs.

Requirements

  • An apimodels.app account and API key. New accounts get $0.1 of free credit.
  • Google Drive and Google Sheets accounts.
  • Dubbing is billed at $0.55 per minute per language. In our test, a 19-second video in Spanish and Japanese took 84 seconds and cost $0.367 in total.
  • Subtitles need captions on the original YouTube video. Direct MP4 or MP3 links are dubbed without subtitles.

Customization

  • Change the default languages, background audio, translation model or maximum wait in the Settings node.
  • Add more languages to the form's checkbox list and to the language map in the Plan the job node.
  • Swap Google Drive for Dropbox or S3, or add a Slack message after Log the language to tell your team a video is ready.

Additional info

Step-by-step setup guide with screenshots: https://apimodels.app/docs/n8n