Skip to content

Every 5 minutes

Get a Telegram alert for new files in a Google Drive folder

Every 5 minutes ClickRuntime checks a Google Drive folder and sends a Telegram message for each new file, with who added it and a link.

Runs
Every 5 minutes
Apps
Google Drive, Telegram
AI
Not needed
Access
Drive read-only (drive.readonly); bot token

Send this to your assistant

Create a ClickRuntime automation: every 5 minutes, check my "Client uploads" folder in Google Drive and send me a Telegram message for each new file with its name, who added it and a link.

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

Clients, contractors and teammates drop files into shared Drive folders and then forget to say so. Google's own notifications for shared folders are patchy, and an email about it ends up next to fifty others.

This automation checks the folder every 5 minutes and sends a short Telegram message for each new file: what it is, who added it and a link. You see it on your phone right away and can open the file in one tap.

It works well for agencies collecting client assets, accountants waiting on receipts, and anyone who shares an upload folder with people outside their team.

What you get out of it

  • Know when the file you were waiting for lands

    No more refreshing the folder or asking "did you upload it yet?". The message tells you as soon as the check sees it.

  • See who added what

    Each alert names the uploader, which matters when several clients share one folder.

  • One message per file

    Files already reported are remembered, so you never get the same alert twice.

  • Quiet when nothing happens

    If no file is added, nothing is sent. Telegram stays for things that need you.

  • Simple to adjust

    Change the folder, add more folders or skip certain file types by asking your assistant.

How it works

What happens, step by step

  1. Every 5 minutes, ClickRuntime looks at the Google Drive folder you chose.

  2. It picks out files added since the last check and skips any it has already reported.

  3. For each new file it sends a Telegram message with the file name, the person who added it, the size and a link.

Before it runs live

  • Connect Google Drive
  • Connect Telegram

What you get

RunsEvery 5 minutes
Get a Telegram alert for new files in a Google Drive foldertoday, 9:00Succeeded
Telegram · your bot📁 New in Client uploads Q3 receipts.zip (14.2 MB) Added by maria@harbourdesign.co https://drive.google.com/file/d/1Lm.../view

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

  • Run it at a different time, more or less often, or only on weekdays
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Google Drive and Telegram 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.
get_a_telegram_alert_for_new_files_in_a_google_drive_folder.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, state

FOLDER_ID, CHAT_ID = "your-folder-id", "123456789"

def tg(method, **params):
    r = http.post(f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}/{method}", json=params)
    r.raise_for_status()
    return r.json()["result"]

@on_trigger
def run(event):
    drive = build("drive", "v3", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    since = state.get("since") or event.get("scheduled_time")
    seen = set(state.get("seen") or [])
    files = drive.files().list(q=f"'{FOLDER_ID}' in parents and trashed = false and createdTime > '{since}'",
                               orderBy="createdTime", fields="files(id,name,size,createdTime,webViewLink,lastModifyingUser(emailAddress))").execute().get("files", [])
    new = [f for f in files if f["id"] not in seen]
    for f in new:
        who = (f.get("lastModifyingUser") or {}).get("emailAddress", "unknown")
        size = f" ({int(f['size']) / 1e6:.1f} MB)" if f.get("size") else ""
        tg("sendMessage", chat_id=CHAT_ID, text=f"📁 New in your folder\n{f['name']}{size}\nAdded by {who}\n{f['webViewLink']}")
        seen.add(f["id"])
    if files:
        since = files[-1]["createdTime"]
    state.set("since", since)
    state.set("seen", list(seen)[-500:])
    return {"new": len(new)}

FAQ

Common questions

Will I get alerts for files that were already in the folder?
No. The first run starts from that moment, and later runs report only files created after the previous check.
Can it watch several folders?
Yes. Give your assistant the list of folders and it will check each one in the same run and put the folder name in every message.
Does it alert me when a file is edited?
Not in this version, which reports new files only. Ask your assistant to also check modified time if you want edits reported, with a note of who changed the file.
What permissions does it need?
Drive read-only (drive.readonly); bot token. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it runs (every 5 minutes). Checks that find nothing to do 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 “Get a Telegram alert for new files in a Google Drive folder” from your assistant

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