On a schedule
Back up to GitHub with Telegram alerts
Every day your exports are saved to a GitHub repository, and Telegram tells you which files changed.
- Runs
- On a schedule
- Apps
- GitHub, Telegram
- AI
- Not needed
- Access
- GitHub contents write; bot token
Send this to your assistant
Create a ClickRuntime automation: every day at 3 am, fetch our export, commit changed files to acme/backups, and message me on Telegram with what changed.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A freelancer manages automation workflows and settings for several clients in tools that have no version history. One accidental edit and a client's setup is gone, with no way to see what it used to be.
A daily commit of each export to GitHub gives every file a full history. The Telegram summary confirms the backup ran and shows what changed, so an unexpected change is noticed the next morning.
What you get out of it
Version history for tools without one
Every change is saved in GitHub with a date. You can compare and restore any earlier version.
Proof the backup ran
A short Telegram message each day confirms it worked. Silence would tell you something is wrong.
Unexpected edits are spotted
The message lists changed files. A change nobody made on purpose stands out.
Clean history
Unchanged files are not committed again. The repository only records real changes.
How it works
What happens, step by step
Every day, ClickRuntime fetches the latest export from your tool.
It compares each file with the copy in your GitHub repository.
Changed or new files are saved to the repository.
Your Telegram bot sends a summary of what changed, or a note that nothing did.
Before it runs live
- Connect GitHub
- Connect Telegram
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
- Run it at a different time, more or less often, or only on weekdays
- 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, json
from clickruntime import on_trigger, credentials, http
def gh(method, path, **kw):
resp = http.request(method, f"https://api.github.com{path}", headers={
"Authorization": f"Bearer {credentials.connection('github', 'work')}", "Accept": "application/vnd.github+json"}, **kw)
return resp.raise_for_status() or (resp.json() if resp.content else None)
CHAT_ID = "123456789"
def telegram(text):
http.post(f"https://api.telegram.org/bot{credentials.secret('TELEGRAM_BOT_TOKEN')}/sendMessage",
json={"chat_id": CHAT_ID, "text": text, "disable_web_page_preview": True}).raise_for_status()
REPO, EXPORT_URL = "acme/backups", "https://tools.acme.example/api/export"
@on_trigger
def run(event):
items = http.get(EXPORT_URL, headers={"Authorization": f"Bearer {credentials.secret('EXPORT_TOKEN')}"}).json()
changed = []
for item in items:
path, content = f"exports/{item['id']}.json", json.dumps(item, indent=2, sort_keys=True) + "\n"
try:
current = gh("GET", f"/repos/{REPO}/contents/{path}")
except Exception:
current = None
if current and base64.b64decode(current["content"]).decode() == content:
continue
gh("PUT", f"/repos/{REPO}/contents/{path}", json={"message": f"Backup {path}", "content": base64.b64encode(content.encode()).decode(),
**({"sha": current["sha"]} if current else {})})
changed.append(item.get("name", path))
telegram(f"Backup done: {len(changed)} changed\n" + "\n".join(f"• {c}" for c in changed) if changed else "Backup done: no changes")
return {"changed": len(changed)}FAQ
Common questions
What happens if nothing changed?
Is the backup repository private?
Can it back up several tools?
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 told on Telegram when your forks fall behind
Telegram tells you when one of your GitHub forks falls behind the original project, and by how many commits.
See how it worksGet a daily summary of merged work on Telegram
Each morning Telegram sends a short summary of the pull requests merged in your repository yesterday.
See how it worksGet 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 worksKeep exploring
Set up “Back up to GitHub with Telegram alerts” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.