Every 15 minutes
Publish videos dropped into a Drive folder and get the links on Telegram
Drop a video into your Drive To post folder and it is captioned, published through your posting service, and the links arrive on Telegram.
- Runs
- Every 15 minutes
- Apps
- Google Drive, Telegram
- AI
- Yes, uses the built-in AI allowance
- Access
- Drive read+write; Telegram bot token
Send this to your assistant
Create a ClickRuntime automation: when a new video lands in my Drive To post folder, write a caption, publish it through my posting API and message me on Telegram with the links.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A creator edits short videos on her laptop and saves them to Drive. Posting each one means downloading it to her phone, writing a caption, uploading it to each platform and checking it went live. The posting takes longer than she would like, so finished videos sit in the folder for days.
Dropping the file into one folder and getting a Telegram message with the live links once it is out turns posting into a single step. Finished work goes out the same day it is ready.
What you get out of it
Finished means published
Saving a video to the folder is the last thing you do. Posting follows without another session at your phone.
Captions written for you
Each video gets a caption based on its file name and any notes you add, ready to edit later if needed.
Confirmation you can trust
The Telegram message with live links tells you the post worked, without checking each platform.
A tidy folder
Posted videos are moved out of To post, so the folder only ever shows what is still waiting.
How it works
What happens, step by step
Every few minutes, ClickRuntime checks your Google Drive To post folder for new videos.
AI writes a caption for each video from its name and notes.
The video is published through your posting service and moved to a Posted folder, so it is not posted again.
You get a Telegram message with the caption and the live links.
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
- 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 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, ai, report_fetched
TO_POST, POSTED, CHAT_ID = "to-post-folder-id", "posted-folder-id", "your-telegram-chat-id"
POST_API = "https://api.your-posting-service.com/v1/posts"
@on_trigger
def run(event):
token = credentials.connection("google", "work")
drive = build("drive", "v3", credentials=Credentials(token), cache_discovery=False)
files = drive.files().list(q=f"'{TO_POST}' in parents and mimeType contains 'video/' and trashed=false",
fields="files(id,name,description)").execute()["files"]
report_fetched(len(files))
if not files:
return {"posted": 0}
bot = f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}/sendMessage"
for f in files:
caption = ai.generate(f"Write a short social caption with 3 hashtags for a video called '{f['name']}'. Notes: {f.get('description', '')}",
max_output_tokens=120).text
video = http.get(f"https://www.googleapis.com/drive/v3/files/{f['id']}?alt=media", headers={"Authorization": f"Bearer {token}"}, timeout=120)
res = http.post(POST_API, headers={"Authorization": f"Bearer {credentials.secret('POSTING_API_KEY')}"},
files={"video": (f["name"], video.content)}, data={"caption": caption}, timeout=300).json()
drive.files().update(fileId=f["id"], addParents=POSTED, removeParents=TO_POST).execute()
http.post(bot, json={"chat_id": CHAT_ID, "text": f"Posted {f['name']}\n{caption}\n" + "\n".join(res.get("links", []))})
return {"posted": len(files)}FAQ
Common questions
Which platforms can it post to?
Can I write my own caption?
What if posting fails?
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
File email attachments in Drive and get a summary on Telegram
PDFs and images you receive by email are saved in Drive, and you get a short summary with the link on Telegram.
See how it worksTranscribe voice notes sent to Telegram and save them to Drive
Send a voice note or audio file to your Telegram bot and get the text and a summary back, with both saved to your Transcripts folder.
See how it worksGenerate images from Telegram messages and keep them in Drive
Describe an image to your Telegram bot and it sends back the picture and saves a copy in your Drive AI images folder.
See how it worksKeep exploring
Set up “Publish videos dropped into a Drive folder and get the links on Telegram” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.