Skip to content

Daily

Refresh a generated file in your repo every day

A stats badge, data file or page in your repo is regenerated and committed once a day.

Runs
Daily
Apps
GitHub
AI
Yes, uses the built-in AI allowance
Access
Contents: read+write

Send this to your assistant

Create a ClickRuntime automation: every day at 6am, get my follower counts, render them into stats.svg and commit it to my profile repo janedoe/janedoe.

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

Some files in a repository are supposed to be current and are not: a stats badge in the README, a generated JSON list of contributors, a changelog assembled from external data, a status page that reflects today's numbers. They are updated by hand when someone remembers, so the README shows last quarter's download count and the project looks neglected to anyone who visits.

Once a day the new content is fetched or generated, and the file's current SHA is read from GitHub so the update is applied cleanly. The new version is then committed to the repository. For Markdown files, an AI proofreading step can tidy wording before the commit.

Open source maintainers, documentation owners and anyone with a generated file that should simply always be fresh will get the most out of it, and the schedule keeps working through holidays and busy release weeks.

What you get out of it

  • Visitors see current numbers

    A README that shows this week's figures signals an active project to anyone deciding whether to adopt it, which matters for first impressions on a repository's front page. Stale numbers quietly undermine trust in a project.

  • The commit history shows the refresh

    Each update appears as a dated commit, so you can see when a value changed and confirm that the refresh actually ran, with a diff showing exactly what moved. That makes it easy to prove the schedule is healthy.

  • No cron server or workflow to maintain

    The schedule runs outside your repository, so you do not need to write a GitHub Actions workflow, manage its permissions or keep it from being disabled after 60 days of inactivity.

  • Proofreading catches slips in copy

    When the file is Markdown, the optional AI pass can fix typos and awkward phrasing before the commit, which is useful for generated text that no human reads before it goes live.

  • Safe updates through the SHA

    Reading the existing file's SHA first means the commit replaces exactly the version it saw, so it will not silently overwrite a manual edit made between the read and the write.

How it works

What happens, step by step

  1. Once a day, the automation creates the latest version of your file, such as a stats badge or data file.

  2. If you want, AI proofreads text files first.

  3. The new version is saved to your GitHub repo with a short description, like "Update stats.svg".

Before it runs live

  • Connect GitHub

What you get

RunsDaily
Refresh a generated file in your repo every daytoday, 9:00Succeeded
GitHub · janedoe/janedoeCommit "Update stats.svg": 1,284 followers · 46 repos

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
  • Change what the AI looks for, or how it writes the result
  • 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

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.
scheduled_file_update_committed_to_a_repo.pyexample
import base64
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)
    resp.raise_for_status()
    return resp.json() if resp.content else None

REPO, PATH = "janedoe/janedoe", "stats.svg"

@on_trigger
def run(event):
    user = gh("GET", "/users/janedoe")
    svg = (f'<svg xmlns="http://www.w3.org/2000/svg" width="320" height="60">'
           f'<text x="10" y="35" font-family="sans-serif" font-size="18">'
           f'{user["followers"]} followers · {user["public_repos"]} repos</text></svg>\n')
    current = gh("GET", f"/repos/{REPO}/contents/{PATH}")
    if base64.b64decode(current["content"]).decode() == svg:
        return {"changed": False}
    gh("PUT", f"/repos/{REPO}/contents/{PATH}", json={
        "message": "Update stats.svg", "sha": current["sha"], "content": base64.b64encode(svg.encode()).decode()})
    return {"changed": True, "followers": user["followers"]}

FAQ

Common questions

What kind of file can it update?
Any text file in the repository, such as a README, a JSON data file or a Markdown page. You tell it which path to update and what content to produce, whether fetched from an API or generated from a template.
Will it commit if nothing has changed?
You can set it up to compare first and skip the commit when the content is identical, which keeps history clean. Without that check, a daily commit with only a timestamp change would appear every day.
Is the AI step required?
No. It is optional and mainly useful for Markdown content that benefits from proofreading. Without it, the fetched or generated text is committed as is. The built-in AI is used, so no external key is needed.
What permissions does it need?
Contents: read+write. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly AI allowance.
How many runs does it use?
One run each time it runs (daily). 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 “Refresh a generated file in your repo every day” from your assistant

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