Skip to content

Daily

Fill your timesheet from the emails you sent today

Each evening your timesheet gets rows for the clients and projects you emailed about, ready to check before invoicing.

Runs
Daily
Apps
Gmail, Google Sheets
AI
Yes, uses the built-in AI allowance
Access
Gmail gmail.readonly; Sheets read+write

Send this to your assistant

Create a ClickRuntime automation: every evening, read the emails I sent today, group them by client or project and add timesheet rows to my 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 accountant bills by the hour across a dozen clients. Quick email replies make up a real share of her day, but she rarely logs them. At month end she scrolls through her sent folder trying to rebuild who she worked for, and much of that time never reaches an invoice.

A daily set of timesheet rows built from sent mail captures that work while it is fresh. She checks the rows, adjusts the minutes and bills for time she used to give away.

What you get out of it

  • Small tasks get billed

    Five-minute replies add up over a month. Logging them every day turns unbilled admin into invoiced time.

  • Month end takes less time

    Rows are already in the sheet, grouped by client. Invoicing becomes a review rather than a reconstruction.

  • A record you can show a client

    Each row names the subject of the emails behind it. If a client asks what the time was for, the answer is there.

  • Your timesheet stays current

    Entries arrive every evening without you opening the sheet. Gaps in the log stop piling up.

How it works

What happens, step by step

  1. Every evening, ClickRuntime reads the emails you sent from your Gmail that day.

  2. AI groups them by client or project and estimates the time spent on each group.

  3. It adds one row per group to your timesheet sheet with the date, client, summary and minutes.

  4. Only that day's sent mail is used, so the same emails are not logged twice.

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 your Google Sheets account and pick the spreadsheets it may use

What you get

RunsDaily
Fill your timesheet from the emails you sent todaytoday, 9:00Succeeded
Google Sheets · Timesheet2026-10-19 · Northwind Traders · VAT return questions and payroll query · 35 min

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 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.
timesheet_from_sent_emails.pyexample
from datetime import date
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, ai

SHEET_ID = "your-timesheet-id"

@on_trigger
def run(event):
    creds = Credentials(credentials.connection("google", "work"))
    gmail = build("gmail", "v1", credentials=creds, cache_discovery=False)
    ids = gmail.users().messages().list(userId="me", q="in:sent newer_than:1d", maxResults=100).execute().get("messages", [])
    lines = []
    for m in ids:
        msg = gmail.users().messages().get(userId="me", id=m["id"], format="metadata", metadataHeaders=["To", "Subject"]).execute()
        h = {x["name"]: x["value"] for x in msg["payload"]["headers"]}
        lines.append(f"To {h.get('To')}: {h.get('Subject')} ({msg.get('snippet', '')[:120]})")
    if not lines:
        return {"rows": 0}
    schema = {"type": "object", "properties": {"rows": {"type": "array", "items": {"type": "object", "properties": {
        "client": {"type": "string"}, "summary": {"type": "string"}, "minutes": {"type": "integer"}}}}}}
    groups = ai.generate("Group these sent emails by client or project and estimate minutes spent:\n" + "\n".join(lines),
                         json_schema=schema, max_output_tokens=1000).json["rows"]
    rows = [[date.today().isoformat(), g["client"], g["summary"], g["minutes"]] for g in groups]
    build("sheets", "v4", credentials=creds, cache_discovery=False).spreadsheets().values().append(
        spreadsheetId=SHEET_ID, range="Timesheet!A:D", valueInputOption="USER_ENTERED", body={"values": rows}).execute()
    return {"emails": len(lines), "rows": len(rows)}

FAQ

Common questions

How does it know which client an email belongs to?
It looks at the recipient's address and the subject. You can list your clients and their email domains in the sheet so matching is exact for the ones that matter most.
How is the time estimated?
Each email gets a short default duration, adjusted for longer messages and threads. The rows are a starting point you can edit before billing.
Does it read personal emails?
It only looks at mail you sent that day, and you can ask it to skip certain addresses or labels, such as family or newsletters.
What permissions does it need?
Gmail gmail.readonly; Sheets 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 “Fill your timesheet from the emails you sent today” from your assistant

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