Automated Multi-Step Bill Processing and Approval (Make.com)

Streamline high-value document verification and accounting entry using Make.com's advanced routing and logic.

Tools: DextXero

Platform: Make.com

Short Answer

A hands-off bookkeeping workflow where documents are automatically retrieved from Dext, filtered by value, enriched with Xero Tracking Categories, and posted as bills with original file attachments included for audit compliance.

The Problem

Manual entry from Dext to Xero often lacks oversight for high-value transactions and project-specific categorizations. Standard syncs don't allow for custom approval layers or complex data transformations required for project-based accounting.

The Outcome

A hands-off bookkeeping workflow where documents are automatically retrieved from Dext, filtered by value, enriched with Xero Tracking Categories, and posted as bills with original file attachments included for audit compliance.

Step-by-Step Guide

1. **Create Scenario**: Log in to Make.com and create a new scenario titled 'Dext to Xero Professional Sync'. 2. **Dext 'Watch Items' Module**: Add the Dext module and select the 'Watch Items' trigger. Connect your account using OAuth2 and set the 'Status' to 'Ready' to ensure only OCR-ready data is processed. 3. **Add Router**: Insert a Router module to split paths based on transaction value. Set a filter on the top path: `Total Amount` (Dext field) greater than `1000` for manual approval steps. 4. **Xero 'Search Contacts'**: On the main path, add a Xero 'Search for Contacts' module. Map the `Supplier Name` from Dext to the `Name` field in Xero to prevent duplicate contact creation. 5. **Xero 'Create a Contact' (Conditional)**: Use a filter after the search module (`Contact ID` does not exist) followed by a 'Create a Contact' module using the `Supplier Name` data. 6. **Xero 'Create a Purchase OR Bill'**: Add the 'Create a Bill' module. Map `Item Reference` to `Reference`, `Total Amount` to `Total`, and use the `formatDate()` function to align Dext's date with Xero's requirement: `formatDate(Date; YYYY-MM-DD)`. 7. **Internal Project Mapping**: Use the `switch()` function in the 'Line Item' mapping to assign Xero Tracking Categories: `switch(Description; #ProjectA; UUID_ALPHA; #ProjectB; UUID_BETA; UUID_DEFAULT)`. 8. **Dext 'Download a File'**: Add the Dext 'Download a File' module. This is critical as it retrieves the actual document binary, not just the URL. 9. **Xero 'Upload an Attachment'**: Connect this to the 'Create a Bill' module. Map the `Bill ID` from step 6 and use the file buffer from step 8 to attach the PDF/Image. 10. **Error Handling**: Right-click the Xero 'Create a Bill' module and select 'Add error handler'. Use the 'Rollback' or 'Break' directive to ensure failed posts are flagged for manual review rather than lost in the system.

Data Mapping

| Dext Source Field | Xero Destination Field | Transformation / Function | Required? | | :--- | :--- | :--- | :--- | | `Supplier Name` | `Contact Name` | `ifempty(Name; "New Supplier")` | Yes | | `Invoice Number` | `Reference` | Raw Data | Yes | | `Total Amount` | `Total Amount` | `parseNumber(Total)` | Yes | | `Date` | `Date` | `formatDate(Date; YYYY-MM-DD)` | Yes | | `Category` | `Account Code` | `map()` or Lookup Table | Yes | | `Currency` | `Currency` | Raw Data (ISO Code) | Yes | | `File Binary` | `Attachment` | From 'Download a File' Module | No |

Gotchas & Failure Modes

• **File Buffers**: In Make.com, if you don't use the 'Download a File' (Dext) module before the 'Upload Attachment' (Xero) module, the file will be corrupt (you cannot just map the File URL). • **Rate Limiting**: Use the 'Sleep' module or set 'Max Number of Cycles' in Scenario Settings if processing more than 60 bills per minute to avoid Xero's API rate limits. • **Status Persistence**: Ensure you mark the item as 'Published' or 'Archived' in Dext at the end of the scenario by adding an additional 'Update Item' module to prevent the same bill from being fetched in the next execution cycle. • **Tax Validation**: Xero requires specific Tax Type IDs. Mapping 'Tax 20%' as a string will fail; you must map the Xero-specific Tax Code (e.g., 'INPUT001').

Verification Checklist

- [ ] **Run Once Test**: Click 'Run Once' and upload a test receipt to Dext. Monitor the 'bubbles' in Make to see data flow. - [ ] **Contact Logic**: Verify that if a supplier exists, the scenario uses the existing Contact ID instead of creating a duplicate. - [ ] **Attachment Check**: Open the created Bill in Xero and ensure the '1' icon appears in the file attachment section. - [ ] **Date Format**: Check the 'Environment' logs to ensure `2023-12-01T00:00:00Z` was correctly converted to `2023-12-01`. - [ ] **Data Consistency**: Ensure the 'Net' + 'Tax' = 'Total' exactly; otherwise, Xero will reject the bundle.

Ready to Automate?

Build this automation with Make.com in minutes.