Auto translate new YouTube uploads into 5 languages every Monday

By General Input

Every Monday at 6am, find videos you uploaded last week, generate translated versions in five target languages with HeyGen, and republish them back to your channel.

Integrations

  • HeyGen
  • YouTube

Type

Deterministic Code

Categories

  • Marketing

Build a weekly, fully deterministic code workflow that auto-localizes my YouTube channel into multiple languages using HeyGen. No judgement steps. Every node should be a known operation with structured inputs.

Trigger: a cron that fires every Monday at 6:00am in my local timezone.

Step 1. Call YouTube List Channels with mine=true to resolve my own channel ID. Cache the result for downstream steps.

Step 2. Call YouTube Search Videos filtered to that channelId, order=date, type=video, publishedAfter = now minus 7 days. Page through results until you have every video uploaded in the last week. If there are zero new videos, finish the run cleanly.

Step 3. For each new video, call YouTube Get Video to fetch the full snippet (title, description, tags, categoryId, playlist memberships) and the watchable URL of the form https://www.youtube.com/watch?v={videoId}. This URL is what we hand to HeyGen.

Step 4. For each (source video) x (target language) pair where the target languages are a fixed list of Spanish (es), Portuguese (pt), French (fr), German (de), Japanese (ja), call HeyGen Translate Video with the YouTube video URL as the source and the target language code. Capture the returned video_translate_id.

Step 5. For each translate job, call HeyGen Check Video Translate Status on a polling loop with exponential backoff (start at 30 seconds, cap at 2 minutes, give up after 60 minutes). Treat status 'success' as done; treat 'failed' as terminal and surface the error so the rest of the languages still proceed. Do not block the other jobs while one is polling.

Step 6. When a translate job is done, call HeyGen Retrieve Shareable Video URL (or read the download URL from the status response) and download the translated MP4 to local workflow storage immediately. HeyGen URLs expire after 7 days, and YouTube's resumable upload needs the raw bytes anyway.

Step 7. Call YouTube Upload Video with the downloaded MP4. Build the localized snippet from the original: title = original title + ' [XX]' where XX is the uppercased language code (ES, PT, FR, DE, JA); description = original description prepended with a one-line note like 'Translated with AI from the original at {originalUrl}.'; copy categoryId and tags from the source; set defaultLanguage to the target language. Default the privacyStatus to 'public' but expose it as a config so the user can switch to 'unlisted' or 'private' for review.

Step 8. If the source video belongs to a playlist on my channel, call YouTube Add Playlist Item to add the newly uploaded localized video to the same playlist. If the source video is not in a playlist, skip this step.

Output: one new YouTube upload per (source video, target language) pair, with the localized title suffix and the original playlist routing preserved. The workflow run should report, per source video, which languages succeeded and which failed.

Config surfaces I want exposed at the top of the workflow: the target language list, the title suffix template, the lookback window in days, the upload privacy status, and an optional filter (playlist ID, tag, or title regex) to limit which source videos get translated.

Related prompts

Explore more prompts
Personalized video campaign builder for HeyGen and HubSpotTurn your top support questions into explainer videosVideo request desk for HeyGen, with script review and approvalMonday brief: what competitors are pitching on YouTubeAnnounce new YouTube uploads in DiscordWelcome new BambooHR hires with an AI video in SlackTurn new YouTube uploads into WordPress blog postsPersonalized AI welcome video for every new HubSpot leadPersonalized HeyGen welcome video for every Calendly bookingDaily YouTube channel stats log to Google Sheets