Automated Accounts Payable Processing via Docsumo and Xero (Make.com)

Streamline invoice extraction and bill creation using Make.com’s advanced data transformation and array handling.

Tools: DocsumoXero

Platform: Make.com

Short Answer

A fully automated workflow in Make.com that triggers upon document validation in Docsumo. It intelligently matches vendors, handles complex line items via iterators, creates a draft bill in Xero, and attaches the original document for audit compliance.

The Problem

Manual data entry of invoices into Xero is time-consuming and prone to human error, especially when dealing with multi-line item bills. Businesses struggle with backlogs and mismatched totals when processing high volumes of paper or PDF receipts.

The Outcome

A fully automated workflow in Make.com that triggers upon document validation in Docsumo. It intelligently matches vendors, handles complex line items via iterators, creates a draft bill in Xero, and attaches the original document for audit compliance.

Step-by-Step Guide

1. **Create Webhook in Make.com**: Add a 'Docsumo - Watch V2 Documents' module. Copy the unique Webhook URL provided. 2. **Configure Docsumo**: Log in to Docsumo, go to 'Settings > Integrations', and paste the Make.com Webhook URL under the 'Post Requests' section for the 'Validated' event. 3. **Extract Sample Data**: Run the Make scenario once and process a document in Docsumo to populate the data structure in Make. 4. **Search Xero Contact**: Add the 'Xero - List Contacts' module. Use a filter in the module settings to search by name: `Name = {{1.vendor_name}}`. 5. **Handle Vendor Logic**: Add a 'Router'. If the Xero contact search returns 0 results, add a 'Xero - Create a Contact' module. Otherwise, proceed to the next step. 6. **Iterate Line Items**: Docsumo sends items as an array. Add a 'Make - Iterator' module and map the `Line Items[]` array from Docsumo into it. This allows Xero to process each row individually. 7. **Transform Dates**: In the 'Xero - Create a Bill' module, use the `parseDate()` function to ensure Docsumo's date format (e.g., YYYY-MM-DD) matches Xero's requirements: `parseDate(1.date; "YYYY-MM-DD")`. 8. **Map Bill Fields**: In the 'Create a Bill' module, map 'Contact ID' from the previous search/create steps, and use the Iterator's output for the 'Line Items' fields (Description, Quantity, Unit Amount). 9. **Attach Original File**: Add 'Xero - Upload an Attachment' module. Use the 'Document ID' from the bill creation and the 'Original File URL' from Docsumo to link the source PDF to the Xero record. 10. **Error Handling**: Right-click the Xero Bill module and select 'Add error handler'. Use a 'Break' or 'Rollback' instruction to prevent partial data entry if the API connection drops.