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.
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
Every 5 minutes, ClickRuntime looks at the Google Drive folder you chose.
It picks out files added since the last check and skips any it has already reported.
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
Build your own
Need it to work differently?
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
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?
Can it watch several folders?
Does it alert me when a file is edited?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Get top job matches for your CV on Telegram
Each morning the best new postings for your CV arrive on Telegram, each with a short cover-letter opener.
See how it worksSave files and photos sent to Telegram in Drive
Anything sent to your Telegram bot is filed in Drive in a folder for each sender and date, and the bot replies with the link.
See how it worksSearch Google Drive from a Telegram bot
Send your bot a few words and get back links to the matching files in your Google Drive, newest first.
See how it worksKeep exploring
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.