The moment it happens
Reply to emails with a Telegram voice note
Answer an email by recording a quick voice note on Telegram, and a polished written reply goes out in the original thread.
- Runs
- The moment it happens
- Apps
- Gmail, Telegram
- AI
- Yes, uses the built-in AI allowance
- Access
- Telegram bot token; Gmail gmail.modify
Send this to your assistant
Create a ClickRuntime automation: when I send a voice note to my bot replying to an email alert, transcribe it, turn it into a professional reply and send it in the original thread.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A builder spends most of the day on site. Client emails arrive while his hands are full, and typing a careful reply on a phone between jobs is slow. By evening there is a backlog, and clients wonder why a simple question took a day to answer.
This automation lets him reply by talking. He records a voice note in Telegram, and a clear, polite email goes back to the client in the same thread within a minute.
What you get out of it
Reply from anywhere
A voice note takes seconds to record on site, in the car or between meetings, where typing a proper email is not practical.
Professional replies from rough notes
You can speak naturally, with pauses and asides, and the email that goes out reads as a tidy written answer.
Replies stay in the right thread
The email goes into the original conversation, so the client sees it in context and your inbox stays organised.
You always know it was sent
Telegram confirms each reply, so you are never unsure whether an answer actually went out.
How it works
What happens, step by step
You reply to an email alert in your Telegram bot with a voice note.
ClickRuntime downloads the voice note and turns your speech into text.
AI writes a clear, professional email reply from what you said.
The reply is sent from your Gmail in the original email thread, or saved as a draft if you prefer.
Your bot confirms in Telegram that the reply has gone out.
Before it runs live
- Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
- 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 Gmail and Telegram steps into one automation
Under the hood
The code that runs this automation
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
import base64, re
from email.mime.text import MIMEText
from clickruntime import on_event, credentials, http, ai
def send(gmail, to, subject, text, thread=None):
msg = MIMEText(text)
msg["to"], msg["subject"] = to, subject
body = {"raw": base64.urlsafe_b64encode(msg.as_bytes()).decode()}
if thread:
body["threadId"] = thread
gmail.users().messages().send(userId="me", body=body).execute()
@on_event
def handle(event):
m = (event.json or {}).get("message", {})
alert = (m.get("reply_to_message") or {}).get("text", "")
found = re.search(r"thread:(\w+) from:(\S+) subject:(.+)", alert)
if "voice" not in m or not found:
return {"skipped": True}
tg = f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}"
path = http.get(f"{tg}/getFile", params={"file_id": m["voice"]["file_id"]}).json()["result"]["file_path"]
audio = http.get(f"{tg.replace('/bot', '/file/bot')}/{path}").content
words = http.post("https://api.openai.com/v1/audio/transcriptions", data={"model": "whisper-1"},
files={"file": ("note.ogg", audio)},
headers={"Authorization": f"Bearer {credentials.secret('OPENAI_API_KEY')}"}).json()["text"]
reply = ai.generate(f"Turn this spoken note into a short, polite email reply:\n{words}", max_output_tokens=400).text
thread, to, subject = found.groups()
gmail = build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
send(gmail, to, f"Re: {subject}", reply, thread)
http.post(f"{tg}/sendMessage", json={"chat_id": m["chat"]["id"], "text": f"✅ Reply sent to {to}"})
return {"sent": thread}FAQ
Common questions
How does it know which email I am replying to?
Can I check the reply before it is sent?
Which languages can I speak in?
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
Search your Gmail by messaging a Telegram bot
Ask your Telegram bot for an email in plain words and get the best matches back in the chat.
See how it worksSort your inbox with AI and get urgent emails on Telegram
New emails are labelled and newsletters archived for you, and only the urgent ones reach your phone as a Telegram message.
See how it worksGet a morning newsletter digest on Telegram
Yesterday's newsletters arrive as one short digest on Telegram at 7am, as text or a voice message.
See how it worksKeep exploring
Set up “Reply to emails with a Telegram voice note” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.