The moment it happens
Save Telegram messages and voice notes to Notion
Anything you send your Telegram bot, from a quick note to a voice memo or a link, becomes a summarised page in your Notion Inbox.
- Runs
- The moment it happens
- Apps
- Notion, Telegram
- AI
- Yes, uses the built-in AI allowance
- Access
- bot token; Notion integration shared with the database
Send this to your assistant
Create a ClickRuntime automation: when I message my Telegram bot, transcribe any voice note, summarise the content and save it as a page in my Notion Inbox database, then reply with the link.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A consultant has her best ideas while walking between meetings or driving to a client. Typing into Notion on a phone is slow, so she records voice memos or sends herself messages, and they end up scattered across apps where she never looks at them again.
Sending everything to one Telegram bot, and having it arrive in Notion as a titled, summarised page, makes capturing a thought as quick as sending a message. Consultants, writers, founders and anyone who plans their work in Notion use it as a fast inbox for ideas, tasks and links.
What you get out of it
Capture ideas in seconds
Hold the record button, speak, and the note is on its way. Thoughts are saved while they are fresh, not written up later from memory.
Voice notes you can search
Recordings are turned into text, so you can search, copy and edit what you said. An audio file you never replay becomes a note you actually use.
Every capture lands in one place
Text, voice and links all go to the same Notion database. Your weekly review starts from one inbox rather than several chat threads.
A title and summary on every page
Each page gets a clear title and a short summary. Scanning the inbox later is quick, even when the original was a rambling voice memo.
How it works
What happens, step by step
When you send a message, voice note or link to your Telegram bot, it reaches ClickRuntime straight away.
Voice notes are turned into text using a speech-to-text service.
AI writes a short title and summary for the content.
A page is created in your Notion Inbox database with the title, summary and full text, and the bot replies with its link.
Before it runs live
- Connect Notion and share the database you want it to 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 Notion and Telegram steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_event, credentials, http, ai
DATABASE_ID = "your-inbox-database-id"
@on_event
def handle(event):
msg = (event.json or {}).get("message") or {}
tg = f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}"
text = msg.get("text") or msg.get("caption") or ""
if "voice" in msg:
path = http.get(f"{tg}/getFile", params={"file_id": msg["voice"]["file_id"]}).json()["result"]["file_path"]
audio = 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": ("voice.ogg", audio)}, data={"model": "whisper-1"}).json()["text"]
if not text:
return {"skipped": True}
out = ai.generate(f"Give a short title and a 2-3 sentence summary of this note:\n{text[:8000]}", max_output_tokens=200,
json_schema={"type": "object", "properties": {"title": {"type": "string"}, "summary": {"type": "string"}}, "required": ["title", "summary"]}).json
page = http.post("https://api.notion.com/v1/pages", headers={"Authorization": f"Bearer {credentials.connection('notion', 'work')}",
"Notion-Version": "2022-06-28"}, json={"parent": {"database_id": DATABASE_ID},
"properties": {"Name": {"title": [{"text": {"content": out["title"][:200]}}]}},
"children": [{"paragraph": {"rich_text": [{"text": {"content": c}}]}} for c in (out["summary"], text[:1900])]}).json()
http.post(f"{tg}/sendMessage", json={"chat_id": msg["chat"]["id"], "text": f"Saved: {page['url']}"})
return {"page": page["id"]}
FAQ
Common questions
How long can a voice note be?
Is the full transcript kept?
What happens with links I send?
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
Log receipts sent to Telegram in a Notion expenses database
Send a photo of a receipt or invoice to your Telegram bot and it is logged in your Notion expenses database, with a spending summary every Sunday.
See how it worksAdd, list and complete Notion tasks from Telegram
Message your bot in plain words and it creates, lists or completes tasks in your Notion database.
See how it worksSave relevant RSS articles to Notion with Telegram alerts
Articles from your feeds that match your topics are saved to Notion with a summary, and the best ones are sent to you on Telegram.
See how it worksKeep exploring
Set up “Save Telegram messages and voice notes to Notion” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.