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.
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
Every 10 to 15 minutes ClickRuntime checks your Google Drive invoices folder for files added since its last check.
AI reads each PDF or image and pulls out the supplier, date, total and VAT.
The results are put into a table with one row per file.
The table is emailed to you, ready to paste into your bookkeeping.
Before it runs live
- Connect Google Drive
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
- 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
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?
Which fields can it pull out?
Should I check the extracted numbers before paying anything?
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
Get a summary of each new document
When a document or transcript lands in a folder, you get an email with its key points, decisions and action items.
See how it worksTranslate new documents in a folder
Each document added to a folder gets a translated copy next to it.
See how it worksResize and watermark new photos
Photos dropped into a folder are resized, compressed and watermarked into a web-ready folder.
See how it worksKeep exploring
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.