The moment it happens
Message a video idea to Telegram and get the finished video back
Send your Telegram bot a video idea and get a short generated video back in the chat, with a copy saved in your Drive Shorts folder.
- Runs
- The moment it happens
- Apps
- Google Drive, Telegram
- AI
- Yes, uses the built-in AI allowance
- Access
- Telegram bot token; Drive write
Send this to your assistant
Create a ClickRuntime automation: when I message my bot a video idea, write the prompt, generate a short video with my video API, save it to my Drive Shorts folder and send me the file.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A small business owner gets ideas for short videos at odd moments: on a delivery run, in a queue, late at night. By the time she is back at her desk to open a video tool, the idea is gone or feels like too much work.
Sending the idea to a Telegram bot in a sentence and getting a finished short back turns those moments into content. Every video is also kept in Drive, so the team can find and post it later.
What you get out of it
Ideas become videos on the spot
A one-line message is enough. You do not need to be at a desk or know how to write a detailed video prompt.
Everything is saved
Each video lands in your Drive Shorts folder, so nothing lives only in a chat history.
Review on your phone
The video comes back in Telegram, where you can watch it and decide whether to post it.
Only you can use it
The bot answers your chat only, so your video credits are not spent by strangers.
How it works
What happens, step by step
It starts when you send a video idea to your Telegram bot.
It checks the message came from you, then AI turns your idea into a detailed video prompt.
Your video service generates the clip, and ClickRuntime saves it to your Google Drive Shorts folder.
The finished video is sent back to you in Telegram.
Before it runs live
- Connect Google Drive
- Connect Telegram
- Paste your automation's link into the other app's webhook settings
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 googleapiclient.http import MediaInMemoryUpload
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_event, credentials, http, ai
MY_CHAT_ID, SHORTS_ID = 123456789, "your-shorts-folder-id"
VIDEO_API = "https://api.your-video-service.com/v1/videos"
@on_event
def handle(event):
msg = event.event.get("message", {})
if msg.get("chat", {}).get("id") != MY_CHAT_ID or not msg.get("text"):
return {"ignored": True}
bot = f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}"
http.post(f"{bot}/sendMessage", json={"chat_id": MY_CHAT_ID, "text": "Making your video..."})
prompt = ai.generate(f"Write a detailed prompt for a 15-second vertical video. Idea: {msg['text']}", max_output_tokens=300).text
job = http.post(VIDEO_API, json={"prompt": prompt}, headers={"Authorization": f"Bearer {credentials.secret('VIDEO_API_KEY')}"},
timeout=300).json()
video = http.get(job["video_url"], timeout=120).content
drive = build("drive", "v3", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
drive.files().create(body={"name": f"{msg['text'][:50]}.mp4", "parents": [SHORTS_ID]},
media_body=MediaInMemoryUpload(video, mimetype="video/mp4")).execute()
http.post(f"{bot}/sendVideo", data={"chat_id": MY_CHAT_ID, "caption": msg["text"][:200]},
files={"video": ("short.mp4", video)}, timeout=120)
return {"sent": True}FAQ
Common questions
How long are the videos?
Can I give style instructions?
What if the video service is slow?
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
Transcribe 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 worksSend payment screenshots to a Telegram bot and file them in Drive
Forward a payment screenshot to your Telegram bot and it replies with the amount, date and payer, and files the image in Drive.
See how it worksKeep exploring
Set up “Message a video idea to Telegram and get the finished video back” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.