// case study
Meta Invoice
Automation
n8n · AI · Google Drive · Google Sheets
A fully automated pipeline that watches a shared Google Drive for Meta ad invoices, extracts every relevant field using AI, and consolidates everything into a live report — without anyone touching a spreadsheet.
// the problem
Digital agencies running Meta campaigns for multiple clients deal with a flood of PDF invoices every month — one per ad account, per billing cycle. Meta can generate 30–50 invoices a month for a mid-sized agency. Someone had to open each PDF, copy the data into a spreadsheet, and reconcile totals. That process was slow, error-prone, and completely manual.
The goal: zero human intervention from invoice arrival to consolidated report.
// pipeline
// how it works
Invoice lands in Drive
Meta generates PDF invoices per ad account. The client drops them into a shared Google Drive folder — no other action required.
n8n detects the new file
A Google Drive trigger in n8n fires as soon as a new file appears in the monitored folder. No polling interval — event-driven.
AI reads the PDF
The invoice is passed to an AI node with a structured extraction prompt. It identifies client name, ad account ID, billing period, line items, taxes, and total.
Data is validated & normalized
A code node cleans and normalizes the extracted fields — currency formatting, date standardization, null checks — before writing anywhere.
Report is updated automatically
Structured rows are appended to a Google Sheet. Each invoice becomes one row. The client gets a live, consolidated report across all accounts and months.
// tech stack
Orchestration
n8n
Trigger
Google Drive API
AI parsing
OpenAI GPT-4o
Output
Google Sheets
Format
PDF invoices
Hosting
n8n Cloud
// results
~6 hrs
saved per month per client
0
manual data entry steps
100%
invoice coverage across accounts
<30 s
from upload to report row