The moment it happens
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.
- 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 send audio to my Telegram bot, transcribe it, reply with the text and a short summary, and save both to my Drive 'Transcripts' folder.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A site manager thinks best while driving between jobs. He records voice notes about what he saw, what needs ordering and who to call, but listening back to find one detail takes longer than it took to say. Notes recorded on his phone never make it to the office.
Turning each voice note into text and a short summary, and filing both in Drive, makes spoken notes as easy to search and share as typed ones. Field workers, writers, founders and anyone who prefers talking to typing use it to capture ideas on the move.
What you get out of it
Speak now, read later
Record your thoughts whenever it suits you, and get searchable text back within a minute or two.
A summary for long recordings
A few lines with the main points saves reading the full transcript when you only need the gist.
Everything filed in one place
Transcripts and summaries are saved to Drive, where colleagues can read them and search finds them later.
Works from any phone
Telegram is all you need. There is no extra app to install or recorder to carry.
How it works
What happens, step by step
ClickRuntime starts as soon as you send a voice note or audio file to your Telegram bot.
It ignores messages from chats you have not allowed and any message it has already handled.
The audio is transcribed, and AI writes a short summary of the main points.
You get the text and summary as a reply in Telegram, and both are saved as a document in your Drive Transcripts folder.
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
import io
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from googleapiclient.http import MediaIoBaseUpload
from clickruntime import on_event, credentials, http, state, ai
FOLDER_ID, ALLOWED_CHAT = "your-transcripts-folder-id", 123456789
@on_event
def handle(event):
msg = (event.json or {}).get("message", {})
audio = msg.get("voice") or msg.get("audio")
if not audio or msg["chat"]["id"] != ALLOWED_CHAT or state.get(f"done:{event.event_id}"):
return {"skipped": True}
tg = f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}"
path = http.get(f"{tg}/getFile", params={"file_id": audio["file_id"]}).json()["result"]["file_path"]
data = http.get(f"https://api.telegram.org/file/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}/{path}").content
text = http.post("https://api.openai.com/v1/audio/transcriptions", headers={"Authorization": f"Bearer {credentials.secret('OPENAI_API_KEY')}"},
files={"file": ("audio.ogg", data)}, data={"model": "whisper-1"}).json()["text"]
summary = ai.generate(f"Summarise this voice note in 3 bullet points:\n{text[:12000]}", max_output_tokens=250).text
http.post(f"{tg}/sendMessage", json={"chat_id": ALLOWED_CHAT, "text": f"Summary:\n{summary}\n\nTranscript:\n{text[:3500]}"})
drive = build("drive", "v3", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
drive.files().create(body={"name": f"Voice note {event.received_at[:16]}", "parents": [FOLDER_ID], "mimeType": "application/vnd.google-apps.document"},
media_body=MediaIoBaseUpload(io.BytesIO(f"Summary\n{summary}\n\nTranscript\n{text}".encode()), mimetype="text/plain")).execute()
state.set(f"done:{event.event_id}", True)
return {"chars": len(text)}FAQ
Common questions
What audio can I send?
Which languages are supported?
Who can send audio to the bot?
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
Generate 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 worksMessage 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.
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 “Transcribe voice notes sent to Telegram and save them to Drive” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.