Multi-Language Document Translation from Google Drive using DeepL - n8n Workflow

Use this robust n8n workflow to automatically monitor Google Drive, extract text from PDF, DOCX, and TXT files, translate documents using the DeepL API, and save the localized results back to cloud storage. Optimize your translation pipeline with this pre-built n8n templates solution.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Global Content Teams: Organizations needing to localize official documents quickly.

  • Automation Specialists: Users looking for advanced examples of conditional logic (Switch node) and binary data handling within an n8n workflow.

  • DeepL Users: Businesses aiming to leverage the DeepL API for high-volume, automated translation tasks.

  • n8n Users: Individuals seeking practical n8n templates for cloud storage file operations and AI services.

Overview

Managing documentation across multiple language markets is a complex, time-consuming process. This n8n workflow solves this problem by creating a fully automated localization pipeline.

When a new file (PDF, DOCX, TXT, or Markdown) is uploaded to a designated Google Drive folder, the workflow springs into action. It automatically identifies the file type and uses the appropriate method to extract the text. The core of this robust n8n solution then iterates through a customizable list of target languages, performing a translation for each using the DeepL n8n node.

Finally, the translated binary files are saved back to a specified destination folder in Google Drive, complete with language codes appended to the filename (e.g., document_EN.pdf). A final Gmail notification provides a summary of the completed job. This entire process is driven by a powerful n8n trigger watching your Google Drive folder, ensuring efficiency and accuracy.

How it Works

This comprehensive n8n workflow executes the following steps:


  1. Trigger and Configuration: The process starts with the Google Drive n8n trigger, which activates upon detecting a new file creation in a designated source folder. It immediately merges this event data with the static settings defined in the Configuration (Edit Here) n8n node (folder IDs, target languages, notification email).

  2. File Type Detection: A Switch n8n node (Detect File Format) inspects the file's mimeType to determine if it is a PDF, DOCX, TXT, or Markdown file. The flow is routed to the specific download and extraction path required for that format.

  3. Content Extraction: The file is downloaded via Google Drive, and dedicated nodes (Extract Text from PDF, Extract Text from DOCX, etc.) pull the raw textual content.

  4. Language Splitting: The extracted text and configuration parameters are packaged. The Split by Language n8n node then breaks the single item into multiple items—one for every target language specified in the configuration array.

  5. DeepL Translation Loop: For each item (language), the Translate a language DeepL n8n node performs the translation.

  6. File Generation and Upload: The translated text is converted back into a binary file format using a JavaScript Code n8n node, ensuring the correct data structure for file creation. The Save to Google Drive n8n node then uploads the localized document to the destination folder.

  7. Optional Notion Logging: An If n8n node checks if Notion tracking is enabled. If true, the file details and translation status are logged via the Record in Notion n8n node.

  8. Completion Notification: All translated items are merged and aggregated. The workflow prepares a summary and uses the Gmail n8n node to send a completion email to the designated address, providing full visibility into the successful execution of the n8n workflow.

Installation Guide

To deploy this powerful n8n workflow, follow these setup instructions:


  1. Import: Copy the provided JSON data and paste it into your n8n instance using the 'New' -> 'Import from JSON' option.

  2. Credentials Setup: You must configure credentials for the following services:

Google Drive: OAuth2 credentials for file monitoring and saving.
DeepL: API key for translation services.
Gmail: OAuth2 credentials for sending notifications.
Notion (Optional): API key if you enable logging.

  1. Customize Configuration Node: Open the Configuration (Edit Here) n8n node (marked in yellow):

Update sourceFolderId and destinationFolderId with your Google Drive folder IDs.
Customize the targetLanguages array (e.g., ["JA", "EN", "DE"]).
Set your notificationEmail.
Adjust enableNotion and notionDatabaseId as required.

  1. Activate: Save the n8n workflow and toggle the status to 'Active'. The Google Drive n8n trigger will now monitor the designated folder.

Node Details

This n8n workflow relies on several specialized n8n node types to achieve complex file manipulation and external service integration:

Google Drive Trigger (n8n trigger):
Function: Starts the n8n workflow when a new file is uploaded to the specified Google Drive folder.
Key Configuration: Configured to trigger on the fileCreated event within a specific folder ID.

Configuration (Edit Here) (Set n8n node):
Function: Stores all user-configurable parameters like folder IDs, translation language codes (defaulting to EN, ZH, KO, ES, FR, DE), and notification settings, centralizing setup for this n8n templates solution.
Key Configuration: Defines assignments for sourceFolderId, destinationFolderId, and targetLanguages array.

Detect File Format (Switch n8n node):
Function: Directs the execution flow based on the incoming file's mimeType (PDF, DOCX, TXT, Markdown) to ensure the correct download and extraction method is used.
Key Configuration: Multiple conditional paths checking for specific application/pdf, application/vnd.openxmlformats-officedocument.wordprocessingml.document, etc.

Download [Type] (Google Drive n8n node):
Function: Downloads the content of the file from Google Drive into the n8n execution context.
Key Configuration: Uses the file ID dynamically retrieved from the Google Drive n8n trigger data.

Translate a language (DeepL n8n node):
Function: Performs the core translation logic, translating the extracted text to the target language of the current item.
Key Configuration: Text input is dynamically mapped from extractedText; Translate To is mapped from the current item's language code ($json.targetLanguages).

Code in JavaScript (Code n8n node):
Function: Converts the translated text string back into a binary buffer object, which is necessary for the subsequent Google Drive upload to recognize it as a file.
Key Configuration: Contains custom JavaScript logic to create a UTF-8 Buffer from the translatedText and return both JSON and binary data.

Save to Google Drive (Google Drive n8n node):
Function: Uploads the newly created translated binary file to the specified destination folder in Google Drive.
Key Configuration: Uses dynamic expressions for name (the new filename with language code) and folderId.

Send Gmail Notification (Gmail n8n node):
Function: Sends a confirmation email summary upon completion of all translations, using data aggregated from the entire n8n workflow run.
Key Configuration: Uses dynamic expressions to populate the email subject and body with details like original filename and translated languages.

Related n8n Workflows

Free

Nodes: 15 Nodes
Updated: December 26 2025
View all
Created by
Daiki Takayama
Daiki Takayama

Featured*