What this workflow does
This workflow automatically translates PDF documents stored in a Google Drive folder using DeepL’s document translation API. It downloads PDFs, sends them for translation, waits for the translation to finish, then uploads the translated PDFs back with a clear new name. This replaces the slow, manual process of downloading, translating, and re-uploading files.
The main problem solved is saving time and reducing human error when handling many PDF translations weekly. Users get translated files neatly organized and ready without extra work.
Who should use this workflow
This is for users who manage many PDF documents needing translation in Google Drive. It helps project managers, translators, and teams who want to avoid repetitive, error-prone manual translation steps.
It works well when tens of PDFs are involved weekly and translations must be accurate and well organized.
Tools and services used
- n8n: Automation platform where the workflow runs.
- Google Drive API: Lists, downloads, and uploads PDF files from/to a specified Drive folder.
- DeepL Document Translation API: Translates PDF files asynchronously, checks status, and provides translated files.
- Google Drive OAuth2 Credentials: For secure access to Google Drive files.
- HTTP Request Node: To communicate with DeepL API using API key authentication.
Inputs, processing steps, and outputs
Inputs
- Google Drive folder URL containing the PDFs to translate.
- Target language code, like “DE” or “EN-US”.
- Optional source language code to specify original language, or leave empty for auto-detect.
Processing Steps
- Fetch all files from the specified Google Drive folder.
- Filter files to keep only PDFs not already translated (checks for target language suffix).
- Download each eligible PDF file as binary data.
- Send each file to DeepL Document Translation API via HTTP Request node with language parameters.
- Poll DeepL at intervals to check if the translation job is complete.
- After translation, download the translated PDF from DeepL.
- Upload the translated PDF back to the original Google Drive folder with a new filename appending the target language code.
- Introduce small waits between polling and between document processing to avoid API rate limits.
Outputs
- Translated PDF files in the original Google Drive folder.
- File names clearly showing the target language, preventing overwrite.
Beginner step-by-step: How to use this workflow in n8n
Importing the workflow
- Download the workflow JSON file using the Download button on this page.
- Inside the n8n editor, click on the top-right menu and select “Import from File”.
- Select the downloaded workflow file to load it into n8n.
Configuring credentials and parameters
- Add Google Drive OAuth2 credentials if not already set up. These allow the workflow to access Drive files.
- Ensure the HTTP Request node has the DeepL API Key added in HTTP Header Authentication.
- Open the ⚙️ config Set node and update:
– The folder_url with your Google Drive folder link.
– The target_lang with the desired language code.
– Optionally, the source_lang or leave empty.
Testing and activation
- Run the workflow manually using the Run manually node’s execute button to test translation on current files.
- Check the translated PDFs appear in the Google Drive folder with correct names.
- Activate the workflow for production by toggling the active state.
- Optionally, add a schedule trigger in n8n to automate on intervals.
For self hosting n8n, users can refer to self-host n8n resources to run this workflow on own servers.
Edge cases and potential failures
- DeepL API errors: Invalid API keys or limit exceeded will stop translations.
Check API key validity and subscription status. - Google Drive access issues: Wrong folder URLs or missing OAuth2 permissions can cause file listing to fail.
Verify folder link and access rights. - Translation waits getting stuck: Long delays if DeepL delays job completion.
Increasing wait time or setting a timeout to retry or skip can help.
Customization ideas
- Change the target_lang in the config node to translate into other languages.
- Remove source language to let DeepL auto-detect it.
- Allow other file formats like Word documents by changing the Filter node criteria.
- Adjust wait times between polls and documents to fit API limits and load.
- Update upload file name format in the upload node to match your team’s naming rules.
Summary of benefits
✓ Saves 3-5 hours weekly by automating PDF translation.
✓ Reduces errors from manual downloads and uploads.
✓ Keeps translated files organized with clear naming.
→ Translates PDFs stored in Google Drive automatically.
→ Lets users control when to run translations.
