Auto-translate new Google Drive files with formatting intact

Drop a document in one folder and get German, French, and Spanish copies back, with the original layout, tables, and styling untouched.

Agentic Task
DeepLGoogle DriveSlack BotOperationsMarketingDocument ProcessingContent GenerationData Sync
PromptCreate

Every 30 minutes, watch a Google Drive folder for newly added documents and translate each one into our target languages using DeepL's document translation, which preserves the original layout, tables, and styling instead of handing back bare text. I will supply the source folder, the target languages, and the Slack channel. Default the languages to German (DE), French (FR), and Spanish (ES).

Start with Google Drive List Files, scoped to the source folder using Drive query syntax such as '<SOURCE_FOLDER_ID>' in parents and trashed = false, narrowed to files added or changed since the last run with a createdTime or modifiedTime filter. Never descend into the Translated subfolders, and never treat a file that already lives in one of them as a source document.

Before translating anything, list what is already in each Translated language subfolder and skip any source file that already has a counterpart there. Reruns must never duplicate work or burn DeepL quota on a document that was already translated.

Fetch the file bytes with Google Drive Download File Content. If the source is a native Google Doc, Sheet, or Slide, that call will not work, so use Export Google Workspace File first: export Docs to .docx, Sheets to .xlsx, and Slides to .pptx. DeepL document translation accepts .docx, .pptx, .xlsx, .pdf, .txt, and .html, so skip anything outside that set and mention the skip in the recap.

For each target language, send the file to DeepL Upload and Translate Document. The response returns a document_id and a document_key. The key is returned only once, at upload, and cannot be retrieved later, so hold on to both values because the key is required for the status check and for the download.

Poll DeepL Check Document Status with that id and key until the status reports done, waiting a few seconds between checks rather than hammering it. Do not call the download before the status is done, because DeepL rejects an early request for the result.

Then call DeepL Download Translated Document. Downloading a translated document deletes it server side and invalidates the document id, so there is exactly one chance to save each file. Write it to Drive before moving on to the next language or the next document.

Save each translation with Google Drive Upload File (Multipart) into a Translated subfolder per language, creating that folder with Create Folder when it does not exist yet. Name the output after the source file with a language suffix, like contract_DE.docx. Multipart upload covers files up to 5MB; for a larger deck use the resumable upload path instead.

If DeepL reports that the character quota for the current billing period is exhausted, stop translating and say so plainly in the recap rather than failing silently. Calling DeepL Check Usage and Limits at the start of a run is a reasonable way to catch this before uploading anything.

Finish by posting a recap to Slack with Send a Message, listing each file translated, the languages produced for it, links to the new Drive files, and anything that failed with a short reason, including files skipped as already translated or as an unsupported type. If nothing new was found, stay quiet rather than posting an empty recap.

What does this prompt do?

  • Checks your chosen Google Drive folder every 30 minutes for newly added documents.
  • Translates each one into German, French, and Spanish, or whichever languages you pick, while keeping the original layout, tables, images, and styling in place.
  • Files every translation back into Drive in a Translated folder per language, named like contract_DE.docx so you can find it instantly.
  • Posts a Slack recap of what was translated, into which languages, and anything that needs a second look.

What do I need to use this?

  • A Google Drive account and a folder where new documents land.
  • A DeepL account on a plan that includes document translation.
  • A Slack workspace and a channel for the recap.
  • Source files in Word, PowerPoint, Excel, PDF, text, or HTML format. Native Google Docs, Sheets, and Slides are converted for you automatically.

How can I customize it?

  • Change which folder gets watched and how often it runs, from every few minutes to once a day.
  • Pick your target languages. German, French, and Spanish are the defaults, and DeepL supports many more.
  • Choose which Slack channel gets the recap, or send it to one person as a direct message.

FAQs

Will the translated file keep its original formatting?
Yes, and that is the whole point of this one. The document itself is translated rather than the text being pulled out and pasted into a fresh file, so tables, headers, fonts, images, and page layout all survive the trip. A translated contract still looks like your contract, and a translated deck is still on brand.
What kinds of files can it translate?
Word documents, PowerPoint decks, Excel spreadsheets, PDFs, plain text, and HTML. If your team works in native Google Docs, Sheets, or Slides, those are converted to the matching Office format first, so they work too. Anything outside that list is skipped and called out in the recap.
Will it translate the same file twice and waste my quota?
No. Before it starts, it checks whether a translated copy already exists for that language and skips anything already done. Files sitting in the Translated folders are never treated as new sources, so running it again never duplicates work or burns quota twice.
What happens if I run out of translation credit?
The Slack recap says plainly that your character quota for the billing period is used up, and lists the files still waiting. It will not fail quietly or leave you wondering why translations stopped appearing.
Can I use languages other than German, French, and Spanish?
Yes. Those three are just the defaults because they are the most common first step for European teams. You can set any languages DeepL supports, and add or remove them later without rebuilding anything.

Related templates

Share of voice dashboard for your brand and competitors

See how your brand's news coverage and sentiment stack up against four competitors, then let an assistant write the weekly report for you.

GDELT
Notion
Slack Bot
App
Approval war room for every social post awaiting sign-off

One screen showing every social post waiting on approval, sorted by deadline, so reviewers can approve or reject without leaving the page.

Hootsuite
Slack Bot
App
Turn champion job changes into new pipeline in Attio

Every Monday, find the past champions and closed-won contacts who changed jobs, update Attio, and get the moves worth chasing in Slack.

Boomerang
Attio
Slack Bot
Agentic Task
Collect social post requests and schedule them in Hootsuite

Staff submit what happened, your social manager edits the copy, picks the accounts and puts it on the calendar without a single spreadsheet.

Hootsuite
Slack Bot
General Input Database
App
Voice agent QA review board for your Hume EVI calls

Open one board each morning, see which voice calls went badly, replay the exact moment the caller got frustrated, and file the fix.

Hume
Linear
Slack Bot
App
Clear your Guru verification backlog in one weekly app

A personal queue of every overdue Guru card, sorted by how late it is, with one-click verify, reassign, comment, and an agent that drafts the refresh for you.

Guru
Slack Bot
App

Stop rebuilding translated documents by hand.

Drop files in a folder and get properly formatted translations filed back into Drive, with a Slack recap when they land.