Skip to content

The moment it happens

Save notes from Telegram to a GitHub repo

Send your bot a thought, link or to-do, and it is committed to your GitHub notes repo as a Markdown file you can pull into Obsidian or any editor.

Runs
The moment it happens
Apps
GitHub, Telegram
AI
Not needed
Access
bot token; GitHub contents write on the notes repo

Send this to your assistant

Create a ClickRuntime automation: when I send my Telegram bot a note, save it to my notes repo on GitHub as a Markdown file in the inbox folder, named with the date and its first few words, and reply with the link.

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

Ideas arrive when you are on the move, and the quickest thing to hand is a chat app. Many people keep their real notes in a Git repo, often an Obsidian or Markdown vault, which is awkward to edit from a phone.

This automation makes your Telegram bot the capture box for that repo. Each note you send becomes a Markdown file with the date and your hashtags, committed straight to GitHub, and the bot confirms with a link.

It suits developers, writers and anyone who keeps a Markdown vault in GitHub and wants capture to take two seconds.

What you get out of it

  • Capture from any device

    If you can open Telegram you can add a note. No Git client or editor on your phone.

  • Plain Markdown you own

    Each note is a normal .md file with front matter, readable in any editor.

  • Hashtags become tags

    Tags you type go into the front matter, so your vault's tag search picks them up.

  • Confirmed every time

    The reply link shows the note is saved, so you do not wonder whether it went through.

  • A clean inbox to process

    All captured notes land in one folder to sort later, the way many vault workflows expect.

How it works

What happens, step by step

  1. You send your bot a note: an idea, a link, a quote or a to-do.

  2. ClickRuntime checks it came from you and turns the first line into a file name with today's date.

  3. It commits the note as a Markdown file to the inbox folder of your GitHub repo, with tags if you used hashtags.

  4. The bot replies with a link to the new file.

Before it runs live

  • Connect GitHub
  • Connect Telegram
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Save notes from Telegram to a GitHub repojust nowSucceeded
Telegram · your botSaved inbox/2026-11-10-pricing-page-idea.md https://github.com/yourname/notes/blob/main/inbox/2026-11-10-pricing-page-idea.md

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
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other GitHub 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.
save_notes_from_telegram_to_a_github_repo.pyexample
import base64, re
from datetime import datetime, timezone
from clickruntime import on_event, credentials, http

REPO, OWNER = "yourname/notes", 123456789

def gh(method, path, **kw):
    r = http.request(method, f"https://api.github.com{path}", headers={
        "Authorization": f"Bearer {credentials.connection('github', 'work')}", "Accept": "application/vnd.github+json"}, **kw)
    r.raise_for_status()
    return r.json() if r.content else None

def tg(method, **params):
    r = http.post(f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}/{method}", json=params)
    r.raise_for_status()
    return r.json()["result"]

@on_event
def handle(event):
    msg = (event.json or {}).get("message", {})
    chat, text = msg.get("chat", {}).get("id"), (msg.get("text") or msg.get("caption") or "").strip()
    if chat != OWNER or not text or text.startswith("/"):
        return {"skipped": True}
    when = datetime.fromtimestamp(msg["date"], timezone.utc)
    first = re.sub(r"[^a-z0-9]+", "-", text.splitlines()[0].lower())[:40].strip("-") or "note"
    path = f"inbox/{when:%Y-%m-%d}-{first}-{msg['message_id']}.md"
    tags = re.findall(r"#(\w+)", text)
    body = f"---\ncreated: {when:%Y-%m-%dT%H:%M}Z\ntags: [{', '.join(tags)}]\nsource: telegram\n---\n\n{text}\n"
    res = gh("PUT", f"/repos/{REPO}/contents/{path}", json={"message": f"Note: {text.splitlines()[0][:60]}",
             "content": base64.b64encode(body.encode()).decode()})
    tg("sendMessage", chat_id=chat, text=f"Saved {path}\n{res['content']['html_url']}", disable_web_page_preview=True)
    return {"path": path}

FAQ

Common questions

Does it work with an Obsidian vault?
Yes, if the vault is a Git repo on GitHub. Notes land in the inbox folder and appear in Obsidian the next time your Git plugin pulls.
Can I send voice notes or photos?
This version saves text and captions. Ask your assistant to also download photos into an attachments folder and link them from the note.
Can I choose the folder from the message?
Yes. Ask your assistant to read a prefix such as "work:" or "read:" and save into a matching folder instead of the inbox.
What permissions does it need?
bot token; GitHub contents write on the notes repo. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's 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 “Save notes from Telegram to a GitHub repo” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.