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.
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
You send your bot a note: an idea, a link, a quote or a to-do.
ClickRuntime checks it came from you and turns the first line into a file name with today's date.
It commits the note as a Markdown file to the inbox folder of your GitHub repo, with tags if you used hashtags.
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
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
- 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
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?
Can I send voice notes or photos?
Can I choose the folder from the message?
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
Get GitHub issue updates on Telegram
Telegram messages you when an issue in your repository is opened, commented on or closed, with the title and a link.
See how it worksBack up Telegram bot messages to GitHub
Every message your Telegram bot receives is saved, and at 02:00 the day's messages are committed to a private GitHub repo as one file.
See how it worksFile incoming bug reports as GitHub issues with a Telegram alert
Each bug report sent to your trigger link becomes a GitHub issue with a clear title, severity and labels, and Telegram alerts you.
See how it worksKeep exploring
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.