Xero actions
Reference for the Xero actions: the connection type, each action and what it does, its inputs and outputs, and the live catalog call.
The Xero block works with invoices, bills, payments, contacts, bank transactions and the chart of accounts in a Xero organisation. For the plain-language overview, see Xero.
When to use it
Use a Xero step to raise a sales invoice or a bill, record a payment against an invoice, keep contacts in step with another system, or pull a Xero report.
Connection
| Item | Value |
|---|---|
| Block type | xero |
| Connection | OAuth sign-in from Integrations (provider id xero) |
| Account pin | config.connection, the connection row id. Without it the step uses the company's default Xero connection |
| Organisation | Optional config.tenantId, sent as the xero-tenant-id header when set. getConnections lists the organisations the connection can reach |
Actions
The action id is xero.<action>. Actions marked "No" run when a workflow definition names them, but they are not in the Studio Action list or in GET /api/v1/blocks/xero, and POST /api/v1/workflows/validate reports them as UNKNOWN_OPERATION.
| Action | In Studio list | What it does | Required config |
|---|---|---|---|
createInvoice | Yes | Create a sales invoice (type ACCREC, the default) or a bill (ACCPAY) | contactId or contact, lineItems |
getInvoice | Yes | Read an invoice or bill | invoiceId |
updateInvoice | Yes | Update an invoice or bill | invoiceId |
listInvoices | Yes | List invoices and bills | None |
createPayment | Yes | Record a payment against an invoice | invoiceId or invoice, accountId or account, amount |
getPayment | Yes | Read a payment | paymentId |
createContact | Yes | Create a contact | name |
getContact | Yes | Read a contact | contactId |
createBill | No | Same as createInvoice with type forced to ACCPAY | As createInvoice |
voidInvoice | No | Void an invoice | invoiceId |
deleteInvoice | No | Delete a draft invoice | invoiceId |
emailInvoice | No | Email an invoice from Xero | invoiceId |
deletePayment | No | Delete a payment | paymentId |
listPayments | No | List payments | None |
updateContact, archiveContact, listContacts | No | Maintain contacts | contactId (update, archive) |
getBankTransaction, createBankTransaction, updateBankTransaction, deleteBankTransaction, listBankTransactions | No | Spend and receive money transactions | type (SPEND or RECEIVE), bankAccountId or bankAccount, contactId or contact, lineItems on create |
getAccount, createAccount, updateAccount, archiveAccount, listAccounts | No | Chart of accounts | code, name, type on create |
getCreditNote, createCreditNote, listCreditNotes | No | Credit notes | type (ACCRECCREDIT or ACCPAYCREDIT), contact, lineItems on create |
getItem, createItem, updateItem, deleteItem, listItems | No | Products and services | code on create |
getOrganisation | No | Read the organisation | None |
getReport | No | Run a Xero report | reportType |
getConnections | No | List the organisations behind the connection | None |
The Studio form and the executor
Three Studio actions need fields the form does not show yet:
- Create Payment shows only Amount. The executor also needs
invoiceIdandaccountId(the bank or clearing account). - Create Contact writes Contact Data (JSON) as
contactData, which the executor does not read. It builds the contact from flat fields:name,firstName,lastName,emailAddress,accountNumber,taxNumber,addresses,phones,isCustomer,isSupplier,defaultCurrency. - Create Invoice and Update Invoice need Line Items (JSON) to be a non-empty array of Xero line items, not an object.
Set these fields in the workflow definition.
Fields
| Action | Fields |
|---|---|
createInvoice, createBill | contactId or contact, lineItems (Xero LineItem objects, for example Description, Quantity, UnitAmount, AccountCode), type, date, dueDate, status (default DRAFT), lineAmountTypes (default Exclusive), invoiceNumber, reference, currencyCode, currencyRate, brandingThemeId, url, sentToContact, expectedPaymentDate, plannedPaymentDate |
updateInvoice | invoiceId plus the create fields other than type and currencyRate |
listInvoices | statuses, contactIds, where, order, page, createdByMyApp |
createPayment | invoiceId or invoice, accountId or account, amount, date, reference, currencyRate, isReconciled |
getReport | reportType, date, fromDate, toDate, periods, timeframe, trackingCategoryID, trackingOptionID, standardLayout, paymentsOnly |
| All | tenantId (optional) |
Output
The step output is Xero's response, keyed by resource. A later step reads {{steps.<id>.Invoices[0].InvoiceID}}, {{steps.<id>.Payments[0].PaymentID}} or {{steps.<id>.Contacts[0].ContactID}}.
Example
{
"id": "raise_invoice",
"type": "action",
"name": "Raise Xero invoice",
"action": "xero.createInvoice",
"config": {
"operation": "createInvoice",
"connection": "<xero-connection-id>",
"contactId": "{{steps.find_contact.Contacts[0].ContactID}}",
"lineItems": [
{ "Description": "October retainer", "Quantity": 1, "UnitAmount": 4500, "AccountCode": "200" }
],
"dueDate": "2026-11-30",
"reference": "{{input.dealId}}",
"status": "AUTHORISED"
}
}Live catalog
GET /api/v1/blocks/xero returns the Studio fields and the eight Studio actions. See Block and action discovery.
Errors and limits
contactId or contact is required,lineItems is required: invoice and bill creates need both.invoiceId or invoice is required,accountId or account is required,amount is required: payment creates need all three.type is required (SPEND or RECEIVE),type is required (ACCRECCREDIT or ACCPAYCREDIT): bank transactions and credit notes need a type.- Xero validation errors come back in Xero's own response.
Stripe actions
Reference for the Stripe actions: how the connection works, each action id and what it does, the step settings, outputs and a complete example.
Zoho Inventory actions
Reference for the Zoho Inventory actions: the connection type, each action and what it does, its inputs and outputs, and the live catalog call.
Loopfour