Skip to content

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.

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

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

  1. You send your Telegram bot a short message with a video idea.

  2. AI turns the idea into a short video script.

  3. The script is sent to your video service, and ClickRuntime waits until the video is ready.

  4. A new row with the idea, script and link is added to the Videos tab of your Google Sheet.

  5. 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

RunsThe moment it happens
Turn Telegram ideas into short videos logged in a sheetjust nowSucceeded
Telegram · Video botYour video is ready: "3 ways Northwind cut packaging waste" https://videos.example.com/v/8f2a1

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

  • 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

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.
telegram_idea_to_ai_video_tracked_in_a_sheet.pyexample
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?
Any video generation service with an HTTPS API that accepts a script and returns a video link. You save its API key once, and the automation sends each script there and waits for the render to finish.
Can I edit the script before the video is made?
Yes. It can send you the script first and only render the video after you reply with an approval. That adds a step but avoids paying for renders you would throw away.
What gets recorded in the sheet?
The date, the idea you sent, the script and the video link. You can add columns such as where it was posted, and fill them in by hand later.
What permissions does it need?
Telegram bot token; Sheets read+write. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run for each event the app sends.
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 “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.