Automated Multi-Stage Bill Processing from Dext to QuickBooks Online (n8n)

Streamline accounts payable with intelligent vendor matching and automated attachment syncing using n8n workflows.

Tools: DextQuickBooks

Platform: n8n

Short Answer

A self-hosted or cloud-based n8n workflow that triggers on Dext publication, cross-references QuickBooks vendors, creates missing records, and pushes high-fidelity financial data with the source PDF attached automatically.

The Problem

Manual entry of supplier invoices leads to human error and delayed financial reporting. While Dext extracts data, a direct integration lacks the custom logic needed for multi-step approvals, automated vendor creation, and centralized error logging required by complex accounting teams.

The Outcome

A self-hosted or cloud-based n8n workflow that triggers on Dext publication, cross-references QuickBooks vendors, creates missing records, and pushes high-fidelity financial data with the source PDF attached automatically.

Step-by-Step Guide

1. **Establish Credentials**: In n8n, navigate to 'Credentials' and setup 'QuickBooks Online OAuth2'. For Dext, create a 'Header Auth' credential using your Dext API Key. 2. **Setup Webhook Node**: Add a Webhook Node as the trigger. Set the HTTP Method to 'POST'. Copy the URL into Dext's outbound webhook settings for the 'Item Published' event. 3. **Extract & Cleanse**: Add a 'Set' or 'Edit Image' node to map incoming Dext JSON. Use expressions to format the date `{{ $json.date.toDate().toISOString() }}` and ensure currency codes match ISO standards. 4. **Vendor Verification**: Add a 'QuickBooks Online' node. Select Resource 'Vendor' and Operation 'Get All'. Use a Filter in the node to search where `DisplayName` equals the Dext 'Supplier Name'. 5. **Conditional Branching (IF Node)**: Add an 'IF' node to check if the QuickBooks vendor search returned any results. 6. **Create Missing Vendor**: If the IF node is 'False', add another QuickBooks node to 'Create' a Vendor using the supplier name and details from Dext. 7. **Dynamic Transaction Creation**: Add a QuickBooks node to 'Create Bill' (for unpaid) or 'Create Purchase' (for paid). Link the Vendor ID from the previous steps using `{{ $node["Find Vendor"].json["Id"] }}`. 8. **Binary Data Fetch**: Use an 'HTTP Request' node to GET the Dext 'Image URL'. Set the 'Response Format' to 'File' to bring the PDF into n8n's binary buffer. 9. **Attach Document**: Add a QuickBooks node with the 'Upload Attachable' operation. Map the 'File Content' from the previous binary node and link it to the Bill ID created in Step 7. 10. **Global Error Trigger**: Create a separate 'Error Trigger' node connected to a Slack or Email node to notify you if the QuickBooks API returns a 400 (validation error) or 429 (rate limit).