Skip to content

Every 10–15 minutes

Pull invoice details out of PDFs in a folder

When you drop an invoice or statement into a folder, its key fields are pulled out and sent to you as CSV.

Runs
Every 10–15 minutes
Apps
Google Drive
AI
Yes, uses the built-in AI allowance
Access
read (drive.readonly), plus write for the CSV

Send this to your assistant

Create a ClickRuntime automation: every 15 minutes, check my Invoices Drive folder for new PDFs, pull out supplier, date, total and VAT, and email me a CSV row for each.

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

An accounts payable clerk drops supplier invoices into a Drive folder, and then retypes the same handful of fields into a spreadsheet: supplier name, invoice number, issue date, due date, net amount, VAT and total. A recruiter does the same with CVs, copying name, email, current employer and skills. Typing errors creep in, and a line that is read as 1,580 instead of 15.80 can slip through all the way to payment.

Every 10 to 15 minutes, ClickRuntime checks the folder for files it has not yet processed, downloads each one and pulls out its text. ClickRuntime's built-in AI then reads that text and returns the fields you asked for in a consistent layout. The results are emailed to you, or added to a CSV that is uploaded back to Drive.

It helps most where documents arrive in different layouts, which is exactly where fixed template-based scanners fail.

What you get out of it

  • No more retyping line by line

    The fields land in a row you can open in a spreadsheet or import into accounting software. A clerk who spent an afternoon on forty invoices now only reviews the output for anything that looks off.

  • Fewer costly keying errors

    A misplaced decimal or a transposed invoice number causes overpayments and duplicate payments that take weeks to unwind. Reading the values from the document itself removes the step where those mistakes usually appear.

  • Works across different layouts

    Suppliers each format invoices their own way. Because the AI reads the content instead of matching fixed positions, a new vendor's PDF does not need a template to be built before it can be handled.

  • A consistent shape for downstream tools

    Every file produces the same columns, in the same order, with dates in the same format. That makes imports, pivot tables and reconciliations work without the manual cleanup that mixed sources normally need.

  • Faster payment and shortlist decisions

    Invoices that are entered the same day catch early-payment discounts, and CVs that are summarized quickly mean good candidates are contacted before a competitor reaches them with an offer of their own.

How it works

What happens, step by step

  1. Every 10 to 15 minutes ClickRuntime checks your Google Drive invoices folder for files added since its last check.

  2. AI reads each PDF or image and pulls out the supplier, date, total and VAT.

  3. The results are put into a table with one row per file.

  4. The table is emailed to you, ready to paste into your bookkeeping.

Before it runs live

  • Connect Google Drive

What you get

RunsEvery 10–15 minutes
Pull invoice details out of PDFs in a foldertoday, 9:00Succeeded
Email · 2 new invoicesfile,supplier,date,total,vat INV-0931.pdf,Northwind Supplies,2026-10-14,1200.00,200.00

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 Google Drive 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_data_from_pdfs_and_images_dropped_in_a_folder.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
import base64
from clickruntime import on_trigger, report_fetched, credentials, state, ai, notify

FOLDER = "your-invoices-folder-id"
SCHEMA = {"type": "object", "properties": {k: {"type": "string"} for k in ("supplier", "date", "total", "vat")},
          "required": ["supplier", "date", "total", "vat"]}

@on_trigger
def run(event):
    drive = build("drive", "v3", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    since = state.get("since") or "2026-01-01T00:00:00Z"
    files = drive.files().list(q=f"'{FOLDER}' in parents and mimeType = 'application/pdf' and createdTime > '{since}'",
                               orderBy="createdTime", fields="files(id,name,createdTime)").execute()["files"]
    report_fetched(len(files))
    if not files:
        return {"summary": "Nothing new"}
    rows = ["file,supplier,date,total,vat"]
    for f in files:
        # Copy as a Google Doc so Drive runs OCR, then read it back as text.
        doc = drive.files().copy(fileId=f["id"], body={"mimeType": "application/vnd.google-apps.document"}).execute()
        text = drive.files().export(fileId=doc["id"], mimeType="text/plain").execute().decode()[:6000]
        drive.files().delete(fileId=doc["id"]).execute()
        d = ai.generate("Extract supplier, invoice date, total and VAT:\n" + text, json_schema=SCHEMA, max_output_tokens=120).json
        rows.append(",".join([f["name"], d["supplier"], d["date"], d["total"], d["vat"]]))
    notify.email_me(f"{len(files)} new invoices", "\n".join(rows))
    state.set("since", files[-1]["createdTime"])
    return {"invoices": len(files)}

FAQ

Common questions

Can it read scanned images, not just PDFs with selectable text?
It extracts text from files before the AI step, so clean scans and photos usually work, while blurry or skewed pictures read worse. If most of your documents are phone photos of receipts, test a few first and check the output against the originals.
Which fields can it pull out?
Any fields you can name. Typical ones are supplier, invoice number, dates, currency, subtotal, tax and total for invoices, or name, email, phone and role for CVs. If a field is not in a document, it is left blank instead of guessed.
Should I check the extracted numbers before paying anything?
Yes, treat the output as a fast first pass. AI reading can still misread an unclear total, so for payments it is sensible to compare totals against the original or add a rule that flags amounts above a limit for a person to approve.
What permissions does it need?
read (drive.readonly), plus write for the CSV. 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 “Pull invoice details out of PDFs in a folder” from your assistant

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