Xero Trigger
Trigger procedures from Xero accounting and invoice events.
Overview
The Xero trigger fires your procedure when accounting events occur in your Xero organisation — for example when an invoice is created, a contact is updated, or a payment is received.
Setup
- Go to Connections in the Rapidfolio dashboard and connect your Xero organisation.
- Open the procedure you want to trigger and add a Xero trigger.
- Select the event categories and types you want to listen for, then save the trigger.
- Copy the generated webhook URL and register it in your Xero Developer Portal under Webhooks → Create Webhook.
Webhook URL
https://run.rapidfolio.com/triggers/:triggerId/xero
Replace :triggerId with the trigger ID shown in the Rapidfolio dashboard.
Signature Verification
Rapidfolio verifies the X-Xero-Signature header on every inbound request using HMAC-SHA256. Requests with an invalid or missing signature are rejected with a 400 response.
Intent to Receive (ITR) Validation
When you first register a webhook URL in the Xero Developer Portal, Xero sends a validation request to confirm that the endpoint is reachable and correctly verifies signatures. Rapidfolio handles this Intent to Receive handshake automatically — you do not need to write any additional code or take any action. Simply save your webhook in Xero and Rapidfolio will respond correctly to the validation request.
Configuration
| Field | Description |
|---|---|
| Connection | The Xero connection to listen on |
| Event categories | The resource categories to listen on — e.g. Invoice, Contact |
| Event types | The specific change types within those categories — e.g. CREATE, UPDATE |
Supported Event Categories and Types
| Category | Event type | Description |
|---|---|---|
Invoice | CREATE | A new invoice was created |
Invoice | UPDATE | An existing invoice was updated |
Contact | CREATE | A new contact was created |
Contact | UPDATE | An existing contact was updated |
Payment | CREATE | A payment was recorded against an invoice or credit note |
CreditNote | CREATE | A credit note was created |
CreditNote | UPDATE | A credit note was updated |
Account | CREATE | A chart of accounts entry was created |
Account | UPDATE | A chart of accounts entry was updated |
BankTransaction | CREATE | A bank transaction was created |
BankTransaction | UPDATE | A bank transaction was updated |
Payload
The trigger payload is the raw Xero webhook event body. Access it via the trigger input in your procedure. Each delivery may contain multiple events within the events array; Rapidfolio creates a separate procedure run for each event.
{
"events": [
{
"resourceUrl": "https://api.xero.com/api.xro/2.0/Invoices/abc12345-def6-7890-ghij-klmnopqrstuv",
"resourceId": "abc12345-def6-7890-ghij-klmnopqrstuv",
"eventDateUtc": "2024-03-15T10:30:00.000",
"eventType": "UPDATE",
"eventCategory": "INVOICE",
"tenantId": "tenant_abc123",
"tenantType": "ORGANISATION"
}
],
"lastEventSequence": 42,
"firstEventSequence": 42,
"entropy": "randomstring"
}
The resourceUrl field contains the Xero API URL for the affected resource. Use the Xero integration steps in your procedure to fetch the full object (e.g. the complete Invoice record) using this URL.
Example Use Cases
- Sync newly created Xero invoices to your internal billing system when
Invoice.CREATEfires. - Trigger an accounts payable approval workflow when a large invoice is created.
- Reconcile payments and update order statuses when
Payment.CREATEfires. - Keep your CRM in sync with Xero contacts by reacting to
Contact.CREATEandContact.UPDATEevents.