Short Answer
A seamless, hands-free workflow where validated documents in Docsumo appear instantly in Xero as structured Draft Bills, complete with line-item details and the original PDF attached for auditing.
The Problem
Manual entry of invoice data is prone to human error, creates processing bottlenecks, and delays financial visibility. Specifically, handling multi-line invoices and ensuring vendor consistency in Xero requires significant administrative overhead.
The Outcome
A seamless, hands-free workflow where validated documents in Docsumo appear instantly in Xero as structured Draft Bills, complete with line-item details and the original PDF attached for auditing.
Step-by-Step Guide
1. **Create the Zap**: Log in to Zapier and click 'Create Zap'. Name it 'Docsumo Invoices to Xero Bills'.
2. **Set up Docsumo Trigger**: Select **Docsumo** as the Trigger App and choose **'Document Processed'** as the Event. Connect your Docsumo account using your API key found in Docsumo Settings.
3. **Test Trigger & Map Webhook**: In Docsumo, go to Settings > Webhooks and paste the Zapier Webhook URL if prompted. Trigger a test by validating a document in Docsumo to fetch 'live' sample data.
4. **Add a Filter (Optional but Recommended)**: Add a **'Filter by Zapier'** step. Set it to only continue if `Status` (from Docsumo) exactly matches `validated`.
5. **Find or Create Xero Contact**: Add a **Xero** action step: **'Find Contact'**. Map the extracted `Vendor Name` from Docsumo. Check the box **'Create Xero Contact if it doesn't exist yet?'** to automate vendor onboarding.
6. **Format Line Items**: If your invoice has multiple lines, use a **'Formatter by Zapier (Utilities)'** step with the 'Line Itemizer' function to ensure Docsumo's array data is formatted correctly for Xero's line-item fields.
7. **Create Purchase Invoice in Xero**: Choose **Xero** as the Action App and **'Create Purchase Invoice'** as the Event.
- **Contact**: Use the ID from Step 5.
- **Status**: Select 'Draft' (safest for review).
- **Line Items**: Map the Item Description, Quantity, and Unit Amount from the Formatter/Docsumo step.
8. **Upload Attachment**: Add another **Xero** step: **'Upload File'**. For the 'File' field, use the `Document URL` from Docsumo. For 'Object Type', select 'Accounts Payable Invoice'. For 'Object ID', map the Invoice ID created in Step 7.
9. **Error Handling**: Click the '+' icon between steps to add a **'Path'** or use Zapier's **'Error Handler'** (on select plans) to send a Slack or Email notification if the Xero API returns a 400 error (e.g., duplicate invoice number).
Data Mapping
| Docsumo Field | Xero Field | Requirement | Transformation/Logic |
| :--- | :--- | :--- | :-- |
| `vendor_name` | Contact Name | **Required** | Use 'Find/Create Contact' step first. |
| `invoice_number` | Reference | **Required** | Prevents duplicates in Xero. |
| `date` | Date | **Required** | Zapier auto-converts most ISO dates. |
| `due_date` | Due Date | Optional | Default to `Date + 30` via Formatter if missing. |
| `line_items[].desc` | Description | **Required** | Map as List/Array. |
| `line_items[].price` | Unit Amount | **Required** | Map as List/Array. |
| `total_tax` | Total Tax | Optional | Map to 'Tax Amount' if not using Tax Types. |
| `document_url` | File Attachment | Optional | Ensures audit trail in Xero. |
Gotchas & Failure Modes
• **Line Item Loops**: Unlike Make.com, Zapier treats line items as comma-separated strings inside the 'Create Purchase Invoice' step. Ensure you map the array fields directly; Zapier will automatically iterate through them.
• **Duplicate Invoice Numbers**: Xero will reject 'Purchase Invoices' with a reference/invoice number that already exists for that contact. Use a search step or an error path to handle this.
• **Currency Codes**: Xero requires 3-letter ISO codes (USD, EUR). If Docsumo extracts symbols ($), use a 'Formatter > Replace' step to convert symbols to ISO codes before hitting Xero.
• **Task Usage**: Each document creates about 4-5 tasks (Trigger + Filter + Contact + Invoice + File). Ensure your Zapier plan has sufficient task volume for your monthly invoice count.
Verification Checklist
- [ ] **Test Document**: Upload a PDF to Docsumo and manually move it to 'Validated' status.
- [ ] **History Check**: View 'Zap History' to ensure the data passed successfully from Docsumo to the Xero mapping step.
- [ ] **Contact Verification**: Check Xero Contacts to ensure the vendor was found or created without duplicates.
- [ ] **Draft Bill Check**: Open 'Bills to Pay' (Drafts) in Xero and verify line items match the PDF exactly.
- [ ] **Attachment Check**: Ensure the side-panel in the Xero invoice contains the original Docsumo PDF link/file.
Ready to Automate?
Build this automation with Zapier in minutes.