n8n

How to Automate Gmail Receipt Logging to Sheets?

Turn emailed receipts into a clean expense log with no manual typing. Finance and operations teams that receive receipts by email can capture key details and store them in Google Sheets for quick reporting.

New emails are fetched from your Gmail inbox and screened by subject using a simple pattern that looks for words like expenses or receipt. If the subject matches, the first file attached is read by Mindee to pull out receipt data. The flow then builds a row with the date and a short description taken from the second part of the subject line. Finally, the record is appended to a Google Sheet so you have a running list of expenses you can sort and filter.

To set it up, connect Gmail with IMAP, Mindee with an API key, and Google Sheets with OAuth. Adjust the subject pattern to fit your naming rules and make sure your subject lines have two parts so the second part becomes the description. Expect faster logging, fewer copy paste mistakes, and a simple audit trail. This is useful for small teams, agencies, and any company that tracks reimbursements or company card purchases from emailed receipts.

What are the key features?

  • Reads new emails from Gmail inbox using IMAP
  • Filters messages by subject with a regex pattern for expenses or receipt
  • Parses the first attachment with Mindee to extract receipt data
  • Builds clean fields for date description and category with a Set node
  • Appends each expense as a new row in Google Sheets

What are the benefits?

  • Reduce manual entry from 60 minutes a week to 5 minutes
  • Improve data accuracy by 80 percent by removing copy paste errors
  • Connect Gmail Mindee and Google Sheets in one flow
  • Handle 5 times more receipts without extra staff
  • Create a consistent expense log ready for reviews and audits

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 Gmail, Google Sheets and Mindee. See the Tools Required section above for links to create accounts with these services.
  3. Open the Email Read IMAP node and in the credential dropdown click Create new credential, then follow the on screen steps to connect your Gmail account. In Gmail settings make sure IMAP is enabled. If your account uses two step verification, create an app password and use it for IMAP.
  4. Double click the Google Sheets node, click Create new credential, then grant access with your Google account when asked. Use a clear name for the credential so your team can recognize it later.
  5. Open the Mindee node, click Create new credential, then paste your API key from your Mindee dashboard. You can find the key in the API section after you sign in.
  6. In the Setup Variables node, edit the subject pattern to match your needs. Replace or add words so it finds your receipt emails. Consider correcting the word receipt if needed.
  7. Check the If node named Check subject to confirm it uses the variable from Setup Variables. The condition should match your chosen subject words.
  8. In the Mindee node, keep the first attachment setting so it reads the attached receipt file. Test with a clear PDF or image to get the best results.
  9. Open the Set column data node and verify the field mapping. The description is taken from the second part of the email subject. Use a subject format with two parts so this works well.
  10. In the Google Sheets node, pick your sheet and confirm the range A:E. Make sure the sheet has header columns that match your mapped fields.
  11. Send a test email to your Gmail inbox that includes the word expenses or receipt in the subject and attach a receipt file. Run the workflow and confirm a new row is added. If nothing is added, adjust the subject pattern, check IMAP access, or verify the attachment type.

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.

Gmail

Sign up

No cost: Personal Gmail (Gmail API has no usage-based pricing; quotas apply)

Google Sheets

Sign up

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

Mindee

Sign up

Starter: €44 / mo billed annually, 500 pages / mo (+€0.05 per additional page)

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.