Skip to content

On a schedule

Fill a timesheet sheet from your GitHub activity

Every Friday your timesheet sheet gets rows for the week's work, grouped by repository and day, with a short description and estimated hours.

Runs
On a schedule
Apps
GitHub, Google Sheets
AI
Yes, uses the built-in AI allowance
Access
GitHub read (contents/metadata); sheet shared with service account as editor

Send this to your assistant

Create a ClickRuntime automation: every Friday, collect my commits and pull requests from this week, group them by repo and day, have AI describe the work with estimated hours, and add rows to my Timesheet sheet.

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 contractor working for an agency has to log hours per project in a shared Google Sheet every week. They write code all week and then spend Friday afternoon trying to remember which day went to which client.

Rows drafted from their actual commits and pull requests, grouped by day and repository, turn that guesswork into a quick review. The agency gets accurate, timely timesheets, and the contractor gets their Friday back.

What you get out of it

  • Timesheets match the work

    Each row is backed by real commits and pull requests. Questions about what a day was spent on are easy to answer.

  • Grouped the way you bill

    Rows are per repository and day, which usually maps to a client or project. The sheet is ready for invoicing.

  • Readable descriptions

    AI turns commit messages into plain sentences a project manager understands. No more rows that just say 'fixes'.

  • Hours are yours to adjust

    Estimated hours are a starting point. Change them in the sheet before submitting.

How it works

What happens, step by step

  1. Every Friday, ClickRuntime collects your commits and pull requests from GitHub for the week.

  2. It groups them by day and repository.

  3. AI writes a short description of each group and estimates the hours spent.

  4. The rows are added to your Timesheet sheet in Google Sheets.

Before it runs live

  • Connect GitHub
  • Connect your Google Sheets account and pick the spreadsheets it may use

What you get

RunsOn a schedule
Fill a timesheet sheet from your GitHub activitytoday, 9:00Succeeded
Google Sheets · Timesheet2026-10-16 | northwind-shop | Fixed tax rounding at checkout and added tests | 5

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 and Google Sheets 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.
weekly_timesheet_from_github_activity.pyexample
from collections import defaultdict
from datetime import date, timedelta
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, ai

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)

AUTHOR, SHEET_ID = "your-github-username", "your-spreadsheet-id"
SCHEMA = {"type": "object", "properties": {"rows": {"type": "array", "items": {"type": "object", "properties": {
    "day": {"type": "string"}, "repo": {"type": "string"}, "description": {"type": "string"}, "hours": {"type": "number"}}}}}}

@on_trigger
def run(event):
    since = date.today() - timedelta(days=date.today().weekday())
    groups = defaultdict(list)
    for c in gh("GET", "/search/commits", params={"q": f"author:{AUTHOR} committer-date:>={since}", "per_page": 100})["items"]:
        groups[(c["commit"]["author"]["date"][:10], c["repository"]["name"])].append(f"{c['commit']['author']['date'][11:16]} {c['commit']['message'].splitlines()[0]}")
    for p in gh("GET", "/search/issues", params={"q": f"author:{AUTHOR} is:pr updated:>={since}", "per_page": 50})["items"]:
        groups[(p["updated_at"][:10], p["repository_url"].split("/")[-1])].append(f"PR: {p['title']}")
    if not groups:
        return {"rows": 0}
    text = "\n\n".join(f"{d} {r}:\n" + "\n".join(items) for (d, r), items in sorted(groups.items()))
    rows = ai.generate(text[:20000], json_schema=SCHEMA, max_output_tokens=1500,
                       system="For each day and repo, write a one-sentence description of the work and estimate hours from commit times.").json["rows"]
    sheets = build("sheets", "v4", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    sheets.spreadsheets().values().append(spreadsheetId=SHEET_ID, range="Timesheet!A:D", valueInputOption="USER_ENTERED",
        body={"values": [[r["day"], r["repo"], r["description"], r["hours"]] for r in rows]}).execute()
    return {"rows": len(rows)}

FAQ

Common questions

How are hours estimated?
From the spread of commit times across each day and the size of the work. Treat them as a draft; meetings and research without commits will need adding.
Can it map repositories to client names?
Yes. Give it a list of repositories and clients, and the client name is written in its own column.
Which sheet and tab does it use?
The sheet and tab you name, such as Timesheet. Rows are added at the bottom with date, project, description and hours.
What permissions does it need?
GitHub read (contents/metadata); sheet shared with service account as editor. 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 (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 “Fill a timesheet sheet from your GitHub activity” from your assistant

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