Loopfour
Integrations

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

ItemValue
Block typexero
ConnectionOAuth sign-in from Integrations (provider id xero)
Account pinconfig.connection, the connection row id. Without it the step uses the company's default Xero connection
OrganisationOptional 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.

ActionIn Studio listWhat it doesRequired config
createInvoiceYesCreate a sales invoice (type ACCREC, the default) or a bill (ACCPAY)contactId or contact, lineItems
getInvoiceYesRead an invoice or billinvoiceId
updateInvoiceYesUpdate an invoice or billinvoiceId
listInvoicesYesList invoices and billsNone
createPaymentYesRecord a payment against an invoiceinvoiceId or invoice, accountId or account, amount
getPaymentYesRead a paymentpaymentId
createContactYesCreate a contactname
getContactYesRead a contactcontactId
createBillNoSame as createInvoice with type forced to ACCPAYAs createInvoice
voidInvoiceNoVoid an invoiceinvoiceId
deleteInvoiceNoDelete a draft invoiceinvoiceId
emailInvoiceNoEmail an invoice from XeroinvoiceId
deletePaymentNoDelete a paymentpaymentId
listPaymentsNoList paymentsNone
updateContact, archiveContact, listContactsNoMaintain contactscontactId (update, archive)
getBankTransaction, createBankTransaction, updateBankTransaction, deleteBankTransaction, listBankTransactionsNoSpend and receive money transactionstype (SPEND or RECEIVE), bankAccountId or bankAccount, contactId or contact, lineItems on create
getAccount, createAccount, updateAccount, archiveAccount, listAccountsNoChart of accountscode, name, type on create
getCreditNote, createCreditNote, listCreditNotesNoCredit notestype (ACCRECCREDIT or ACCPAYCREDIT), contact, lineItems on create
getItem, createItem, updateItem, deleteItem, listItemsNoProducts and servicescode on create
getOrganisationNoRead the organisationNone
getReportNoRun a Xero reportreportType
getConnectionsNoList the organisations behind the connectionNone

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 invoiceId and accountId (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

ActionFields
createInvoice, createBillcontactId 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
updateInvoiceinvoiceId plus the create fields other than type and currencyRate
listInvoicesstatuses, contactIds, where, order, page, createdByMyApp
createPaymentinvoiceId or invoice, accountId or account, amount, date, reference, currencyRate, isReconciled
getReportreportType, date, fromDate, toDate, periods, timeframe, trackingCategoryID, trackingOptionID, standardLayout, paymentsOnly
AlltenantId (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.

On this page