Skip to content

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.

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

  1. You reply to an email alert in your Telegram bot with a voice note.

  2. ClickRuntime downloads the voice note and turns your speech into text.

  3. AI writes a clear, professional email reply from what you said.

  4. The reply is sent from your Gmail in the original email thread, or saved as a draft if you prefer.

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

RunsThe moment it happens
Reply to emails with a Telegram voice notejust nowSucceeded
Telegram · Email bot✅ Reply sent to orders@northwind.example: "Thanks for the photos. We can start the kitchen on Monday 10 Nov..."

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 Gmail 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.
reply_to_emails_by_telegram_voice_note.pyexample
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?
You reply to the email alert your bot sent you. That alert carries the email's thread, so the answer goes back to the right conversation.
Can I check the reply before it is sent?
Yes. It can save the reply as a Gmail draft instead of sending it, so you can read it over and press send yourself.
Which languages can I speak in?
Most common languages are transcribed well. The reply can be written in the same language or in another one you choose.
What permissions does it need?
Telegram bot token; Gmail gmail.modify. 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 “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.