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.
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
Every evening, ClickRuntime reads the emails you sent from your Gmail that day.
AI groups them by client or project and estimates the time spent on each group.
It adds one row per group to your timesheet sheet with the date, client, summary and minutes.
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
Build your own
Need it to work differently?
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
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?
How is the time estimated?
Does it read personal emails?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Draft a LinkedIn post from your content sheet every weekday
Each weekday you get an email with a ready-to-edit LinkedIn post about the next idea in your Content sheet.
See how it worksGet a weekly email summary of new form responses
Every Friday you get one email that sums up the week's new feedback in your responses sheet, question by question.
See how it worksCopy a table from a web page into a sheet every morning
Each morning the listings on a page you choose are added to your Google Sheet, and you get the same rows by email as a CSV.
See how it worksKeep exploring
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.