RapidfolioRapidfolio
Triggers

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

  1. Go to Connections in the Rapidfolio dashboard and connect your Xero organisation.
  2. Open the procedure you want to trigger and add a Xero trigger.
  3. Select the event categories and types you want to listen for, then save the trigger.
  4. 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

FieldDescription
ConnectionThe Xero connection to listen on
Event categoriesThe resource categories to listen on — e.g. Invoice, Contact
Event typesThe specific change types within those categories — e.g. CREATE, UPDATE

Supported Event Categories and Types

CategoryEvent typeDescription
InvoiceCREATEA new invoice was created
InvoiceUPDATEAn existing invoice was updated
ContactCREATEA new contact was created
ContactUPDATEAn existing contact was updated
PaymentCREATEA payment was recorded against an invoice or credit note
CreditNoteCREATEA credit note was created
CreditNoteUPDATEA credit note was updated
AccountCREATEA chart of accounts entry was created
AccountUPDATEA chart of accounts entry was updated
BankTransactionCREATEA bank transaction was created
BankTransactionUPDATEA 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.CREATE fires.
  • Trigger an accounts payable approval workflow when a large invoice is created.
  • Reconcile payments and update order statuses when Payment.CREATE fires.
  • Keep your CRM in sync with Xero contacts by reacting to Contact.CREATE and Contact.UPDATE events.

On this page