Automated PDF Invoice Extraction to Xero (Make.com)

Eliminate manual data entry by extracting PDF data via Wondershare Document Cloud and AI to Xero via Make.com

Tools: PDFelementXero

Platform: Make.com

Short Answer

A fully automated pipeline where saving a PDF to the cloud triggers AI data extraction, creates a draft bill or contact in Xero, and archives the original document for compliance—all monitored by Make.com error handlers.

The Problem

Accounting teams often waste hours manually transcribing data from vendor invoices or signed contracts into Xero. This manual process is prone to human error, resulting in incorrect tax filings or payment delays.

The Outcome

A fully automated pipeline where saving a PDF to the cloud triggers AI data extraction, creates a draft bill or contact in Xero, and archives the original document for compliance—all monitored by Make.com error handlers.

Step-by-Step Guide

1. **Establish the Trigger Source**: Since PDFelement is desktop-based, configure it to save outputs to **Wondershare Document Cloud** or a linked folder (Google Drive/Dropbox). Add the 'Watch Files' module in Make.com for that specific folder. 2. **Connect Wondershare/Cloud API**: In Make.com, click 'Add', search for your cloud storage, and authenticate. Set the 'Limit' to 1 to process bundles one by one during initial setup. 3. **Leverage PDFelement AI/OCR**: Use a 'HTTP Make a Request' module or a dedicated OCR module to send the file to PDFelement’s extraction API. Ensure you request the 'Summary' or 'Markdown' output for structured text. 4. **Parse the Data**: Add a 'JSON Parser' or 'Text Parser' module. Use **Regular Expressions (Regex)** within Make.com to isolate 'Total Amount', 'Invoice Date', and 'Vendor Name' from the AI-generated summary. 5. **Establish Xero Connection**: Add a Xero module ('Create an Invoice'). Click 'Create a connection' and log in via OAuth2. Select the specific Xero Organization. 6. **Check for Existing Contact**: Add a Xero 'Search Contacts' module. Map the 'Vendor Name' from the PDF. This prevents duplicate contact creation. 7. **Implement a Router**: Use a Router to branch the logic. Path A (Contact found): Proceed to Create Bill. Path B (Contact not found): Create Contact FIRST, then Create Bill. 8. **Map Bill Details**: In the 'Create a Purchase/Bill' module, map the extracted date using `formatDate(parsed_date; YYYY-MM-DD)` and the total amount using the `parseNumber()` function to ensure Xero accepts the decimal format. 9. **Attach Original File**: Add the Xero 'Upload a File' module. Source the 'File Content' from the initial trigger module to ensure the PDF is linked to the Bill in Xero. 10. **Add Error Handling**: Right-click the Xero module and select 'Add error handler'. Choose 'Break' to store the execution for manual review if the API fails due to validation errors (e.g., missing account codes).

Data Mapping

| Data Source (PDFelement/AI) | Xero Field | Transformation / Make.com Function | | :--- | :--- | :--- | | Extracted Vendor Name | Contact Name | `trim(vendor_name)` | | Extracted Date | Date | `formatDate(date; "YYYY-MM-DD")` | | Total Amount | Line Amount | `parseNumber(total; ".")` | | Invoice/Ref Number | Reference | `ifEmpty(ref; "No-Ref-Found")` | | AI Summary Text | Description | `substring(summary; 0; 255)` | | PDF File (Binary) | Attachment | `Upload via File Content` |

Gotchas & Failure Modes

* **Data Type Mismatches**: Xero requires specific date formats (YYYY-MM-DD). Use the `formatDate` function in Make.com; otherwise, the scenario will fail with a 400 error. * **Rate Limits**: Xero has a limit of 5000 API calls per day. If processing bulk historical PDFs, use the 'Sleep' module or 'Search' filters to avoid hitting limits. * **Bundle Overhead**: Make.com charges per operation. Use a 'Filter' after the trigger to ensure only PDF files (MIME type application/pdf) proceed through the scenario to save costs. * **Auth Token Refresh**: Ensure your Xero connection is periodically checked; while Make handles refresh tokens, a manual disconnect in Xero settings will break the scenario.

Verification Checklist

- [ ] **Run Once Test**: Use the 'Run once' button and upload a real PDF to the cloud folder. - [ ] **Check Mapping**: Verify in the Make.com execution log that `parseNumber` correctly converted '$1,200.00' to '1200.00'. - [ ] **Search Logic**: Verify that if a vendor already exists, the scenario fetches the ID rather than creating a duplicate. - [ ] **File Presence**: Log into Xero and ensure the 'Files' icon on the bill shows the original PDF attachment. - [ ] **Incomplete Data Check**: Test a 'garbage' PDF to ensure your Error Handler (e.g., Slack notification) triggers correctly.

Ready to Automate?

Build this automation with Make.com in minutes.