n8n

How to Automate Google Translate Subtitle Localization?

Turn subtitle files into ready to publish translations with a simple upload. Teams choose a language in a web form, submit an SRT file, and get a clean translated SRT back with all timecodes untouched. Great for marketing and content teams that ship videos to new markets.

The flow starts with a hosted form that collects the target language and the SRT file. The file is read as text, then custom code splits it into subtitle blocks and separates numbers and timestamps from the spoken lines. Only the spoken lines are sent to Google Translate using the selected language. Another code step cleans the translation, wraps long lines for readability, and rebuilds each block. All blocks are joined with blank lines, the content is converted back into a file, the file name adds the language code, and the form returns a download link.

Setup needs a Google account with access to Google Translate via n8n credentials. You can edit the form to add more language options or set a fixed language in the Translate node. Expect to cut manual work from hours to minutes while keeping timing accurate. Ideal for YouTube channels, webinars, training videos, and social clips that need fast localization.

What are the key features?

  • Hosted upload form collects target language and SRT file
  • Reads the uploaded file and extracts text from binary safely
  • Custom SRT parser groups entries and isolates the spoken text
  • Sends only subtitle text to Google Translate based on the chosen language
  • Cleans quotes and special characters and splits long lines for better viewing
  • Aggregates all entries and rebuilds the SRT structure with correct spacing
  • Creates a new downloadable file and preserves the original mime type
  • Appends the language code to the file name for easy tracking
  • Returns the translated file directly in the browser after completion

What are the benefits?

  • Reduce manual SRT translation from 2 hours to 5 minutes
  • Keep 100 percent of timecodes and numbering intact
  • Improve subtitle readability by auto wrapping long lines
  • Eliminate copy and paste steps between tools
  • Handle dozens of subtitle files per day through a simple form
  • Standardize file names by adding the language code

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Google Translate. See the Tools Required section above for links to create accounts with these services.
  3. Open the workflow and double click the Google Translate node. In the Credential to connect with field, click Create new credential and follow the on screen steps to connect your Google account.
  4. In n8n credentials, name the credential clearly, such as Google Translate Prod, so teammates know which one to use.
  5. Open the form trigger node. Review the dropdown options for Translate to Language and add more language codes if needed.
  6. If you want a fixed target language, open the Google Translate node and set the language option to a fixed value instead of using the form field.
  7. Run a test with a small SRT file. Confirm that numbers and timestamps match the original and only the spoken lines are translated.
  8. Check the returned file name. It should add the selected language code before the .srt extension.
  9. If characters look broken, ensure the SRT is UTF 8 encoded. Adjust the Clean Translations code node if you need different character handling.
  10. If the file does not download, verify the Respond with file node is set to returnBinary and points to the file property.
  11. If Google Translate errors appear, recheck the credential, confirm the Cloud Translation API is enabled, and make sure your quota is available.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Google Translate

Sign up

Free monthly credit: $0 for first 500,000 characters / mo (NMT text); then $20 per million characters

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.