Skip to content

Weekly

Turn your week's calendar into a timesheet by client

Every Friday your calendar events are sorted by client or project and written to your timesheet sheet with the hours for each.

Runs
Weekly
Apps
Google Calendar, Google Sheets
AI
Yes, uses the built-in AI allowance
Access
Calendar read; Sheets edit (only the sheets you pick when connecting)

Send this to your assistant

Create a ClickRuntime automation: every Friday, read my Google Calendar for the week, assign each event to a client or project, and add the hours 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 freelance consultant bills four clients by the hour. Her calendar shows exactly where the time went, but each Friday she rebuilds it into a timesheet by hand and still forgets the short calls, which adds up to unbilled hours every month.

Turning the calendar you already keep into timesheet rows, sorted by client, means billable time is captured without a separate tracking habit.

What you get out of it

  • Short calls get billed too

    Every event is counted, including the 15-minute catch-ups that tend to fall off a hand-written timesheet.

  • No separate time tracker

    Your calendar is already the record of your week. There is no timer to start or forget.

  • Invoices are quicker to prepare

    Hours grouped by client in a sheet can be totalled and copied straight into an invoice.

  • A record you can show a client

    Each row has the date, meeting title and duration, which answers most questions about a bill.

How it works

What happens, step by step

  1. Every Friday afternoon ClickRuntime reads your Google Calendar events for the past week.

  2. It leaves out all-day events, declined invitations and private events.

  3. AI assigns each event to one of your clients or projects, and the length of each event is worked out.

  4. Each event is added as a row in your Timesheet sheet with the date, title, client and hours.

Before it runs live

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

What you get

RunsWeekly
Turn your week's calendar into a timesheet by clienttoday, 9:00Succeeded
Google Sheets · Timesheet2026-10-14 | Northwind roadmap review | Northwind | 1.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 Google Calendar 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.
ai_timesheet_from_calendar.pyexample
from datetime import datetime, timedelta, timezone
from clickruntime import on_trigger, credentials, http, ai

SHEET, CLIENTS = "your-spreadsheet-id", ["Northwind", "Acme", "Contoso", "Internal"]

@on_trigger
def run(event):
    h = {"Authorization": f"Bearer {credentials.connection('google', 'work')}"}
    end = datetime.now(timezone.utc)
    events = http.get("https://www.googleapis.com/calendar/v3/calendars/primary/events", headers=h, params={
        "timeMin": (end - timedelta(days=7)).isoformat(), "timeMax": end.isoformat(), "singleEvents": True}).json().get("items", [])
    events = [e for e in events if "dateTime" in e.get("start", {}) and e.get("visibility") != "private"]
    if not events:
        return {"rows": 0}
    lines = "\n".join(f"{i}. {e.get('summary', '')} | {', '.join(a['email'] for a in e.get('attendees', []))}" for i, e in enumerate(events))
    labels = ai.generate(f"Clients: {', '.join(CLIENTS)}. For each numbered event reply one client per line, or unassigned.\n{lines}",
                         max_output_tokens=20 * len(events)).text.strip().splitlines()
    rows = []
    for i, e in enumerate(events):
        s, f = datetime.fromisoformat(e["start"]["dateTime"]), datetime.fromisoformat(e["end"]["dateTime"])
        client = labels[i].split(". ", 1)[-1].strip() if i < len(labels) else "unassigned"
        rows.append([s.date().isoformat(), e.get("summary", ""), client, round((f - s).total_seconds() / 3600, 2)])
    http.post(f"https://sheets.googleapis.com/v4/spreadsheets/{SHEET}/values/Timesheet!A:D:append", headers=h,
              params={"valueInputOption": "USER_ENTERED"}, json={"values": rows})
    return {"rows": len(rows)}

FAQ

Common questions

How does it know which client an event belongs to?
AI reads the event title, attendees' email domains and description and matches them to your list of clients and projects. Anything unclear is marked 'unassigned' for you to check.
Does it count personal events?
No. Events marked private, all-day events and ones you have declined are left out.
Can I review it before invoicing?
Yes. The rows are in your sheet, so you can correct a project or delete a row before you bill.
What permissions does it need?
Calendar read; Sheets edit (only the sheets you pick when connecting). 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 (weekly). 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 “Turn your week's calendar into a timesheet by client” from your assistant

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