ml-connector
XeroTableau

Xero and Tableau integration

Xero stores all your accounting records - invoices, bills, payments, and general ledger accounts. Tableau turns data into dashboards your team reads every day. Connecting the two lets your sales, finance, and operations teams see up-to-date revenue, spending, and cash flow without asking someone to export and re-upload. ml-connector watches Xero for changes, pulls the full record details, and writes them to a Tableau data source you control, keeping your financial dashboards live.

How Xero works

Xero Accounting API exposes invoices, purchase orders, payments, accounts, tracking categories, items, manual journals, credit notes, and bank transactions through a REST interface at https://api.xero.com/api.xro/2.0/. Authentication uses OAuth2 Authorization Code flow with 30-minute access tokens and 60-day refresh tokens. Xero publishes webhook events for contact, invoice, credit note, payment, manual journal, purchase order, and bank transaction CREATE and UPDATE actions; webhook payloads contain metadata only, requiring a follow-up API call to fetch the full record. All requests require the Xero-tenant-id header to target a specific organization. Rate limits are 5 concurrent calls and 60 per minute per tenant. Records are paginated at 100 per page.

How Tableau works

Tableau provides a REST API for managing workbooks, data sources, views, projects, users, and extract refreshes. Authentication uses Personal Access Token (PAT) with session token exchange, Connected App JWT, or username/password; PAT tokens expire after 15 days of non-use on Tableau Cloud and 1 year on Tableau Server. Tableau supports webhooks for 24 event types covering datasource and workbook lifecycle events; however, Xero data integration primarily uses Tableau's extract refresh and data source endpoints to push new data. Views are read-only derived objects and cannot be written to directly. The API is site-scoped, requiring a site ID in the request path.

What moves between them

Invoices, bills, payments, and bank transactions flow from Xero into Tableau. ml-connector subscribes to Xero webhook events for CREATE and UPDATE, retrieves the full record details from the Xero Accounting API, filters by document type (invoices vs bills), and publishes normalized rows to a Tableau data source extract. On Tableau Cloud, refreshes happen on-demand after ml-connector pushes data; on Tableau Server, extracts refresh on a schedule you configure. GL accounts and tracking categories are synced as dimension tables so financial dashboards can slice by cost center and account code. The flow is one-directional: Xero to Tableau only.

How ml-connector handles it

ml-connector stores your Xero OAuth2 refresh token encrypted and automatically renews it when it approaches expiry, so the integration stays live without manual token re-entry. It obtains a Tableau session token from your Personal Access Token at sync time and reuses it for all pushes in that window, reducing API calls. When a Xero webhook fires, ml-connector fetches the full record (because webhook payloads contain only metadata), validates the Xero-tenant-id header is set in the request, then maps invoice Type (ACCREC vs ACCPAY), tracking category assignments, and account codes into a flat schema Tableau can ingest. ml-connector respects Xero's 60-per-minute rate limit by batching requests and backing off on 429 responses. For Tableau, it uses the data source append or replace endpoint based on your data-freshness preference, validates permissions on the target site, and tracks job completion. Every record carries a full audit trail including the source webhook timestamp, Xero record ID, and Tableau job outcome.

A real-world example

A consulting firm uses Xero for invoicing clients and tracking billable hours, and Tableau for operations dashboards that show cash flow, revenue by client, and outstanding receivables. Before the integration, the finance controller exported invoices and payments from Xero as CSV every Friday afternoon and manually refreshed the Tableau workbook, a 30-minute manual step that often slipped when travel or deadlines interrupted. With Xero and Tableau connected, invoices and payments flow into Tableau as they are created or updated, the operations dashboard refreshes automatically within minutes, and the controller can see real-time cash position and client billing status instead of end-of-week snapshots. Month-end close conversations now reference the same numbers Tableau shows the executive team.

What you can do

  • Sync Xero invoices, bills, payments, and bank transactions to Tableau as they are created or updated, keeping financial dashboards live.
  • Map Xero invoice types (ACCREC for customer invoices, ACCPAY for supplier bills) and tracking categories to Tableau dimensions for multi-level slicing.
  • Handle Xero OAuth2 token refresh automatically and Tableau session token expiry, with no manual intervention between refreshes.
  • Respect Xero's per-tenant rate limits and page-based pagination while batching requests to minimize API calls on both sides.
  • Maintain a complete audit trail of every record synced, including Xero record IDs, webhook timestamps, and Tableau job outcomes for compliance and debugging.

Questions

Does the integration push data continuously or on a schedule?
Xero webhook events trigger ml-connector immediately when invoices, payments, or bank transactions are created or updated. ml-connector then fetches the full record from Xero and publishes it to your Tableau data source within seconds. On Tableau Cloud, the extract refreshes on-demand after each push; on Tableau Server, you configure extract schedules separately. This design gives you near-real-time financial data in Tableau while respecting both systems' rate limits.
How does ml-connector handle Xero's requirement to specify which organization to target?
Xero requires the Xero-tenant-id header on every API call, and webhook events include the tenant ID in their metadata. ml-connector validates and extracts the tenant ID from the webhook payload, uses it on all follow-up Xero API calls, and tracks it in the audit trail so you know which Xero organization each Tableau record came from. If you have multiple Xero tenants, ml-connector routes each to the correct Tableau site or project.
Which Xero records can sync to Tableau and which cannot?
ml-connector syncs invoices, bills (via the Type field), payments, bank transactions, accounts, and tracking categories - all available through the Xero Accounting API. Invoices and bills use the same API endpoint but are differentiated by the Type field (ACCREC vs ACCPAY). Xero's Employees endpoint is deprecated; payroll data requires the Xero Payroll AU/NZ/UK APIs instead, which follow different contracts. Credit notes, manual journals, and purchase orders are also available and can be added if your dashboards need them.

Related integrations

Connect Xero and Tableau

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started