Skip to main content
All CollectionsFeaturesAPI
Integrate Xero with Google Sheets
Integrate Xero with Google Sheets
Luciano Marzoni avatar
Written by Luciano Marzoni
Updated over 2 weeks ago
  1. Login to Xero and developer portal

To begin integrating Xero with Sheetgo, follow these steps:

2. Create a new Xero app

  1. Navigate to the "My Apps" section in the Xero Developer Portal.

  2. Click on "Create a New App".

  3. Fill in the required fields and set the following details:

  4. Click Create to generate the app.
    ​

3. Obtain Client id and Client secret

  1. Go to the Configuration tab of your newly created app.

  2. Copy the Client id.

  3. Generate the Client secret and store both securely, as they are required in the next step.

4. Generate the access token

To authenticate with Xero's API, execute the following command in your terminal or command prompt. Replace YOUR_CLIENT_ID and YOUR_CLIENT_SECRET with the actual values obtained in the previous step:

Unset
curl -X POST https://identity.xero.com/connect/token I am running a few minutes late; my previous meeting is running over.
-H "Content-Type: application/x-www-form-urlencoded"I am running a few minutes late; my previous meeting is I am running a few minutes late; my previous meeting is running over.running over.
-d "grant_type=client_credentials" \
-d "client_id=YOUR_CLIENT_ID" \
-d "client_secret=YOUR_CLIENT_SECRET"

This command will return an access token, which will be used for making API requests.

5. Construct the API request in Sheetgo

To fetch data from Xero, select the appropriate API endpoint. Refer to the Xero API Documentation for available endpoints.

For example, to retrieve invoices, use the following API request URL:

Unset
https://api.xero.com/api.xro/2.0/Invoices

Set Up API Headers

Use the access token obtained earlier to set the authorization headers for the API request. The request headers should be structured as follows:

Unset
{
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
}

6. Import data into Google Sheets via Sheetgo

  1. Configure the API request in Sheetgo.

  2. Choose the destination Google Sheet where the Xero data should be imported.

  3. Execute the Sheetgo workflow to pull the required data from Xero into Google Sheets.

Your integration is now complete! πŸŽ‰

Did this answer your question?