Skip to main content
Let’s learn how to connect Engini to Xero. With the Xero connector you can create, update and read invoices, payments, manual journals and reports in your Xero organization, and start workflows when new or changed invoices or payments appear. To get started, create an account at Xero. Engini does not use a shared Xero app. You connect with your own Xero developer app, so you create it first and then enter its Client Id and Client Secret in Engini.

Add a Connection to Xero in Engini

Prerequisites

  • A Xero account with access to the organization you want to connect.
  • A Xero developer app of your own, with its Client Id and Client Secret (see Create your Xero app below).
  • The Tenant Id of that organization (see Find your Xero Tenant Id below).

Create your Xero app

Engini connects through an app that you own in the Xero developer portal. Create it before you add the connection in Engini.
  1. Open the Xero developer portal at developer.xero.com and sign in with your Xero account.
  2. Go to My Apps and click New app.
  3. Enter an app name, choose Web app as the integration type and fill in the remaining details Xero asks for.
  4. In Redirect URI, paste Engini’s Redirect URI: https://workflowapi.engini.io/api/auth/OAuthRedirectUrl. You can also copy it from the Redirect URI field of the Xero connection form in Engini (see Connecting Engini to Xero below). Then click Create app.
  5. Open the app’s Configuration page, click Generate a secret and copy the Client Id and the Client Secret. Xero shows the secret only once, so store it safely.
Note: When you sign in, Engini asks Xero for these permissions: offline_access, accounting.invoices, accounting.payments, accounting.banktransactions, accounting.manualjournals, accounting.contacts, accounting.settings, accounting.reports.trialbalance.read and accounting.budgets.read. Note: Xero’s free Starter plan allows up to 5 connections, that is, up to 5 Xero organizations connected to your app. For other plans, see Xero’s developer pricing.

Find your Xero Tenant Id

Xero identifies each connected organization by a Tenant Id, and every request Engini sends to Xero includes it. You enter it once, when you create the connection. Xero returns the Tenant Id (the tenantId value) in the response of its Connections API, https://api.xero.com/connections, once you have authorized access. Copy the tenantId of the organization you want to use and paste it into the Tenant Id field below. For details, see the Xero developer documentation. Note: If you have access to more than one Xero organization, create a separate Engini connection for each one, each with its own Tenant Id.

Connecting Engini to Xero

  1. Enter your Engini account at https://app.engini.io.
  2. Navigate to the Connections page by clicking on Connections in the left sidebar or by clicking here. Engini - Connections page
  3. Click on the “New Integration” option located at the top bar. Engini - New Integration button
  4. Choose the Xero option from the available applications. Xero - Choose Application
  5. Enter the following details in the “New Integration” form and press Save: Xero - New Integration form
    1. Connection Name - Enter a name that helps identify the Xero connection, for example the name of your organization.
    2. Client Id - Paste the Client Id of your Xero app, as described in Create your Xero app above.
    3. Client Secret - Paste the Client Secret you generated for your Xero app. It is hidden as you type.
    4. Redirect URI - Engini fills this in and you can’t edit it. Click the copy icon and add this address as a Redirect URI in your Xero app, as described in Create your Xero app above.
    5. Tenant Id - Paste the Tenant Id of your Xero organization, as described in Find your Xero Tenant Id above.
    6. Signin - Click Signin and sign in to your Xero account. Xero asks you to choose the organization to connect and to allow your app access. Click the button that allows access to complete the sign-in.
    7. Save - Click Save to create the connection.

Triggers

Check for New Invoices

Starts the workflow when Xero returns invoices that are new or have changed since the last check. Xero - Check for New Invoices trigger
  1. Starting (UTC) - Select the start date and time for the scheduled trigger.
  2. Recur every - Choose the time interval for triggering and checking invoices. The minimum time interval is 15 minutes.
  3. Add time frame - You can specify a time frame during which the trigger will operate.
  4. Add Conditions - Click Add Conditions to define conditions that narrow down the data list and return only the relevant items. To learn more about using filters, click here.
