Templates / Extract PDF report tables into Google Sheets with Gmail, OpenAI and Slack

Extract PDF report tables into Google Sheets with Gmail, OpenAI and Slack

Ready for 3.0

by Jessy Mariau ✓ · 2 views · created 2026-09-08 · Document Extraction, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 15 nodes and runs on Gmail events. Along the way it connects Gmail, OpenAI Chat Model, Google Sheets and Slack.

How it runs

Trigger: On Gmail events.

  1. Report Settings (Edit Fields (Set)): sets or maps fields
  2. Only PDF Attachments (Filter): keeps only the items that match a condition
  3. PDF To Text (Extract from File): extracts data from a file
  4. Extract Report Table (Basic LLM Chain): sends a prompt to an LLM, with model: Extraction Model; output parser: Report Schema
  5. Reconcile Totals (Code): runs custom JavaScript code
  6. Did It Reconcile? (If): checks a condition and branches into true / false
  7. Split Line Items (Split Out): splits a list into separate items
  8. Prepare Mismatch Alert (Edit Fields (Set)): sets or maps fields
  9. Flatten Line Item (Edit Fields (Set)): sets or maps fields
  10. Flag For Review (Google Sheets): uses Google Sheets

…plus 2 more steps. See the full node list below.

Services it uses

GmailOpenAI Chat ModelGoogle SheetsSlack

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (12)

From the author

Quick overview I stopped trusting a model to add up its own numbers, so this one checks its work in plain code. It reads the table off a PDF, sums the line items in JavaScript, and only writes to your books when that sum matches the printed total. How it…

Excerpt from Jessy Mariau's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.