n8n

How to Automate Google Drive Invoice Capture?

Turn new files in Google Drive into clean invoice records in Airtable. The flow finds new invoices, pulls out line items, and saves everything without manual typing. It is great for finance teams that receive invoices in a shared folder.

Here is how it works. A Google Drive trigger watches a chosen folder and starts when a file is added. n8n downloads the file and sends it to LlamaParse with a webhook callback. The webhook returns parsed text. A prompt guides OpenAI to extract vendor data, totals, taxes, and a list of line items. A small code step builds a structured array, cleans numbers, and links each item to its invoice. Then the flow creates an invoice in Airtable and adds each line item to a linked table.

You need a Google Drive folder for invoices, an Airtable base with Invoices and Line Items tables, and API keys for LlamaParse and OpenAI. Once set up, most invoices go from upload to database in a few minutes, cutting data entry time and mistakes. Use it for accounts payable, spend tracking, and vendor reporting.

What are the key features?

  • Google Drive trigger watches a specific folder and starts on new files
  • File download from Drive and multipart upload to LlamaParse
  • Webhook receives parsed results from LlamaParse asynchronously
  • Prompt based OpenAI step extracts supplier details, totals and line items
  • Code step cleans values, builds arrays and prepares records for Airtable
  • Airtable node creates the invoice record in the Invoices table
  • Line items are added to the Line Items table and linked to the invoice

What are the benefits?

  • Reduce manual entry from 30 minutes to 3 minutes per invoice
  • Automate over 90 percent of repetitive data entry for invoices
  • Improve data accuracy by up to 80 percent by removing retyping
  • Handle up to 5 times more invoices without adding headcount
  • Connect Google Drive, LlamaParse, OpenAI and Airtable in one flow
  • Speed up month end close with structured and searchable records

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Google Drive, LlamaParse, OpenAI and Airtable. See the Tools Required section above for links to create accounts with these services.
  3. In n8n, open the Google Drive Trigger node. Connect your Google Drive account or click Create new credential and follow the on screen steps. Choose the folder that holds your invoices and keep polling every minute.
  4. Open the Google Drive node and confirm the operation is Download and the File ID is mapped from the trigger item. This ensures the correct file is pulled.
  5. Create a LlamaParse API key in your LlamaIndex Cloud account. Open the Upload File HTTP Request node and set the Authorization header to Bearer YOUR_API_KEY. Keep content type as multipart form data.
  6. Open the Webhook node and copy the Production URL. In the Upload File node body parameters, set webhook_url to this Production URL so LlamaParse can send results back to n8n.
  7. Open the Set Fields node to review the prompt text. Adjust the prompt to match your field names if needed, keeping the request for line items, quantities, unit prices and amounts.
  8. In the OpenAI node, click Create new credential, choose API Key, and paste your OpenAI key from the official API page. Save and confirm a successful connection.
  9. In Airtable, create a Personal Access Token with data read and write on the target base. In the Create Invoice and Create Line Item nodes, create a new Airtable credential with this token, then select your base and the Invoices and Line Items tables. Map fields for vendor, dates, totals, quantities, unit prices and the invoice link.
  10. Run a test by uploading a sample invoice PDF to the watched Google Drive folder. Check Executions in n8n to confirm the trigger fired, the webhook returned data, and records were created in Airtable.
  11. If records do not appear, verify the webhook URL is public, confirm your LlamaParse API key is set in the Authorization header, check file size and type, and review the OpenAI response. Adjust the prompt or field mappings if line items do not parse correctly.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Airtable

Sign up

Free (1,000 API calls / mo)

Google Drive

Sign up

Drive API: $0 (no additional cost; quota-limited)

LlamaParse

Sign up

Free plan: API access + 10,000 free credits at signup; pay-as-you-go $1/1,000 credits (Balanced ≈ 3 credits/page)

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Credits:
Created by Mark Shcherbakov from 5minAI. Setup guide: YouTube video

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.