How It Works
Document is processed in RecordEngine
An invoice is uploaded and processed. The AI extracts vendor name, invoice date, due date, line items, amounts, and tax.
Document is exported
When the document reaches Export status, RecordEngine fires the outbound Document Webhook with the full structured payload.
What Gets Created in Xero
RecordEngine’s Standard Invoice profile maps directly to Xero Bill fields:| RecordEngine Field | Xero Bill Field |
|---|---|
vendor | Contact (matched by name) |
invoice_date | Date |
due_date | Due Date |
invoice_number | Reference |
currency | Currency |
total_amount | Total |
| Line item — description | Description |
| Line item — quantity | Quantity |
| Line item — unit_price | Unit Amount |
| Line item — amount | Line Amount |
Xero matches the vendor by contact name. Make sure the vendor name extracted by RecordEngine matches your Xero contact name exactly — or add a lookup step in your automation to find the Xero contact ID first.
Step 1 — Configure the Webhook in RecordEngine
- Go to Settings → Webhooks
- Enter your automation platform’s webhook URL in Document Webhook URL
- Save
Step 2 — Connect Xero in Your Automation Platform
Connect your Xero organisation using the native Xero connector. You’ll need:- Xero advisor or standard user access on the organisation
- Permission to authorise the OAuth connection
Step 3 — Build the Automation Scenario
Trigger: Webhook — Custom Webhook Action 1: Parse the incoming webhook payload Action 2: Xero — Create/Update Bill Map fields from the payload to the Xero Bill:
Step 4 — Handle Line Items
The webhook payload includes line items as an array. Use an iterator in your automation to loop throughline_items and create a Xero line item for each:
Description, Quantity, UnitAmount, LineAmount.
Step 5 — Handle Tax
Xero requires explicit tax treatment on each line item. Add a condition in your automation:- If
extracted_fields.taxis present and non-zero, setTaxTypeto the appropriate Xero tax rate code for your organisation (e.g.INPUT2for 20% UK input VAT, orNONEfor zero-rated) - If no tax, set
TaxType = "NONE"
Step 6 — Test the Integration
- Upload a test invoice and process it with the Standard Invoice profile
- Verify all fields extract correctly — pay attention to vendor name, amounts, and line items
- Approve and Export the document
- Check your automation execution log — the webhook should appear within seconds
- Open Xero — the Bill should appear in your Draft or Awaiting Payment queue
Preventing Duplicates
Add a duplicate-check step in your automation before creating the Xero Bill:- Search Xero for existing Bills with the same
Reference(invoice number) - If found, skip creation or update the existing Bill instead
- If not found, proceed with creation
Alternative — CSV Import
If you prefer a manual approach, export a CSV from RecordEngine and import into Xero: Export from RecordEngine:- Select the documents in the document list
- Click CSV Export
- In Xero go to Accounting → Bills to Pay
- Click Import and follow Xero’s CSV import wizard
- Map the RecordEngine CSV columns to Xero fields
Troubleshooting
| Issue | Fix |
|---|---|
| Contact not found in Xero | Vendor name doesn’t match Xero contact exactly. Add a Xero search step in your automation to find the contact by name first. |
| Invalid tax type error | Your Xero organisation uses different tax type codes. Check Xero → Accounting → Tax Rates for your valid codes. |
| Duplicate Bills appearing | Add a Reference search step before creation to check if the invoice number already exists. |
| Line items not appearing | Check that line_items in the webhook payload is non-empty. If the invoice has no table, line items won’t be extracted. |