n8n

How to Automate Google Drive Invoice Data to Sheets?

Collecting invoice data by hand is slow and error prone. This automation watches a Google Drive folder, extracts key fields from each new invoice or receipt, and records clean data in Google Sheets. It suits finance and operations teams that want faster intake and clear tracking without extra effort.

You can start it in two ways. Click Test to run on demand, or rely on the Google Drive event that checks the folder every minute. The flow lists all files, reads the sheet to find already processed items, and filters by file id so only new documents move forward. Each new PDF or image is downloaded from Drive and sent to an OCR API. A small code step parses the JSON reply and maps vendor, totals, dates, and currency into columns in the sheet.

Setup needs a Google account for Drive and Sheets and an API key for the OCR service. After connecting the credentials, pick your folder and spreadsheet, then activate the workflow. Expect big time savings and better accuracy, often cutting manual entry by 80 percent or more. Common uses include invoice intake, expense receipts, and vendor bill capture for small and mid sized teams.

What are the key features?

  • Two start options: manual button and Google Drive new file trigger
  • Folder scan with a merge filter that skips files already listed in the sheet by id
  • Downloads PDF or image files from Google Drive for processing
  • Sends each file to an OCR API using a secure HTTP request with multipart upload
  • Parses the OCR JSON response into structured fields using a simple code step
  • Appends or updates rows in Google Sheets with file id, vendor, totals, dates, and currency

What are the benefits?

  • Reduce manual invoice entry from hours to minutes
  • Automate up to 90 percent of receipt and invoice data capture
  • Improve data accuracy by up to 95 percent versus manual typing
  • Connect Google Drive, an OCR API, and Google Sheets in one flow
  • Process new files every minute without manual checks
  • Scale to handle many more documents without extra staff

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, Google Sheets and RapidAPI. See the Tools Required section above for links to create accounts with these services.
  3. Open the Google Drive Trigger node and choose your target folder. In the credential dropdown, click Create new credential and complete Google OAuth. Select the folder to watch and keep the every minute check if you want near real time intake.
  4. Open the Load files from Google Drive and Download file nodes. Select the same Google Drive credential so both nodes access the same account and folder.
  5. Open the Get already processed rows from Sheets and Save OCR result into Sheets nodes. Create a new Google Sheets credential with Google OAuth, then choose the spreadsheet and sheet name you will use to store results.
  6. Open the HTTP Request node for OCR. In the credential dropdown choose Create new credential, pick HTTP Header Auth, and paste your API key from your RapidAPI account. Keep content type as multipart form and make sure the file field uses binary data from the download step. Leave settings to documentType invoice.
  7. Confirm the mapping in the Google Sheets write node. Ensure the id column receives the Google Drive file id and that vendor, totals, dates, and currency fields point to the parsed JSON values.
  8. If you see a disconnected manual trigger after import, draw connections from the manual trigger to both the Google Drive list node and the Google Sheets read node to enable the on demand path.
  9. Test the flow. Upload a sample PDF or image invoice to the Drive folder. Click Test workflow in n8n or wait for the Drive event. Check the Merge node output to verify only new files continue. Confirm a new row appears in the sheet with the expected fields.
  10. Troubleshoot common issues. If no row is written, verify file type is pdf, png, or jpg, check that the RapidAPI key is valid, and confirm your Google credentials have access to both the folder and the spreadsheet. Make sure the sheet has an id column to match against.
  11. Activate the workflow for ongoing runs. Monitor executions in n8n to review results and handle any errors that appear.

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.

Google Drive

Sign up

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

Google Sheets

Sign up

Free: $0 (Google Sheets API usage has no additional cost; quota limits apply)

RapidAPI

Sign up

Free APIs: $0 (platform supports free plans; typical cap 1,000 requests/hour and 500,000 requests / mo; quotas vary by API)

Credits:
YouTube video
Author: Anthony Sidashin
LinkedIn profile

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.