Squarespace E-commerce to QuickBooks Online Sync (n8n)

Automate sales receipts, customer creation, and ledger synchronization using n8n's visual workflow engine.

Tools: SquarespaceQuickBooks

Platform: n8n

Short Answer

A fully automated pipeline where every Squarespace order triggers a real-time customer lookup, creates or updates the customer record in QuickBooks, and generates a detailed Sales Receipt with correct income account mapping and tax application.

The Problem

Manual entry of Squarespace orders into QuickBooks is time-consuming and prone to human error, leading to mismatched tax records and inventory discrepancies. Businesses often struggle to map disparate data formats between storefronts and accounting ledgers without manual intervention.

The Outcome

A fully automated pipeline where every Squarespace order triggers a real-time customer lookup, creates or updates the customer record in QuickBooks, and generates a detailed Sales Receipt with correct income account mapping and tax application.

Step-by-Step Guide

1. **Create Webhook in Squarespace**: Open n8n, add a 'Webhook' node, and set the HTTP Method to POST. Copy the URL and paste it into Squarespace (Settings > Advanced > Developer Tools > Webhooks) for the 'Order Created' event. 2. **Set Up Credentials**: In n8n, go to 'Credentials' and add 'QuickBooks Online OAuth2'. Follow the OAuth flow to authorize n8n access to your QuickBooks company file. 3. **Parse Incoming Order**: Use an 'Edit Fields' (formerly Set) node to extract specific fields like `customerEmail`, `totalPrice`, and line items from the Squarespace JSON payload. 4. **Search Existing Customer**: Add a 'QuickBooks Online' node. Select the action 'Get Many' for the Resource 'Customer'. Use an n8n expression to filter by Email: `{{ $json.customerEmail }}`. 5. **Logic Routing (IF Node)**: Add an 'If' node to check if the search returned an ID. If false, route to a QuickBooks 'Create' Customer node; if true, proceed with the existing ID. 6. **Map Line Items**: Use the 'Code' node or 'Item Lists' node to transform Squarespace's line item array into the specific format QuickBooks expects (e.g., mapping `sku` to `ItemRef` and calculating unit prices). 7. **Create Sales Receipt**: Add another QuickBooks node. Choose 'Create' Sales Receipt. Map the `CustomerRef` from step 5, and the Income Account ID (e.g., 'Sales of Product Income') as an expression. 8. **Handle Sales Tax**: Ensure the 'TaxCodeRef' matches your QuickBooks tax settings. Use a 'Lookup' node if Squarespace tax names differ from QuickBooks tax codes. 9. **Implement Error Handling**: Create a 'Sticky Note' and an 'Error Trigger' node. If any node fails (e.g., QuickBooks API limit hit), route the error to Slack or Email so no sales records are lost.