FlowStep
← All walkthroughs
Full libraryGoogle DriveOCRGeminiGoogle Sheets

Pull structured data out of PDFs and into a spreadsheet

Watch a Drive folder for new invoices, read them with OCR, use AI to pull out the fields you actually need, and land them in a spreadsheet ready for bookkeeping.

40 minAdvanced12 steps

What this looks like

One step on screen at a time. Read it, do it, tap Next.

Pull structured data out of PDFs and into a spreadsheet

Step 1 of 12

01 / 12Google Drive Trigger

Watch the folder for new PDFs

Create a workflow and add a Google Drive Trigger watching your invoices folder for new files.

Checkpoint

Dropping a test PDF into the folder fires the trigger.

Back
Next

Before you begin

Tick these off as you sort them. Stopping halfway to create an account is how a fifteen-minute build becomes an hour.

0 of 10 ready

Ticks are saved on this device, so you can come back to them.

  • Have ready

    Where invoices land — by upload, forwarding rule, or manual drag-and-drop. Keep it exclusive to documents you want extracted.

  • Account

    This walkthrough uses an OCR API reached over HTTP to turn scanned PDFs into readable text before anything else happens.

  • API key

    Found in your OCR provider's dashboard, used to authenticate the extraction request.

  • API key

    Used to read the OCR text and pull out the specific fields you want, since OCR alone only gives you raw text, not structure.

  • Have ready

    Columns matching the fields you want: InvoiceNumber, VendorName, InvoiceDate, TotalAmount, FileLink.

  • Account

    Used to watch the folder, download files, and write the extracted results.

  • Time

    The two AI steps take patience to prompt correctly — budget extra time for that.

The basics — ticked once, remembered everywhere

  • Account

    Either the hosted version or a self-hosted install. Everything here works the same on both — the only visible difference is the shape of your webhook URLs.

    Create a workspace
  • Know-how

    Adding a node, connecting two of them, and pressing Execute. If any of that is new, the free primer covers it in about ten minutes.

  • Credential

    You will paste at least one secret during setup. A password manager beats a notes app, and it stops you pasting a live key into a chat window by accident.

The shape of the workflow

The nodes you will end up with, left to right, in the order you add them.

Google Drive TriggerGoogle DriveHTTP RequestGeminiCodeIFGoogle SheetsSlack
The finished Pull structured data out of PDFs and into a spreadsheet workflow on the n8n canvas4 things to set here
  1. 1Google Drive Triggerthe trigger — everything starts here
  2. 2Google DriveDownload the file
  3. 3HTTP RequestRun OCR on the document
  4. 4GeminiExtract the fields you need with AI
The finished workflow on the n8n canvasTap to enlarge

Skip the node hunting

Import a starter file with every node for this build already on the canvas, named after its step and wired in order, each one carrying a sticky note with the values to enter. You still connect your own accounts and fill the fields — that is what the walkthrough takes you through — but you never start at a blank canvas.

In n8n: Workflows → Import from file.

Included with the library

What you will build

Jump straight to any step, or print the list and tick it off beside your n8n tab.

If something goes wrong

Everything ready?

Start walkthrough