Skip to content

Hourly

Translate new documents in a folder

Each document added to a folder gets a translated copy next to it.

Runs
Hourly
Apps
Google Drive
AI
Yes, uses the built-in AI allowance
Access
read+write

Send this to your assistant

Create a ClickRuntime automation: every hour, translate new documents in my To translate folder into Spanish and save each translation as a new Google Doc in the same folder.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

A small exporter keeps product sheets, terms of sale and onboarding guides in English, but its customers in Germany, Spain and Brazil need them in their own language. Each document goes to a freelancer or through a paste-into-translator routine, with formatting lost and someone left to put the result back in the right folder. Updates to the English version are often never translated, so customers end up reading old terms.

Every hour, ClickRuntime lists the files added to the source folder since its last run, exports each as text and has ClickRuntime's built-in AI translate it into the language you set. The translated copy is uploaded next to the original with the language in its name, so the English and Spanish versions sit side by side.

Teams that serve several markets, schools with multilingual families, and HR departments with international staff use this for first-draft translation.

What you get out of it

  • Documents reach customers in their language

    A buyer who can read the terms and the setup guide without help is more likely to proceed and less likely to raise a support ticket. Translation turns a barrier into a document that is already waiting.

  • Faster than a freelance round trip

    Waiting two days for a translator on a one-page update slows launches. A first draft in minutes lets a reviewer polish only what matters, so the human time goes into quality instead of copying files.

  • Translations stay beside the source

    Putting each copy next to its original, with a clear language suffix in the name, makes it easy to find and to check when the English version changes. No separate folder structure needs to be kept in sync.

  • Lower cost for routine documents

    Internal notes, FAQs and low-risk guides rarely justify professional rates. Automatic drafts cover that bulk cheaply, and paid translators can be reserved for legal text and marketing copy. Money saved there can go to review.

  • New files are handled without a request

    Anything dropped into the folder gets translated on the next run, so staff do not need to file a ticket or remember a process. Coverage grows with the folder instead of depending on someone's diligence.

How it works

What happens, step by step

  1. Every hour ClickRuntime checks your Google Drive folder for newly added Google Docs.

  2. It reads the text of each new document.

  3. AI translates it into your chosen language, such as Spanish.

  4. The translation is saved as a new Google Doc next to the original, with the language in its name.

Before it runs live

  • Connect Google Drive

What you get

RunsHourly
Translate new documents in a foldertoday, 9:00Succeeded
Google Drive · To translateOnboarding guide (ES) created next to Onboarding guide

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Act only on the items that match your own rules, and skip the rest
  • Change what the AI looks for, or how it writes the result
  • Add another app, for example also send it to Slack
  • Combine it with other Google Drive steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
translate_documents_in_a_folder.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, report_fetched, credentials, state, ai

FOLDER = "to-translate-folder-id"
DOC = "application/vnd.google-apps.document"

@on_trigger
def run(event):
    creds = Credentials(credentials.connection("google", "work"))
    drive = build("drive", "v3", credentials=creds, cache_discovery=False)
    docs = build("docs", "v1", credentials=creds, cache_discovery=False)
    since = state.get("since") or "2026-01-01T00:00:00Z"
    files = drive.files().list(q=f"'{FOLDER}' in parents and mimeType = '{DOC}' and createdTime > '{since}' "
                                 "and not name contains '(ES)'",
                               orderBy="createdTime", fields="files(id,name,createdTime)").execute()["files"]
    report_fetched(len(files))
    if not files:
        return {"summary": "Nothing new"}
    for f in files:
        text = drive.files().export(fileId=f["id"], mimeType="text/plain").execute().decode()[:12000]
        spanish = ai.generate("Translate into Spanish, keeping paragraphs:\n" + text, max_output_tokens=2048).text
        new = drive.files().create(body={"name": f"{f['name']} (ES)", "mimeType": DOC, "parents": [FOLDER]}).execute()
        docs.documents().batchUpdate(documentId=new["id"], body={"requests": [
            {"insertText": {"location": {"index": 1}, "text": spanish}}]}).execute()
    state.set("since", files[-1]["createdTime"])
    return {"translated": len(files)}

FAQ

Common questions

Which languages can it translate into?
The built-in AI handles most widely used languages, including Spanish, German, French, Portuguese, Japanese and Arabic. You can choose one target or several, and each language is saved as its own file, so a document can come back in three versions after one upload.
Is the translation good enough to send to customers?
For most business text it is a strong first draft, but legal terms, medical text and brand copy should be checked by a fluent reviewer before they go out. A common pattern is to save drafts in a review folder first.
Does it keep the formatting of the original?
The document is exported as text for translation, so headings and paragraphs carry over but complex layouts, tables and images may be simplified in the translated copy. For documents where layout matters, plan on a quick tidy in Docs after translation.
What permissions does it need?
read+write. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run each time it checks. Checks that find nothing new and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Translate new documents in a folder” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.