Skip to content

On a schedule

Get last month's client hours for invoicing

On the first of each month your billable hours per client are in your inbox, ready to turn into invoices.

Runs
On a schedule
Apps
Toggl Track
AI
Not needed
Access
read

Send this to your assistant

Create a ClickRuntime automation: on the 1st of every month at 8am, email me last month's Toggl Track hours per client, rounded to two decimals.

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

Invoicing day is when a freelancer or small agency owner finds out how messy the month was. They open Toggl Track, set the date range to last month, switch the grouping to client, export and copy the numbers into an invoice template. One wrong date range and a client is billed for last month plus three days of the next.

On the first of each month, this requests Toggl's summary report for the previous calendar month, grouped by client, and emails you the totals. The figures are waiting when you sit down to invoice, and the date range is always exactly the month that just ended.

It works best if every project in Toggl is attached to a client. It removes the fiddly report setup that people tend to postpone until a client is already asking for the invoice.

What you get out of it

  • Invoices start from correct totals

    The date range is calculated for you, so the numbers match the calendar month that just closed. That removes the classic error of billing a client for days that belong on next month's invoice.

  • Money does not wait on a forgotten report

    When the totals arrive on the 1st, invoices go out on the 1st or 2nd. Faster invoicing shortens the wait for payment, which matters when cash flow is tight for a small business.

  • See which clients take the most time

    Hours per client in one view shows where the month went. If one account used half your capacity at a low rate, you have evidence for a pricing conversation. That gives you something concrete to bring to the next pricing conversation.

  • One month, one comparable record

    Receiving the same summary monthly lets you spot trends across your inbox, such as a client growing or an account going quiet, without maintaining a spreadsheet of your own. Over a year, twelve emails tell the story of your client base.

  • No exporting and re-grouping

    You skip the clicks of choosing the range, the grouping and the export. That is only a few minutes, but it removes a task people tend to put off until the invoice is overdue.

How it works

What happens, step by step

  1. On the 1st of every month at 8 am, ClickRuntime pulls last month's tracked time from Toggl Track.

  2. It totals the hours for each client.

  3. You get one email with the hours per client, ready to use when you write invoices.

Before it runs live

  • Connect Toggl Track

What you get

RunsOn a schedule
Get last month's client hours for invoicingtoday, 9:00Succeeded
Email · Monthly hours per clientToggl hours for September 2026 Northwind: 62.25 h · Acme: 38.50 h

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
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Toggl Track 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.
monthly_summary.pyexample
from collections import defaultdict
from datetime import date, timedelta
from clickruntime import on_trigger, credentials, http, notify

API = "https://api.track.toggl.com/api/v9/me"

@on_trigger
def run(event):
    auth = (credentials.secret("TOGGL_API_TOKEN"), "api_token")
    first_this = date.today().replace(day=1)
    first_last = (first_this - timedelta(days=1)).replace(day=1)
    entries = http.get(f"{API}/time_entries", auth=auth, params={
        "start_date": first_last.isoformat(), "end_date": first_this.isoformat()}).json()
    projects = {p["id"]: p.get("client_id") for p in http.get(f"{API}/projects", auth=auth).json() or []}
    clients = {c["id"]: c["name"] for c in http.get(f"{API}/clients", auth=auth).json() or []}
    hours = defaultdict(float)
    for e in entries:
        if e["duration"] >= 0:
            hours[clients.get(projects.get(e.get("project_id")), "No client")] += e["duration"] / 3600
    lines = [f"{c}: {h:.2f} h" for c, h in sorted(hours.items(), key=lambda x: -x[1])]
    notify.email_me(f"Toggl hours for {first_last:%B %Y}", "\n".join(lines) or "No time tracked.")
    return {"clients": len(hours)}

FAQ

Common questions

Does it include unbilled or non-billable time?
The summary reports tracked time for each client, so billable and non-billable entries both count unless Toggl is set to separate them. Ask for a version that shows only billable hours if your invoices should exclude internal work.
What happens to time not assigned to a client?
Entries with no client are grouped as having no client in the report, so they still appear. It is a useful prompt to tidy the entries before invoicing rather than letting that time quietly go unbilled.
Can the report show earnings as well as hours?
If you set billable rates in Toggl, the summary can include amounts. Ask for the rate or revenue column to be added to the email and approve the change when you see it. Rates must already be set on the Toggl project or workspace.
What permissions does it need?
read. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's 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 “Get last month's client hours for invoicing” from your assistant

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