Search API Connector Documentation

Print

Import QuickBooks Data to Google Sheets

In this guide, we’ll walk through how to pull QuickBooks data data directly into Google Sheets, using the API Connector add-on for Sheets. Intuit QuickBooks is, of course, a well-known accounting software package. The QuickBooks API only supports authentication via OAuth2, so we’ll be connecting using API Connector’s built-in OAuth2 integration for QuickBooks (this is a paid feature, please install API Connector for a free 7-day trial or upgrade to access).

CONTENTS

BEFORE YOU BEGIN

Click here to install the API Connector add-on from the Google Marketplace.

PART 1: CONNECT TO THE QUICKBOOKS API

If you haven’t connected API Connector to QuickBooks before, you’ll first need to initiate the connection as follows:

  1. Open up Google Sheets and click Add-ons > API Connector > Manage Connections.
  2. In the list of available connections, find QuickBooks and click Connect.
    quickbooks-img2
  3. You will be directed to Intuit.com and asked to sign in, if you haven’t already. You’ll then be returned to your Google Sheet, and can verify that your QuickBooks connection is active in the Connections screen.
    quickbooks-img3

PART 2: CREATE YOUR QUICKBOOKS API REQUEST URL

For our first request, we’ll get some basic information about your QuickBooks account.

  • API root: https://quickbooks.api.intuit.com
  • Endpoint: /v3/company/YOUR_COMPANY_ID/companyinfo/YOUR_COMPANY_ID

To get your company ID, click the Gear icon in the top right corner of your navigation bar while logged into QuickBooks, and navigate to Billing and Subscriptions. You’ll see your company ID listed at the top:
quickbooks-img4

Putting it all together, we get the full API Request URL. Note that you enter your company ID twice:

https://quickbooks.api.intuit.com/v3/company/YOUR_COMPANY_ID/companyinfo/YOUR_COMPANY_ID

PART 3: PULL QUICKBOOKS API DATA INTO SHEETS

Now let’s add this URL into API Connector and import QuickBooks data into Google Sheets!

  1. Back in the Create Request interface, enter the Request URL we created above.
    quickbooks-img6
  2. In the Headers section, enter the following sets of key-value pairs:
    acceptapplication/json
    content-typeapplication/json
  3. Under Authentication, choose QuickBooks from the dropdown menu.
    quickbooks-img5
  4. Create a new tab and click ‘Set current’ to use that tab as your data destination.
  5. Name your request and click Run. A moment later you’ll see some information about your company populate your sheet.
    quickbooks-img7

PART 4: MORE EXAMPLE API URLS

The QuickBooks API uses a query language similar to SQL. You can access the full API documentation here, but only the “query” endpoint responses work well with Sheets. Therefore, it’s recommended to start with the following examples. Try the following URLs (one at a time), substituting in actual values where indicated.

  • Chart of Accounts
    https://quickbooks.api.intuit.com/v3/company/YOUR_COMPANY_ID/query?query=select * from Account
  • Bills
    https://quickbooks.api.intuit.com/v3/company/YOUR_COMPANY_ID/query?query=select * from Bill
  • Customers
    https://quickbooks.api.intuit.com/v3/company/YOUR_COMPANY_ID/query?query=select * from Customer
  • Employees
    https://quickbooks.api.intuit.com/v3/company/YOUR_COMPANY_ID/query?query=select * from Employee
  • Invoices
    https://quickbooks.api.intuit.com/v3/company/YOUR_COMPANY_ID/query?query=select * from Invoice
  • Items
    https://quickbooks.api.intuit.com/v3/company/YOUR_COMPANY_ID/query?query=select * from Item
  • Payments
    https://quickbooks.api.intuit.com/v3/company/YOUR_COMPANY_ID/query?query=select * from Payment
  • Vendors
    https://quickbooks.api.intuit.com/v3/company/YOUR_COMPANY_ID/query?query=select * from Vendor
quickbooks-img8

PART 5: HANDLE PAGINATION

By default, QuickBooks will only return 100 records at a time, as described in their documentation.
quickbooks-img9

To get more, use the STARTPOSITION and MAXRESULTS parameters as shown below. MAXRESULTS accepts any number up to 1000.
quickbooks-img10

9 thoughts on “Import QuickBooks Data to Google Sheets”

    • Can you please double-check that you have access to the account you’re querying? That’s the only way I can produce a 403 error in my own tests. If you still have issues, please message support with a link to your sheet or screenshot of your request setup.

      Reply
  1. Hi Ana,

    Did you find how to get invoices from a custom period:

    This is what I was using:

    https://quickbooks.api.intuit.com/v3/company/YOUR_COMPANY_ID/query?query=select * from Invoice Item MAXRESULTS 1000

    Reply
      • Awesome, yeah that looks right to me. Based on their docs you can use MetaData.CreateTime or MetaData.LastUpdatedTime in your query.

      • I saw this example in their docs, does it work for you?
        SELECT * FROM Invoice WHERE MetaData.CreateTime >= '2009-10-14T04:05:05-07:00' AND MetaData.CreateTime <= '2012-10-14T04:05:05-07:00'

      • Hi Ana,

        I used: https://quickbooks.api.intuit.com/v3/company/+++Inputs!C3+++/query?query=SELECT * FROM Invoice WHERE MetaData.CreateTime >= '2021-01-01T00:00:00-00:00' AND MetaData.CreateTime <= '2021-04-01T00:0:00-00:00'

        I get :

        Completed with errors
        – Server responded with an error (400) show response{"Fault":{"Error":[{"Message":"Demande non valide","Detail":"Erreur de validation de demande : value 2021-04-01T00:0:00-00:00 is not valid for property 'MetaData.CreateTime'","code":"4001"}],"type":"ValidationFault"},"time":"2021-04-19T18:04:48.423-07:00"}

        Do you see why?

      • It looks like you’ve written 2021-04-01T00:0:00 instead of 2021-04-01T00:00:00, can you please check if adding the 0 resolves the issue?

Leave a Comment