Xero
Prefer guided AI setup?
Instead of following these steps manually, you can use the AI Credential Assistant — describe what you want to connect and the AI will walk you through the setup step by step, tailored to your account.
Overview
Connect your Xero account to Nirvai to automate accounting workflows, manage invoices, track expenses, and sync financial data.
Supported Authentication Methods
- OAuth2 - Secure authorization with Xero Developer account
Prerequisites
- A Xero account
- Access to the Xero Developer portal
Setup Instructions
OAuth2 Authentication
Step 1: Create a Xero App
- Go to Xero Developer Portal
- Click New app
- Select Web app as the integration type
Step 2: Configure Your App
- Enter your App name (cannot contain "n8n")
- For Company or application URL, enter your Nirvai server URL
- Add the Nirvai OAuth Redirect URL as an OAuth 2.0 redirect URI
Step 3: Get OAuth Credentials
- Once created, copy the Client ID
- Generate and copy the Client Secret
Step 4: Set Scopes
Add these scopes for full functionality:
offline_access- For token refreshaccounting.transactions- Invoices, bills, paymentsaccounting.contacts- Customers and suppliersaccounting.settings- Organization settings
Step 5: Configure in Nirvai
- In Nirvai, select Xero OAuth2
- Enter your Client ID and Client Secret
- Click Connect to authorize
Available Operations
With Xero credentials, you can:
- Create and manage invoices
- Track bills and payments
- Manage contacts (customers/suppliers)
- Access bank transactions
- Generate financial reports
- Manage chart of accounts
Scopes Reference
| Scope | Purpose |
|---|---|
offline_access | Refresh tokens for continuous access |
accounting.transactions | Read/write invoices, bills, payments |
accounting.contacts | Read/write customers and suppliers |
accounting.settings | Read organization settings |
Troubleshooting
Common Issues
- Invalid Redirect URI: Ensure the Nirvai callback URL is added to your app
- Scope Errors: Verify you've added required scopes in your Xero app
- App Name Restriction: Xero doesn't allow "n8n" in app names
- Token Expired: Nirvai automatically handles token refresh
Multi-Organization Access
Xero OAuth tokens can access multiple organizations:
- During authorization, select which orgs to connect
- Use the connections endpoint to list available orgs
- Specify tenant ID in API calls for multi-org setups
Related Resources
Adapted from n8n documentation for Nirvai platform
Next Steps
Got your credential? Connect it to an agent
Use the AI Tool Creator to turn this credential into agent-callable tools. Describe what your agent should be able to do and the AI investigates the API, configures the endpoints, and gives you a reviewable toolkit before saving anything.