Skip to content

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.

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

  1. Every few minutes, ClickRuntime checks your Google Drive To post folder for new videos.

  2. AI writes a caption for each video from its name and notes.

  3. The video is published through your posting service and moved to a Posted folder, so it is not posted again.

  4. You get a Telegram message with the caption and the live links.

Before it runs live

  • Connect Google Drive
  • Connect Telegram

What you get

RunsEvery 15 minutes
Publish videos dropped into a Drive folder and get the links on Telegramtoday, 9:00Succeeded
Telegram · PostedPosted acme-tote-unboxing.mp4: Unboxing the new Acme tote #packwithme #everydaycarry #acme

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 Drive 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.
post_videos_from_drive_and_report_on_telegram.pyexample
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?
Any platform your posting service supports. The service handles the connection to each social account.
Can I write my own caption?
Yes. Add a text note with the same name as the video, or use a clear file name, and the caption is based on that.
What if posting fails?
The video stays in the To post folder and you get a Telegram message with the error, so you can try again.
What permissions does it need?
Drive read+write; Telegram bot token. 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 each time it checks. Checks that find nothing new and stop right away aren't counted.
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 “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.