The moment it happens
Turn Telegram ideas into short videos logged in a sheet
Message your bot an idea and get back a finished short video, with every video tracked in your Google Sheet.
- Runs
- The moment it happens
- Apps
- Google Sheets, Telegram
- AI
- Yes, uses the built-in AI allowance
- Access
- Telegram bot token; Sheets read+write
Send this to your assistant
Create a ClickRuntime automation: when I message my Telegram bot a topic, write a short script, generate a video with my video API, log it in my Videos sheet and send me the link.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A solo creator posts short videos several times a week. Ideas arrive at odd moments, on a walk or in a queue, and most are forgotten before there is time to sit down, write a script and render something. The ones that do get made are scattered across folders with no record of what was published or when.
This automation lets the idea become the video in one message. You type the topic to your Telegram bot, AI writes a short script, your video service renders it, and the link comes back to you while the sheet keeps a running catalogue of every video.
What you get out of it
Ideas are captured the moment you have them
Your phone is already in your hand when the idea arrives. Sending one message is quick enough that nothing gets lost between thinking of it and sitting down to work.
A first draft without a blank page
The script is written for you from a single line, so you start from something to react to. Editing a draft is faster than writing from scratch, especially for short formats.
One catalogue of everything you made
Each video is logged with its topic, script and link. You can see what you covered last month, avoid repeating yourself and find an old video in seconds.
Results come back where you asked
The finished link arrives in the same Telegram chat as the idea. You can review it on your phone and decide whether to post it without opening a laptop.
How it works
What happens, step by step
You send your Telegram bot a short message with a video idea.
AI turns the idea into a short video script.
The script is sent to your video service, and ClickRuntime waits until the video is ready.
A new row with the idea, script and link is added to the Videos tab of your Google Sheet.
The bot replies to you in Telegram with the link to the finished video.
Before it runs live
- Connect your Google Sheets account and pick the spreadsheets it may use
- 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 Sheets and Telegram steps into one automation
Under the hood
The code that runs this automation
import time
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_event, credentials, http, ai, state
SHEET_ID = "your-spreadsheet-id"
VIDEO_API_URL = "https://api.your-video-service.com"
VIDEO_API = f"{VIDEO_API_URL}/v1/videos"
@on_event
def handle(event):
msg = (event.json or {}).get("message") or {}
idea, chat = msg.get("text"), msg.get("chat", {}).get("id")
if not idea or state.get(event.event_id):
return {"skipped": True}
tg = f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}"
script = ai.generate(f"Write a 30-second video script about: {idea}", max_output_tokens=400).text
key = {"Authorization": f"Bearer {credentials.secret('VIDEO_API_KEY')}"}
job = http.post(VIDEO_API, json={"script": script}, headers=key).json()
for _ in range(40):
job = http.get(f"{VIDEO_API}/{job['id']}", headers=key).json()
if job.get("status") == "done":
break
time.sleep(10)
link = job.get("url", "pending")
sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
sheets.spreadsheets().values().append(spreadsheetId=SHEET_ID, range="Videos!A:D", valueInputOption="USER_ENTERED",
body={"values": [[event.received_at, idea, script, link]]}).execute()
http.post(f"{tg}/sendMessage", json={"chat_id": chat, "text": f"Your video is ready: {link}"})
state.set(event.event_id, True)
return {"video": link}FAQ
Common questions
Which video services can it use?
Can I edit the script before the video is made?
What gets recorded in the sheet?
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
Answer Telegram questions from a Google Sheet
People message your Telegram bot and get answers drawn from your sheet, with every question and reply logged.
See how it worksTurn receipt photos into rows in your expense sheet
Send a photo of a receipt to your Telegram bot and the merchant, date, total and category land in your expenses sheet.
See how it worksLog meals and macros by messaging a Telegram bot
Tell your bot what you ate and get calories and macros logged in your sheet, with today's total in the reply.
See how it worksKeep exploring
Set up “Turn Telegram ideas into short videos logged in a sheet” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.