Skip to content

Every 15 minutes

Turn invoice PDFs in Drive into Airtable rows

Each invoice or receipt you save to a Drive folder becomes an Airtable record with vendor, number, date, total and line items.

Runs
Every 15 minutes
Apps
Airtable, Google Drive
AI
Yes, uses the built-in AI allowance
Access
Drive read; Airtable write

Send this to your assistant

Create a ClickRuntime automation: when a new invoice PDF lands in my Drive 'Invoices' folder, pull out the vendor, invoice number, date, total and line items, and add them to my Airtable 'Invoices' table with the Drive link.

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

A small agency's office manager saves every supplier invoice and receipt to a shared Drive folder. At month end the bookkeeper needs a list with vendor, date and amount for each one, so the office manager opens every PDF and types the figures into Airtable. It takes most of a day, and a mistyped total is only found when the numbers do not add up.

Reading each PDF as it lands and writing the figures into Airtable means the month-end list is already there. The bookkeeper checks it against the files instead of building it from scratch, and the link on each row opens the original.

What you get out of it

  • No retyping at month end

    Vendor, number, date and total are filled in as each invoice is saved, so the list is ready when the bookkeeper asks.

  • Line items are kept too

    Each record includes the line items as text, which helps when you need to split costs across clients or projects.

  • The original is one click away

    Every row links to the PDF in Drive, so checking a figure means opening the file, not searching for it.

  • Each file is read once

    The newest file time is remembered, so saving more invoices never re-imports the old ones.

How it works

What happens, step by step

  1. Every 15 minutes, ClickRuntime checks your Invoices folder in Drive for new PDFs.

  2. It downloads each new file and reads the text.

  3. AI picks out the vendor, invoice number, date, currency, total and line items.

  4. A record is created in your Airtable Invoices table with those details and a link to the PDF.

  5. The newest file time is remembered, so each invoice is read once.

Before it runs live

  • Connect Airtable
  • Connect Google Drive

What you get

RunsEvery 15 minutes
Turn invoice PDFs in Drive into Airtable rowstoday, 9:00Succeeded
Airtable · InvoicesFabrikam Print Ltd · INV-2291 · 2026-10-14 · GBP 642.00 Business cards x500 - 120.00; Brochures A5 x1000 - 522.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 Airtable and 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.
parse_invoices_and_receipts_from_drive_into_airtable.pyexample
import io
from pypdf import PdfReader
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, ai, state, report_fetched
BASE_ID, FOLDER_ID = "appXXXXXXXXXXXXXX", "1FolderIdOfInvoices"
SCHEMA = {"type": "object", "properties": {"vendor": {"type": "string"}, "number": {"type": "string"},
          "date": {"type": "string"}, "currency": {"type": "string"}, "total": {"type": "number"},
          "lines": {"type": "string"}}, "required": ["vendor", "number", "date", "total"]}
@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_ID}' in parents and mimeType = 'application/pdf' and createdTime > '{since}'",
                               orderBy="createdTime", fields="files(id,name,createdTime,webViewLink)").execute()["files"]
    report_fetched(len(files))
    if not files:
        return {"new": 0}
    headers = {"Authorization": f"Bearer {credentials.connection('airtable', 'work')}"}
    for f in files:
        pdf = PdfReader(io.BytesIO(drive.files().get_media(fileId=f["id"]).execute()))
        text = "\n".join(p.extract_text() or "" for p in pdf.pages)[:8000]
        inv = ai.generate(text, json_schema=SCHEMA, max_output_tokens=500,
                          system="Extract invoice fields. Date as YYYY-MM-DD. Lines as 'description - amount' per line.").json
        http.post(f"https://api.airtable.com/v0/{BASE_ID}/Invoices", headers=headers, json={"typecast": True,
                  "records": [{"fields": {"Vendor": inv["vendor"], "Invoice number": inv["number"], "Date": inv["date"],
                               "Currency": inv.get("currency", ""), "Total": inv["total"], "Line items": inv.get("lines", ""),
                               "File": f["webViewLink"]}}]}).raise_for_status()
        state.set("since", f["createdTime"])
    return {"new": len(files)}

FAQ

Common questions

What about scanned paper receipts?
A photo or scanned PDF has no text layer to read. Those files are still added with their name and link and marked for manual entry. Invoices sent as PDFs from accounting tools are read fully.
How are currencies handled?
The currency shown on the invoice is saved in its own field alongside the total, so mixed-currency months stay clear.
Can it catch the same invoice saved twice?
Yes. Before creating a record it can look for the same vendor and invoice number in Airtable and skip the duplicate. Ask your AI assistant to add that check.
What permissions does it need?
Drive read; Airtable write. 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 “Turn invoice PDFs in Drive into Airtable rows” from your assistant

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