Each invoice is passed to the next steps with these properties: Invoice Id, Invoice Number, Type, Status, Reference, Date, Due Date, Currency Code, Currency Rate, Line Amount Types, Sub Total, Total Tax, Total, Amount Due, Amount Paid, Amount Credited, Sent To Contact, Has Attachments and Updated Date UTC. The invoice’s Contact and Line Items are passed as child objects. Note: The trigger returns invoices that are new and also invoices that were modified since the last check, so the same invoice can start the workflow again after it is edited in Xero. Use Add Conditions, for example on Status or Updated Date UTC, if you only want to continue for specific changes.

Check for New Payments

Starts the workflow when Xero returns payments that are new or have changed since the last check. Xero - Check for New Payments trigger
  1. Starting (UTC) - Select the start date and time for the scheduled trigger.
  2. Recur every - Choose the time interval for triggering and checking payments. The minimum time interval is 15 minutes.
  3. Add time frame - You can specify a time frame during which the trigger will operate.
  4. Add Conditions - Click Add Conditions to define conditions that narrow down the data list and return only the relevant items. To learn more about using filters, click here.
Each payment is passed to the next steps with these properties: Payment Id, Date, Amount, Bank Amount, Currency Rate, Reference, Status, Payment Type, Is Reconciled and Updated Date UTC. The payment’s Invoice and Account are passed as child objects. Note: The trigger also returns payments that were modified since the last check, so the same payment can start the workflow again after it changes in Xero.

Actions

Create Invoice

Creates a sales invoice or a bill in Xero. Xero - Create Invoice action
  1. Contact Id - The customer or supplier the invoice belongs to. You have 3 ways to fill it:
    • Dynamic List - Choose through a live, auto-generated list of your Xero contacts.
    • Dynamic Mapping - Map a Contact Id variable from a previous step in your workflow so it changes automatically based on real-time data.
    • Static Text - Provide the Id as text, such as 3fa85f64-5717-4562-b3fc-2c963f66afa6.
  2. Type - Select Sales invoice (ACCREC) for an invoice you send to a customer, or Bill (ACCPAY) for a bill you receive from a supplier.
  3. Line Items - The lines on the invoice. Build the list with the Initialize Object Array and Append to Object Array actions, choosing “Invoice line (Create Invoice)” as the Object Element Type. Each line has a Description (required), Quantity, Unit Amount, Account Code, Item Code, Tax Type and Discount Rate.
  4. Add Field - Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, click here.

Create Manual Journal

Creates a manual journal in Xero. Xero - Create Manual Journal action
  1. Narration - A description of the journal, for example “Month-end accrual”.
  2. Journal Lines - The lines of the journal. Build the list with the Initialize Object Array and Append to Object Array actions, choosing “Journal line (Create Manual Journal)” as the Object Element Type. Each line has a Line Amount (required, debits positive and credits negative), an Account Code (required), a Description and a Tax Type.
  3. Add Field - Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, click here.
Note: A manual journal needs at least two lines.

Create Payment

Records a payment against an invoice. Xero - Create Payment action
  1. Invoice Id - The invoice being paid. You have 3 ways to fill it:
    • Dynamic List - Choose through a live, auto-generated list of your Xero invoices.
    • Dynamic Mapping - Map an Invoice Id variable from a previous step in your workflow so it changes automatically based on real-time data.
    • Static Text - Provide the Id as text, such as 3fa85f64-5717-4562-b3fc-2c963f66afa6.
  2. Account Id - The bank account the payment is made from or into. You have 3 ways to fill it:
    • Dynamic List - Choose through a live, auto-generated list of your Xero bank accounts.
    • Dynamic Mapping - Map an Account Id variable from a previous step in your workflow so it changes automatically based on real-time data.
    • Static Text - Provide the Id as text, such as 3fa85f64-5717-4562-b3fc-2c963f66afa6.
  3. Amount - The payment amount, for example 100.00.
  4. Date - The date of the payment.
  5. Add Field - Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, click here.

Email Invoice

Emails an invoice from Xero to the contact on the invoice. Xero - Email Invoice action
  • Invoice Id - The invoice to email. You have 3 ways to fill it:
    • Dynamic List - Choose through a live, auto-generated list of your Xero invoices.
    • Dynamic Mapping - Map an Invoice Id variable from a previous step in your workflow so it changes automatically based on real-time data.
    • Static Text - Provide the Id as text, such as 3fa85f64-5717-4562-b3fc-2c963f66afa6.

