Squarespace E-commerce to QuickBooks Online Sync (n8n)
Automate sales receipts, customer creation, and ledger synchronization using n8n's visual workflow engine.
Tools: Squarespace → QuickBooks
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.
Data Mapping
| Squarespace Field | QuickBooks Field | n8n Expression / Transformation | Required? |
| :--- | :--- | :--- | :--- |
| `customerEmail` | `PrimaryEmailAddr` | `{{ $json.customerEmail }}` | Yes |
| `orderNumber` | `DocNumber` | `{{ $json.orderNumber }}` | Yes |
| `totalPrice` | `TotalAmt` | `{{ $json.totalPrice.value / 100 }}` (if in cents) | Yes |
| `lineItems[0].variant.sku` | `Line.SalesItemLineDetail.ItemRef` | `{{ $json.sku }}` | Yes |
| `billingAddress.firstName` | `DisplayName` | `{{ $json.firstName + ' ' + $json.lastName }}` | Yes |
| `createdOn` | `TxnDate` | `{{ $now.toFormat('yyyy-MM-dd') }}` | No (Defaults to now) |
Gotchas & Failure Modes
• **Rate Limiting**: QuickBooks API has strict limits. If processing bulk historical orders, use n8n's 'Wait' node or 'Split In Batches' node (set to ~20 items) to avoid 429 errors.
• **Data Type Mismatches**: Squarespace often sends currency as strings. Use `Number()` or `.toFloat()` in n8n expressions to ensure QuickBooks receives decimals.
• **SKU Mapping**: QuickBooks requires an internal `ItemRef` (ID), not just the SKU string. You may need a 'QuickBooks: Get Many Items' node at the start of the workflow to build a lookup table.
• **Tax Center Conflict**: Ensure 'Automated Sales Tax' in QuickBooks is either off or properly mapped to the tax codes coming from Squarespace to avoid 'Invalid Tax Code' errors.
Verification Checklist
- [ ] Webhook node is set to 'Listen for Test' and successfully captures a Squarespace 'Test' event.
- [ ] Expression editor shows green 'Valid' status for all QuickBooks ID mappings.
- [ ] 'If' node correctly branches between 'Create Customer' and 'Use Existing Customer' paths.
- [ ] Execution log shows a 201 Created response from the QuickBooks Sales Receipt node.
- [ ] Sales Receipt in QuickBooks reflects the exact dollar amount and SKU found in the Squarespace dashboard.
Ready to Automate?
Build this automation with n8n in minutes.