Shopify Order Sync to QuickBooks Online (n8n)

Automate revenue recognition and customer reconciliation using n8n's node-based workflow engine.

Tools: ShopifyQuickBooks

Platform: n8n

Last verified: 1/10/2026

Short Answer

A fully automated reconciliation loop where every paid Shopify order generates a corresponding Sales Receipt in QuickBooks. This ensures real-time bookkeeping, accurate sales tax tracking, and consistent customer data without manual intervention.

The Problem

Manual entry of Shopify orders into QuickBooks is time-consuming and prone to human error, leading to mismatched tax records and inaccurate financial reporting. High-volume stores struggle to handle line-item iteration and customer deduplication across platforms.

The Outcome

A fully automated reconciliation loop where every paid Shopify order generates a corresponding Sales Receipt in QuickBooks. This ensures real-time bookkeeping, accurate sales tax tracking, and consistent customer data without manual intervention.

Step-by-Step Guide

1. **Setup Shopify Webhook Trigger**: Add a 'Shopify Trigger' node. Set the 'Resource' to 'Order' and 'Event' to 'order/paid'. Authenticated via Access Token. 2. **Initialize QuickBooks Credentials**: Add a 'QuickBooks Online' node. Use n8n's OAuth2 credential type to link your Sandbox or Production environment. 3. **Identify/Create Customer**: Add a QuickBooks node with the 'Get Many' action. Use an expression `{{ $json.customer.email }}` to filter. Follow this with an 'If' node: if no results, use a QuickBooks node with 'Create' action to add the customer. 4. **Handle Multiple Line Items**: Use the 'Split Out' node (or 'Item Lists' node) to iterate through the `line_items` array from the Shopify payload. This ensures high-volume orders map correctly. 5. **Format Data for QB**: Use a 'Set' node or 'Code' node to map Shopify's `total_price` and `total_tax`. Important: Convert Shopify's string-based amounts to numbers using `parseFloat()` in n8n expressions. 6. **Create Sales Receipt**: Connect the QuickBooks node using the 'Sales Receipt: Create' action. Link the Customer ID from Step 3 and the Line Items from Step 4. 7. **Tax & Shipping Logic**: Map Shopify's `shipping_lines[0].price` to a specific QuickBooks Shipping Service Item ID to ensure COGS are tracked. 8. **Implement Duplicate Protection**: Use an 'n8n Cache' node or a simple check against the Shopify `order_number` in QuickBooks' `DocNumber` field to prevent double-posting. 9. **Configure Error Node**: Create a separate 'Error Trigger' workflow. In the main workflow settings, set 'Error Workflow' to this new flow to catch API timeouts or expired tokens.

Data Mapping

| Shopify Field | QuickBooks Field | n8n Expression / Logic | Requirement | | :--- | :--- | :--- | :--- | | `customer.email` | `PrimaryEmailAddr` | `{{ $json["customer"]["email"] }}` | Required | | `order_number` | `DocNumber` | `{{ $json["order_number"].toString() }}` | Required | | `total_price` | `TotalAmt` | `{{ parseFloat($json["total_price"]) }}` | Required | | `line_items[].sku` | `ItemRef` | Use `.find()` to match QuickBooks Item ID | Required | | `line_items[].qty` | `Qty` | `{{ $json["quantity"] }}` | Required | | `total_tax` | `TxnTaxDetail` | Set Tax Code strictly based on Region | Optional |

Gotchas & Failure Modes

* **Rate Limiting**: QuickBooks API has strict concurrency limits. Use the n8n 'Wait' node or 'Execute in Batch' (set to 1) if processing large historical imports. * **Schema Mismatch**: Shopify provides prices as strings (e.g., "20.00"). QuickBooks expects numbers. Always use `{{ Number($json.field) }}` in n8n expressions. * **Customer Names**: QuickBooks requires a unique 'Display Name'. If mapping just from Shopify, append the Email to the Name to avoid 'Duplicate Name' errors in QB. * **Global vs US Tax**: If using a non-US QuickBooks account, tax behaves differently. You must provide a `TaxCodeRef` rather than just a total amount.

Verification Checklist

- [ ] Trigger a 'Test' event in the Shopify node and verify the JSON structure. - [ ] Ensure the 'Customer Search' logic returns an ID, not an empty array. - [ ] Check 'Execution Log' in n8n to ensure the QuickBooks node status is 201 (Created). - [ ] Log into QuickBooks and verify the Sales Receipt matches the Shopify Order Number. - [ ] Test an order with multiple different SKUs to ensure the 'Split Out' node works.

Ready to Automate?

Build this automation with n8n in minutes.