Skip to content

Collects as they arrive, acts daily

Get a weekly list of invoices from your inbox

Each week you get the vendor, amount and due date of every invoice and receipt that arrived by email.

Runs
Collects as they arrive, acts daily
Apps
Gmail
AI
Yes, uses the built-in AI allowance
Access
read

Send this to your assistant

Create a ClickRuntime automation: when an email with an invoice or receipt attached arrives, pull out the vendor, amount and due date. Every Friday, email me the list.

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

Invoices and receipts reach a freelancer or small finance team as PDF attachments scattered over months of email. At tax time or month-end close, someone opens each one, reads the supplier, date, total and VAT, and types them into a spreadsheet. A dozen a month is tolerable, but a hundred is a lost weekend, and one transposed digit means the books do not reconcile with the bank.

Messages with an invoice or receipt attachment are found with a Gmail search as they arrive. The attachment is read, ClickRuntime's built-in AI extracts fields such as supplier, invoice number, date and amount, and each record is stored. Once a week an email summarizes everything collected, so the totals are already waiting.

Freelancers, bookkeepers and owners of small companies who receive supplier bills by email can use it to keep their records current.

What you get out of it

  • Month-end stops being a data entry job

    Fields already pulled from each document replace hours of retyping, so closing the books becomes a review of a ready list and not a weekend with a stack of PDFs.

  • Fewer transcription mistakes

    Numbers read from the document and stored automatically avoid the wrong digit or swapped date that makes a reconciliation fail and costs an hour to hunt down. Fewer corrections later also means less friction with your accountant.

  • Nothing important is missed

    Every email matching the search is processed, so an invoice sent to your inbox in a busy week is captured, which prevents late payment fees and unclaimed deductions. Catching them in time can save real money each quarter.

  • A weekly summary shows what is owed

    The email lists suppliers and amounts that arrived during the week, giving a regular picture of upcoming bills and spending, which helps with cash planning. Nothing about the figures has to be recalculated by hand.

  • Records are ready for your accountant

    A consistent stored list of dates, suppliers and totals can be handed over at year end, which shortens the accountant's work and may reduce what they charge. Good records also help if a tax office asks questions.

How it works

What happens, step by step

  1. Every day ClickRuntime looks in your Gmail for new emails with attachments that mention an invoice or receipt.

  2. AI reads each attachment and pulls out the supplier, the amount and the due date.

  3. It skips emails it has already processed and keeps the details until the end of the week.

  4. Once a week you get an email listing every invoice found, with supplier, amount and due date.

Before it runs live

  • Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
  • Paste your automation's link into the other app's webhook settings

What you get

RunsCollects as they arrive, acts daily
Get a weekly list of invoices from your inboxtoday, 9:00Succeeded
Email · 3 invoices this weekNorthwind Supplies: $1,240.00, due 2026-11-01 Acme Hosting: $89.00, due 2026-10-28

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

  • Act only on the items that match your own rules, and skip the rest
  • 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 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.
extract_invoice_attachment_data_from_emails.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
import base64
from datetime import datetime
from zoneinfo import ZoneInfo
from clickruntime import on_trigger, credentials, state, ai, notify

SCHEMA = {"type": "object", "properties": {"vendor": {"type": "string"}, "amount": {"type": "string"},
          "due_date": {"type": "string"}}, "required": ["vendor", "amount", "due_date"]}

@on_trigger
def run(event):
    gmail = build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    found, done = state.get("invoices") or [], set(state.get("done") or [])
    msgs = gmail.users().messages().list(userId="me", q="has:attachment (invoice OR receipt) newer_than:2d").execute().get("messages", [])
    for m in [m for m in msgs if m["id"] not in done]:
        msg = gmail.users().messages().get(userId="me", id=m["id"]).execute()
        names = [p["filename"] for p in msg["payload"].get("parts", []) if p.get("filename")]
        text = next((base64.urlsafe_b64decode(p["body"]["data"]).decode(errors="ignore")
                     for p in msg["payload"].get("parts", []) if p["mimeType"] == "text/plain" and p["body"].get("data")), msg["snippet"])
        found.append(ai.generate(f"Extract vendor, total amount and due date. Attachments: {names}\n{text[:4000]}",
                                 json_schema=SCHEMA, max_output_tokens=100).json)
        done.add(m["id"])
    now = datetime.now(ZoneInfo("Europe/London"))
    if now.weekday() == 4 and now.hour == 16 and found:  # Friday 4pm: send the week's list
        notify.email_me(f"{len(found)} invoices this week",
                        "\n".join(f"{i['vendor']}: {i['amount']}, due {i['due_date']}" for i in found))
        found = []
    state.set("invoices", found)
    state.set("done", sorted(done)[-1000:])
    return {"pending": len(found)}

FAQ

Common questions

Which fields does it extract?
Typically supplier name, invoice number, date, due date, currency and total amount, with tax where the document shows it. You can ask for extra fields, such as purchase order numbers, and approve the change. Adjusting fields is a quick change.
How accurate is the extraction?
Clean digital PDFs read very well, while photos or scans of poor quality are less reliable. The weekly email makes it easy to spot-check a few, and anything that looks wrong can be corrected against the original.
Does it work with receipts that are not attachments?
This version looks for attachments matching invoice or receipt. Receipts written in the body of the email need a variation that reads the message text instead, which your AI assistant can set up. That version only needs different parsing.
What permissions does it need?
read. 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 checks. Checks that find nothing new 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 a weekly list of invoices from your inbox” from your assistant

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