Google Sheets to QuickBooks Expense Synchronization - n8n Workflow

Automate expense reporting from Google Sheets directly into QuickBooks Online using this powerful n8n workflow. Includes syncing vendors and chart of accounts using custom n8n templates.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Accountants & Bookkeepers: Professionals seeking to streamline data entry and automatically transfer bank transactions from spreadsheets to QuickBooks.

  • Small Business Owners: Users who categorize their expenses in Google Sheets and need a fast, error-free method to sync financial data to QBO.

  • n8n Developers: Anyone looking for advanced examples of using custom HTTP requests within an n8n workflow for complex QuickBooks API integrations.

Overview

Manually entering expenses into accounting software is tedious and error-prone. This specialized n8n workflow solves this by creating a robust synchronization bridge between a Google Sheets template and QuickBooks Online. The core value of this n8n template is not just uploading transactions, but also ensuring all necessary metadata (Vendor IDs, Account IDs, etc.) are synchronized first.

This setup allows non-accounting staff to categorize transactions in a simple spreadsheet environment while the n8n automation handles the secure and compliant submission to QuickBooks. By leveraging multiple dedicated n8n node types, this workflow ensures data integrity and provides clear error reporting back into the spreadsheet itself, dramatically improving financial reporting efficiency.

How it Works

The process begins with the execution of the manual n8n trigger, initiating three key parallel operations:


  1. Account & Vendor Setup: The workflow first runs two simultaneous setup routines. It pulls the active Chart of Accounts from QuickBooks via a custom HTTP request n8n node, splits the results, and updates a dedicated 'Accounts' sheet in Google Sheets. Concurrently, it reads new Vendors from the Google Sheet, creates them in QuickBooks using the quickbooks n8n node, fetches all active vendors (including newly created ones), and updates the 'Vendors' sheet with their official QuickBooks IDs.

  2. Expense Extraction: The n8n workflow then moves to the 'Expenses' sheet, using a googleSheets n8n node to retrieve new transactions that do not yet have a 'Transaction ID' recorded.

  3. Validation and Posting: An IF n8n node checks that the essential fields (Vendor and an empty Transaction ID) are present. Valid items are passed to an Add an Expense to QBO HTTP Request n8n node, which formats the expense data (Date, Vendor ID, Asset ID, Expense ID, Total) into a Purchase API call.

  4. Result Handling: If the QBO API call succeeds, the resulting Purchase ID is recorded back into the Google Sheets 'Transaction ID' column via an update operation. If the API call fails (handled by the onError setting), the error message is recorded in the 'Message' column using a dedicated googleSheets n8n node, ensuring full traceability.

Installation Guide

To deploy and use this n8n workflow effectively, follow these steps:


  1. Import the n8n Template: Copy the provided JSON and import it directly into your n8n instance as a new workflow.

  2. Google Sheets Credentials: Configure the Google Sheets OAuth2 API credentials. Ensure this credential has read/write access to the specific expense tracking spreadsheet defined in the various googleSheets n8n node configurations.

  3. QuickBooks Credentials: Configure the QuickBooks OAuth2 API credentials. This must be connected to the correct sandbox or production environment.

  4. Set Realm ID: Locate the Set Realm ID for Custom API Call n8n node. Update the 'realmID' assignment with your specific QuickBooks Realm ID. This is crucial for custom API calls to function correctly.

  5. Sheet URL Configuration: Update all googleSheets n8n node references (Vendors, Accounts, Expenses) to point to your specific Google Sheet document URL and sheet names/GIDs, ensuring column headers match the mapping used in the n8n template logic.

  6. Activate: Save the n8n workflow and run the manual n8n trigger to perform the initial Vendor and Account list synchronization before processing any expenses.

Node Details

When clicking ‘Execute workflow’ (manualTrigger n8n trigger): Initiates the entire synchronization process on demand, perfect for periodic batch processing.
Get New Vendors from Google Sheets (googleSheets n8n node): Reads vendor names from the designated 'Vendors' sheet in the Google Sheets template.
Create New Vendors in QuickBooks (quickbooks n8n node): Creates any vendors found in the sheet but missing in QBO. The configuration uses the Name field from the previous n8n node.
Get Active Vendors in QuickBooks (quickbooks n8n node): Retrieves all active vendors from QBO, which are then used to update the Google Sheet with their unique QBO Id.
Get Chart of Accounts (httpRequest n8n node): Uses a custom API call (select from Account where active=true) to fetch the necessary account reference IDs from QuickBooks, required for expense categorization.
Get New Expense Transactions (googleSheets n8n node): Reads transactions from the 'Expenses' sheet where the 'Transaction ID' column is empty, identifying pending items for upload.
Remove Empties (if n8n node): Acts as a critical logic gate, filtering items where the 'Transaction ID' is empty AND the required 'Vendor' field is not empty, ensuring only valid, uncategorized transactions proceed.
Add an Expense to QBO (httpRequest n8n node): This is the core transactional n8n node. It uses a POST request and complex JSON body mapping, using data from Google Sheets (Vendor ID, Asset ID, Expense ID) to create a Purchase (Expense) transaction in QuickBooks. It features error continuation to handle individual transaction failures gracefully.
Record Txn ID/Record Error Message (googleSheets n8n node): Handles the final stage, updating the source Google Sheet row with either the successful QuickBooks Transaction ID or the specific error message generated during the API call.

Related n8n Workflows

Free

Nodes: 9 Nodes
Updated: December 26 2025
View all
Created by
Rosh Ragel
Rosh Ragel

Featured*