Skip to content

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.

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

  1. Every day, ClickRuntime fetches the latest export from your tool.

  2. It compares each file with the copy in your GitHub repository.

  3. Changed or new files are saved to the repository.

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

RunsOn a schedule
Back up to GitHub with Telegram alertstoday, 9:00Succeeded
Telegram · Backup botBackup done: 1 changed • Northwind lead routing

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

  • 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

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.
back_up_exports_to_github_with_telegram_alerts.pyexample
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?
Nothing is committed, and Telegram gets a short 'no changes' note so you still know the backup ran.
Is the backup repository private?
It should be. Create a private repository for backups and connect GitHub with access to it.
Can it back up several tools?
Yes. List each export address and a folder name, and each tool gets its own folder in the repository.
What permissions does it need?
GitHub contents write; bot token. 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 each time it runs (on a schedule). Checks that find nothing to do and stop right away aren't counted.
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 “Back up to GitHub with Telegram alerts” from your assistant

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