Skip to content

Daily

Build a daily timesheet from your calendar and sent email

Each evening you get a timesheet of the day grouped by client, built from your meetings and sent emails.

Runs
Daily
Apps
Gmail, Google Calendar
AI
Yes, uses the built-in AI allowance
Access
Calendar read; Gmail gmail.modify

Send this to your assistant

Create a ClickRuntime automation: every evening, combine today's calendar events and sent emails into a timesheet grouped by client and email it to me.

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 by the hour across five clients. At the end of the month she tries to rebuild her time from memory and her calendar, and the short calls and email work that never made it into a meeting are lost from the invoice.

A timesheet drafted each evening from what actually happened that day captures time while it is fresh, and she only has to correct it rather than reconstruct it.

What you get out of it

  • Bill for the time you worked

    Short calls and email threads are listed alongside meetings, so small pieces of work stop disappearing from invoices.

  • Two minutes a day, not an afternoon a month

    Checking a draft each evening is quicker than rebuilding four weeks of work from memory.

  • Clear records if a client asks

    Each entry is tied to a meeting or email, which makes it easy to explain a line on an invoice.

  • See where your week goes

    Grouping by client shows which accounts take more time than they pay for.

How it works

What happens, step by step

  1. Every evening ClickRuntime reads today's events from your Google Calendar and the emails you sent today.

  2. It matches each one to a client using the email addresses involved.

  3. AI groups the entries by client, estimates time for email work and writes a short description for each line.

  4. The timesheet is emailed to you so you can check it and copy it into your invoicing.

Before it runs live

  • Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
  • Connect Google Calendar

What you get

RunsDaily
Build a daily timesheet from your calendar and sent emailtoday, 9:00Succeeded
Email · TimesheetAcme: 2h 30m (kickoff call, 4 emails on scope). Northwind: 1h 10m (weekly sync, invoice follow-up).

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 Gmail and Google Calendar 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.
timesheet_from_my_calendar_and_email.pyexample
from datetime import datetime, timedelta, timezone
from googleapiclient.discovery import build
from google.oauth2.credentials import Credentials
from clickruntime import on_trigger, credentials, notify, ai

CLIENTS = {"acme.example": "Acme", "northwind.example": "Northwind"}

@on_trigger
def run(event):
    creds = Credentials(credentials.connection("google", "work"))
    start = datetime.now(timezone.utc).replace(hour=0, minute=0, second=0)
    events = build("calendar", "v3", credentials=creds, cache_discovery=False).events().list(calendarId="primary",
             timeMin=start.isoformat(), timeMax=(start + timedelta(days=1)).isoformat(), singleEvents=True).execute()["items"]
    gmail = build("gmail", "v1", credentials=creds, cache_discovery=False).users()
    sent = gmail.messages().list(userId="me", q="in:sent newer_than:1d").execute().get("messages", [])
    lines = [f"Meeting {e.get('summary')} {e['start'].get('dateTime')}-{e['end'].get('dateTime')} "
             f"{[a['email'] for a in e.get('attendees', [])]}" for e in events]
    for m in sent[:40]:
        to = next(h["value"] for h in gmail.messages().get(userId="me", id=m["id"], format="metadata", metadataHeaders=["To"]).execute()["payload"]["headers"])
        lines.append(f"Email to {to}")
    sheet = ai.generate(f"Clients by domain: {CLIENTS}. Emails count 10 min each. Build a timesheet grouped by client:\n" + "\n".join(lines),
                        max_output_tokens=700).text
    notify.email_me(f"Timesheet {start:%d %b}", sheet)
    return {"events": len(events), "emails": len(sent)}

FAQ

Common questions

How does it know which client an event belongs to?
It matches attendee and recipient email domains to the client list you give it. Events with no match are listed as unassigned for you to sort.
How is email time estimated?
Each sent email counts as a small block of time, such as ten minutes, which you can adjust. Long threads with one client on the same day are grouped.
Can it write to a spreadsheet instead?
Yes. The same timesheet can be added as rows to a Google Sheet, which suits people who invoice from a sheet.
What permissions does it need?
Calendar read; Gmail gmail.modify. 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 “Build a daily timesheet from your calendar and sent email” from your assistant

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