Get Accounts

Retrieves the accounts in your Xero chart of accounts. Xero - Get Accounts action
  1. Add Filter - Click Add Filter to define conditions that narrow down the data list and return only the relevant items. The fields you can filter on are Where and Modified Since. To learn more about using filters, click here.
  2. Add Sort - Click Add Sort to organize the data list by a selected field in ascending or descending order. To learn more about sorting data, click here.

Get Bank Transactions

Retrieves bank transactions from Xero. Xero - Get Bank Transactions action
  1. Add Filter - Click Add Filter to define conditions that narrow down the data list and return only the relevant items. The fields you can filter on are References, Where and Modified Since. To learn more about using filters, click here.
  2. Top N - You can set the maximum number of records Engini will return for the object you chose (default = all records).
  3. Add Sort - Click Add Sort to organize the data list by a selected field in ascending or descending order. To learn more about sorting data, click here.

Get Budgets

Retrieves budgets from Xero. Xero - Get Budgets action
  • Add Filter - Click Add Filter to define conditions that narrow down the data list and return only the relevant items. The fields you can filter on are Budget Ids, Date From and Date To. To learn more about using filters, click here.

Get Contacts

Retrieves customers and suppliers from Xero. Xero - Get Contacts action
  1. Add Filter - Click Add Filter to define conditions that narrow down the data list and return only the relevant items. The fields you can filter on are Contact Ids, Search Term, Include Archived, Where and Modified Since. To learn more about using filters, click here.
  2. Top N - You can set the maximum number of records Engini will return for the object you chose (default = all records).
  3. Add Sort - Click Add Sort to organize the data list by a selected field in ascending or descending order. To learn more about sorting data, click here.

Get Currencies

Retrieves the currencies that are set up in your Xero organization. Xero - Get Currencies action
  • Add Filter - Click Add Filter to define conditions that narrow down the data list and return only the relevant items. The fields you can filter on are Where. To learn more about using filters, click here.

Get Invoice

Retrieves a single invoice from Xero. Xero - Get Invoice action
  • Invoice Id - The invoice to retrieve. You have 3 ways to fill it:
    • Dynamic List - Choose through a live, auto-generated list of your Xero invoices.
    • Dynamic Mapping - Map an Invoice Id variable from a previous step in your workflow so it changes automatically based on real-time data.
    • Static Text - Provide the Id as text, such as 3fa85f64-5717-4562-b3fc-2c963f66afa6.

Get Invoices

Retrieves invoices and bills from Xero. Xero - Get Invoices action
  1. Add Filter - Click Add Filter to define conditions that narrow down the data list and return only the relevant items. The fields you can filter on are Statuses, Invoice Numbers, Invoice Ids, Contact Ids, Search Term, Include Archived, Created By This App, Where and Modified Since. To learn more about using filters, click here.
  2. Top N - You can set the maximum number of records Engini will return for the object you chose (default = all records).
  3. Add Sort - Click Add Sort to organize the data list by a selected field in ascending or descending order. To learn more about sorting data, click here.

Get Manual Journals

Retrieves manual journals from Xero. Xero - Get Manual Journals action
  1. Add Filter - Click Add Filter to define conditions that narrow down the data list and return only the relevant items. The fields you can filter on are Where and Modified Since. To learn more about using filters, click here.
  2. Top N - You can set the maximum number of records Engini will return for the object you chose (default = all records).
  3. Add Sort - Click Add Sort to organize the data list by a selected field in ascending or descending order. To learn more about sorting data, click here.

Get Payments

Retrieves payments from Xero. Xero - Get Payments action
  1. Add Filter - Click Add Filter to define conditions that narrow down the data list and return only the relevant items. The fields you can filter on are Where and Modified Since. To learn more about using filters, click here.
  2. Top N - You can set the maximum number of records Engini will return for the object you chose (default = all records).
  3. Add Sort - Click Add Sort to organize the data list by a selected field in ascending or descending order. To learn more about sorting data, click here.

Get Tax Rates

Retrieves the tax rates that are set up in your Xero organization. Xero - Get Tax Rates action
  • Add Filter - Click Add Filter to define conditions that narrow down the data list and return only the relevant items. The fields you can filter on are Where. To learn more about using filters, click here.

