Daily
Back up your data to a GitHub repo every night
Your exports and configs are committed to a private repo each night, only when something changed, with a summary by email.
- Runs
- Daily
- Apps
- GitHub
- AI
- Not needed
- Access
- Contents: read+write
Send this to your assistant
Create a ClickRuntime automation: every night at 2am, download the JSON export from https://api.example.com/export, save each item as a file in the backups/ folder of my private repo acme/backups, commit only files that changed, and email me what changed.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Many teams keep important configuration outside of version control: dashboard definitions, workflow exports, feature flag settings, CRM field lists or a database export from an internal tool. When someone edits one by mistake or a vendor changes defaults, there is no history to restore from. The only backup is a file on somebody's laptop from three months ago, if it exists at all.
Every night the export is downloaded over HTTP, and for each file the current version in your GitHub repository is read by its SHA and compared with the new content. Only files that changed are committed, so the git history reads as a log of real edits. An email summarizes what was updated.
It suits operations teams, consultants who manage client configurations and anyone who wants cheap, auditable backups using a repository they already have.
What you get out of it
Mistakes can be rolled back
If a setting is edited wrongly on Tuesday, the previous night's file is in git, so restoring it takes minutes and does not depend on anyone's memory of what the old value was.
Git history becomes an audit trail
Each commit shows what changed and on which night, which answers who-changed-what questions during incident reviews and compliance conversations without a separate logging system. That is valuable evidence for security reviews and customer questionnaires.
Quiet nights create no noise
Because unchanged files are not committed, the repository does not fill with identical snapshots, and the commit list shows only genuine changes worth looking at. Fewer meaningless commits also make the history faster to review.
Backups live outside the source tool
If the original service has an outage or an account is locked, your configurations still exist in GitHub, which is a different system with different failure modes. Independent copies are a basic principle of any sensible recovery plan.
The summary email is a daily change report
The message listing updated files tells you at a glance whether anything moved overnight, so unexpected edits to critical settings get noticed the next morning. A surprise in that list is often the first clue that something changed.
How it works
What happens, step by step
Every night, ClickRuntime downloads your data exports or config files.
It compares each file with the copy already in your GitHub repo.
Only files that changed are saved to the repo as a new version.
You get an email listing the files that changed.
Before it runs live
- Connect GitHub
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 steps into one automation
Under the hood
The code that runs this automation
import base64, json
from clickruntime import on_trigger, credentials, http, notify
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)
resp.raise_for_status()
return resp.json() if resp.content else None
REPO = "acme/backups"
@on_trigger
def run(event):
items = http.get("https://api.example.com/export").json()
changed = []
for item in items:
path = f"backups/{item['id']}.json"
content = json.dumps(item, indent=2, sort_keys=True) + "\n"
r = http.get(f"https://api.github.com/repos/{REPO}/contents/{path}", headers={
"Authorization": f"Bearer {credentials.connection('github', 'work')}", "Accept": "application/vnd.github+json"})
current = r.json() if r.status_code == 200 else 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(path)
if changed:
notify.email_me(f"Backup: {len(changed)} files changed", "\n".join(changed))
return {"items": len(items), "changed": len(changed)}FAQ
Common questions
How does it avoid committing identical files every night?
What kinds of data can it back up?
Can it write to a specific branch or folder?
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 weekly stats for your repos by email
Every Monday you see stars, forks, open issues and open pull requests for your repos, and how they changed since last week.
See how it worksGet a morning digest of new pull requests
Each weekday morning you get one email with the pull requests opened in the last day, grouped by repo.
See how it worksLabel and close stale issues every week
Issues with no activity for 60 days are labelled stale, closed 14 days later if nothing happens, and you get the list.
See how it worksKeep exploring
Set up “Back up your data to a GitHub repo every night” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.