Get Trial Balance

Retrieves the trial balance report from Xero. Xero - Get Trial Balance action
  • Add Filter - Click Add Filter to define conditions that narrow down the data list and return only the relevant items. The fields you can filter on are Report Date and Cash Basis. To learn more about using filters, click here.

Get Users

Retrieves the users of your Xero organization. Xero - Get Users action
  • Add Filter - Click Add Filter to define conditions that narrow down the data list and return only the relevant items. The fields you can filter on are Where and Modified Since. To learn more about using filters, click here.

Update Invoice

Updates an existing invoice in Xero. Xero - Update Invoice action
  1. Invoice Id - The invoice to update. You have 3 ways to fill it:
    • Dynamic List - Choose through a live, auto-generated list of your Xero invoices.
    • Dynamic Mapping - Map an Invoice Id variable from a previous step in your workflow so it changes automatically based on real-time data.
    • Static Text - Provide the Id as text, such as 3fa85f64-5717-4562-b3fc-2c963f66afa6.
  2. Add Field - Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, click here.
Note: Use Add Field to add the fields you want to change, such as Status, Due Date or Line Items.

Initialize Object Array

Creates a new object array variable in your workflow to store structured Xero data for use in later steps. Use it to build the Line Items or Journal Lines of a create action. Xero - Initialize Object Array action
  1. Variable name - Enter the name of the variable that will hold the object array. This name will be used throughout the workflow whenever you refer to this object array.
  2. Object Element Type - Select the type of object the array will store: “Invoice line (Create Invoice)”, “Invoice line (Update Invoice)” or “Journal line (Create Manual Journal)”. The selected type determines the structure of the array and opens its fields so you can fill in the values for the first entry.

Append to Object Array

Adds a new entry to an existing object array variable in your workflow. Xero - Append to Object Array action
  1. Variable - Select the object array variable you want to append to. This must be an already initialized object array.
  2. Add Field - Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, click here.

Map Object Array

Transforms a list of data into a structured object array that can be used later in the workflow. It iterates over each item in the selected data list and maps it into a structured entry. Xero - Map Object Array action
  1. Data List - Select or map the array or list of data you want to iterate over and transform.
  2. Object name - Define the name of the temporary object that represents each item during the mapping. You will use this name when referencing fields from the current item.
  3. Add Field - Click Add Field to add and populate additional fields for the selected activity. To learn more about managing activity data, click here.

Send API Request

This activity allows you to send a custom API request directly to Xero’s API. Xero - Send API Request action
  1. Base Url - The root URL of the Xero API. It is filled in from your Xero connection and can’t be edited here.
  2. Relative url - You can specify additional path segments or parameters that need to be added to the end of the Base Url. This allows you to customize the specific request you want to perform.
  3. Method - Select the HTTP method (e.g., Get, Post, Put, Delete, Patch). The default is POST.
  4. Body Type - Defines the format of the data in the body of your request. The default, application/json, means the body contains a JSON-formatted payload.
    • application/json – Sends the request body in JSON format. Commonly used by REST APIs.
    • custom – Allows you to define a custom body format by manually setting the Content-Type header. Add a Content-Type row in Add Headers with the media type you need (for example application/xml). With any other Body Type, a Content-Type you type in Add Headers is not sent; Engini sets it from the Body Type, and the run history shows it under headersnotsent.
    • application/x-www-form-urlencoded – Sends the body as URL-encoded key-value pairs, commonly used in form submissions.
    • file – Sends a file as the request body.
    • multipart/form-data – Sends form data that may include both text fields and files.
    • text/html – Sends the request body as HTML content.
    • text/plain – Sends the request body as plain text.
    • text/xml – Sends the request body in XML format.
  5. Body - Contains any data that is being sent to the server.
  6. Add Headers - Additional metadata about the request, such as the type of data Engini can accept, the length of the request body, and authentication information.
  7. Add Queries - The query refers to the parameters or data that are included in the URL of an HTTP request to provide additional information or instructions to the server.
Engini adds your sign-in and Tenant Id to every request automatically. For the full list of endpoints, see the Xero Accounting API reference.