Print

Troubleshooting

While using the API Connector add-on for Google Sheets, there may be cases where your API request doesn't work, or returns an error message. This article will describe some known issues and ways to troubleshoot issues with your API requests.

Related article: Error Messages

Contents

Add-on Stuck at Loading

api-connector-loading-stuck

If you see a screen like this after hitting Edit or Create request, it's likely because Google doesn't support multi-login (being logged into multiple Google Accounts at once) for Sheets extensions. To resolve, log out from all Google accounts and log back in first with the account you're using with Google Sheets (you can log back into your other accounts after) or re-open Sheets + API Connector in a new incognito window.

If you're using Safari, this same issue may cause the entire add-on interface to be blank white instead.

Issues with unresponsive or frozen buttons and menus indicate a problem with your browser. We've seen problems related to Brave browser, aggressive pop-up blockers, and other browser extensions that produce conflicts or block various functionality.

Solution

To address, run through the following suggestions. The exact cause of the issue depends on your browser, so you may need to try multiple suggestions from this list.

  1. Run API Connector in incognito/private browser mode, or a separate Chrome profile
  2. Run the add-on in another browser
  3. Disable pop-up blocking in the browser
  4. Disable all extensions and re-run. In Chrome, you can view all your browser extensions by clicking the three-dot menu in the top right of your browser and navigating to More tools > Extensions.
  5. Clear cache and cookies
    • Chrome: click here 
    • Firefox: click here 
    • Edge: click here 
    • Safari: click here 

Authorization Errors

Make sure you've entered any required authorization credentials into the Headers table, and that you've encoded them to Base 64 if basic access authentication is required.

Cookies

API Connector can't access and attach cookies to your request. This means that API Connector will not work with any API that requires cookies.

Duplicate Data

There are a few configuration issues that can lead to duplicate data in your report:

  • Multiple requests running and printing data into the same sheet. Double check requests and triggers to make sure only one request is sending data to the report.
  • Re-fetching data that already exists in the sheet. When using append mode, make sure the request is configured so that it doesn't pull in duplicate data. More information >
  • Merge mode may produce duplicate records if the merge key hasn't been set correctly. More information >

Error Messages

Pay attention to any error details as they will alert you to specific fields that need to be addressed. This article on Error Messages provides more details on each message.

Extensions Menu Greyed Out

The Extensions menu may be inaccessible / greyed out in Google Sheets. The most common reason is because the user does not have high enough access to the sheet. To resolve, grant Edit access to the affected user.

Formulas Overwritten

By default, all data will be cleared to the right and below the starting cell.

If you are including calculations and formulas in your sheet, we recommend adding them into columns on the left. Then you can set a destination cell to the right of those formulas, such that they don't get overwritten.

Inconsistent Column Order

In some cases, an API returns data in a different order, or doesn't send keys that aren't populated with values, resulting in mismatched column orders between pulls.

The easiest way to keep columns in place is to click Edit fields after creating your request. This will open the visual field editor, where you can choose the fields you'd like to display in your sheet and map them to a specific column.
troubleshooting-editfields

Alternative methods include:

  • re-arrange data with a JMESPath expression
  • query individual columns by name into a second sheet using this Sheets function, replacing data with your sheet name, and field_name with your field name: =QUERY(data!$1:$10000,"SELECT "&SUBSTITUTE(ADDRESS(1,MATCH("field_name",data!$1:$1,0),4),1,""),1)

Inconsistent Row Order

Most APIs don't send row data back in a fixed order. They may apply a default sort order, for example alphabetical, or perhaps largest to smallest, in which case new values will be inserted into the response data as the data set updates. Other APIs send data back in an entirely random order.

By default, API Connector prints out the data as it gets returned, so if the record order changes between API fetches, the row order will change as well.

If you would like to create a fixed table in which the row order doesn't change, there are 2 main approaches:

  1. Pull the API response data into a raw data sheet, and then create your table in a second tab. Use native Google Sheets functions like VLOOKUP, XLOOKUP, or MATCH to fetch data from the raw data sheet into your data tab. This way it doesn't matter how the API sends back data, or if the rows get rearranged, since data will be ordered based on the lookup value.
  2. Use API Connector's merge mode to update your table. When you use merge mode, values in your sheet will retain their position. However, any new values will be appended to the end of your sheet, which may not be what you're looking for.

VLOOKUP is probably the most common and easily applied solution to bring data from one table to another, while keeping the row order the same. It also allows for a separation between the data layer and the presentation layer, as you can create a nicely formatted table that doesn't get overwritten. Here is Google's official documentation on VLOOKUP; there are many online guides and videos as well.

Incorrect Content-Type

When making POST requests, we tell the server how to parse the content using a content-type header that describes the object’s format. For example, API Connector may automatically set the content type to application/x-www-form-urlencoded, so you don't have to set it yourself. If your server expects a different content type, you can manually set the content type to override it, by adding key/value pairs to the Headers table.

Missing Fields

API Connector is a pipeline connecting APIs to Google Sheets and in general prints out whatever the API returns. Therefore, if you're not seeing fields that you expect, first check the raw API response and confirm that the API has indeed sent back the fields you're looking for. If not, you will need to check the API documentation and adjust your API request configuration.

If you see fields in the raw response but not in your sheet, you may have inadvertently applied a JMESPath filter or a field mapping that filters them out. To remove these, check the following:

  1. Click Output options > JMESPath and remove any JMESPath expression
  2. Click Edit Fields > Refresh Fields to reset any field mapping

Missing Records (Pagination)

By default, many API servers return only a limited number of rows in each response. This is known as "pagination". To retrieve data you need to fetch data page by page.

In API Connector, you can automatically loop through paginated responses using pagination handling (paid feature).

Non-JSON/CSV/XML Response Types

API Connector supports all three major data formats: JSON, XML, and text/CSV. If you request data in another format, apply JMESPath that converts the response into a non-JSON/CSV/XML format, or request a 'regular' HTML website URL rather than an API endpoint, the request won't work as expected.

If API Connector doesn't recognize your upgraded account status after purchase, try the following:

  • Click the Account icon in the footer of API Connector to update the cache and force a refresh of your account status.
  • Double-check that you're using the same email address you entered into the purchase form. You will need to be logged into Sheets with the same email address that purchased the license.

Quotas and Limits

The API you're accessing may limit the number or rate of requests. Google Sheets itself also has built-in limits, as documented here: https://developers.google.com/apps-script/guides/services/quotas. There is a limit of 20,000 API calls quota per day per user, per sheet.

To avoid inadvertently reaching these limits, limit triggers and queries where possible (e.g. don't run hourly refreshes if you only need daily). Since these limits are per user, you may also hit the API limit if you're running your own custom scripts or functions in addition to requests from API Connector.

Rate Limits

Many APIs limit the number of requests you can send per minute. Generally API Connector doesn't hit these limits as it automatically inserts 2 second delays between stacked or paginated requests. However, there are two scenarios where it's more likely to run into rate limits:

  • when using popular, open APIs. Open APIs often rate limit by IP address, and large numbers of people use these APIs to pull data to Google Sheets. All requests in Google Sheets run through Google's shared IP address pool at the same time, such that rate limits can be triggered even when you personally aren't running a large number of requests. Because of this, it's generally best to find APIs limited by API keys rather than IP address.
  • The IMPORTAPI custom function can rapidly fire off large numbers of requests. Please apply IMPORTAPI carefully or use the standard sidebar method to avoid these issues.

Request Syntax Errors

When you're reading API documentation, you'll likely see examples based on different coding languages. Don't copy these in directly -- API Connector is a no-code method of interaction with APIs, so pasting in code snippets won't work.

Wrong: https://api.football-v1.com/v2/players/player/{player_id}
Right: https://api.football-v1.com/v2/players/player/29

Just type in the URL, any headers, and other options. Check the knowledge base for an example of what a completed API request looks like.

Requests Timing Out

Request processing time relates to both waiting for the server to respond and converting/processing the response into a tabular format for Sheets.

Therefore, if requests are timing out, first fetch the raw data from the server (click Output options > More > View API Response).

If the server responds normally (i.e. within a few seconds), then the the issue likely lies with converting the response into a table for Sheets. Very large or deeply nested data sets may cause API Connector to time out or stop responding, due to Google Sheets' 6-minute per request limit.

Solution

To resolve this issue, try any or all of the following:

  • limit the size of your request. Most APIs let you limit request size via date- or ID-based query strings. You can usually use these query strings to fetch new data only instead of re-fetching an entire data set.
  • switch to 'compact' or 'grid' report style. The algorithm for the default single-row output takes a little longer to run, since it needs to process and flatten all the nested data into a single row.
  • if you are using pagination handling, set the request to stop running after 1 or 2 pages, to see if the issue lies with pagination settings (either too many loops, or improper configuration).
  • use the field editor or JMESPath filters to reduce the number of fields printed into your sheet.
  • processing time may increase if your sheet contains a lot of formulas that update as the API request changes cell values. Therefore, running your requests in a fresh new sheet may help.

Note

If none of the above work, the issue may lie with the underlying structure of the JSON. To determine if this is the case, inspect the raw JSON (or contact support with your raw JSON file so we can take a look).

JSON structures that contains only objects nested into obects without arrays, or that use keys when values would normally be used, e.g. {"2023-01-01":"0","2023-01-02":"1","2023-01-03":"1"} instead of {"date":"2023-01-01","value":"0","date":"2023-01-02","value":"1","date":"2023-01-03","value":"1"}, can produce a very large number of columns and time out the report.

Restricted User Agent

Google Apps Script doesn't enable custom user agents. This means any request from API Connector will use Google script's default user agent 'Mozilla/5.0 (compatible; Google-Apps-Script)'. Unfortunately certain APIs may block requests from Google's user agent.

To test if you're encountering this issue, you may test your request through a different API client like Postman. In the Headers section, input a Key of User-Agent, and a Value of Mozilla/5.0 (compatible; Google-Apps-Script) to replicate the setting automatically applied by Google Apps Script.

If you find that your request fails when using Google's user agent, you will need to ask the platform to lift this restriction on their API.

Restricted IP Address

All API requests through Apps Script (the scripting language used by Sheets) originate from a set pool of IP ranges associated with Google's servers. This may prevent a request from resolving if the API has blocked requests from Google's IP addresses, or if the API requires all IP addresses to be whitelisted in advance.

Google provides all the IP ranges used by Apps Script here. Each IP address shown is followed by a slash (e.g. 34.80.0.0/15), indicating that it represents a range. To see the full range represented by each entry, you can use an IP range conversion tool like the one here: https://www.ipaddressguide.com/cidr.

Scheduling Issues

If you are experiencing issues with your scheduled reports, please consult this list of troubleshooting tips specific to triggers: Troubleshooting Triggers

Sidebar Doesn't Scroll

When using the Firefox browser, the scroll bar may not work consistently.

To address, open the hamburger menu in the top right and navigate to Settings > General > Performance. Untick the Use recommended performance settings box, as well as the Use hardware acceleration when available box.
troubleshooting-firefox

Close and re-open Firefox, and scroll bars should work again.

After completing this, you can test re-enabling recommended performance settings.

Wrong Format

API Connector prints out data as it's received. If the data output does not look as expected, that could be because of how the API has sent the data, or because of how Google Sheets has interpreted the format.

Sometimes you may be able to adjust the format by simply changing the formatting applied to the column in Sheets. In other cases, you may find it more effective to alter the data through a Sheets formula.

Tips for applying Sheets functions:

  • Apply Sheets functions directly to fields through the field editor: https://mixedanalytics.com/knowledge-base/choose-and-edit-fields/#editfields-formulas. This will let you pre-process the data before it gets printed into the sheet.
  • Alternatively, if you're adding functions after the data has already been printed into the sheet, add them into columns on the left. Then set the destination cell to the right of those formulas, ensuring the formulas don't get overwritten when the data refreshes.
  • If you're adding functions to your sheet, use array formulas where possible. Array formulas apply to the entire column so you don't need to copy them down as the data set expands.

Wrong Format (Currency)

Currency format issues are a common subset of the more general "Wrong Format" issue.

API Connector prints out data in the format the API sends it, which sometimes causes a conflict with the settings of the sheet. For example an API may return data in the US format (e.g. $1,234.56), which displays strangely in a sheet set to a German locale.

To address, try the following:

  • Set the sheet locale to US as this is the most common format (File > Settings > Locale)
  • If changing the locale isn't convenient, you can instead apply a Sheets formula through the field editor to convert the data. For example, this function will convert all periods to commas, and vice versa, and can be selected from the preset formula menu: =substitute(substitute(substitute(E2;",";"#");".";",");"#";".")*1.
  • If you prefer to add it separately into your sheet, add the formula(s) into column A, and set the data destination to column B. This will prevent your formulas from getting overwritten. If you add the formula to your sheet rather than through the field editor, you can use an array formula like =arrayformula(if(E2:E<>"";substitute(substitute(substitute(E2:E;",";"#");".";",");"#";".");"")*1). When you use an array formula, you only need to enter it once (in, say, cell A2) as it will automatically apply to the entire column.

Other

Still having trouble? Check out the knowledge base or leave a post in the user community. You'll receive a response shortly!

24 thoughts on “Troubleshooting”

  1. Ana, all my api calls have been working very well until yesterday.

    I keep getting this error message:
    Completed with errors
    - Attribute provided with invalid value: Header:Redirect URL

    This is the call: https://api.sky.blackbaud.com/school/v1/academics/schedules/sets/11286

    It works perfectly on the developer's page of Blackbaud
    Not sure what I should try next.

    Thanks very much,

    Brian

    Reply
    • Is this a request that you've been running without issue for a while, or is it a new request? The "Attribute provided with invalid value" error generally means there's an incorrect header key, does your request contain a header called "Redirect URL"?

      Reply
  2. Hi Ana
    I'm receiving the error message below
    This seems new to me. Even running the script several times doesn't help (it used to)... :/
    Has the script stopped working?
    ---
    1) Data: Completed with errors
    - We received an error from coingecko.com (429) show response
    {"status":{"error_code":429,"error_message":"You've exceeded the Rate Limit. Please visit https://www.coingecko.com/en/api/pricing to subscribe to our API plans for higher rate limits."}}

    Reply
  3. Hello Ana,

    I use Mixed Analytics on google sheet, when i try to edit my request, the loading fail and i get a screen with a cross.
    is there trouble on your side ?

    Reply
  4. Hi

    We are an accountancy firm that have multiple client companies that I wish to connect to google sheet to pull data from. It seems that I can only connect to one company and then have to disconnect the existing connections and create a new connection for another company. How do I create multiple Quickbooks connections ? (under OAuth)

    Reply
  5. tôi đã gửi email về sự cố nhưng chưa được giải đáp . Có cả hình ảnh sự cố nhưng ở đây không có mục gửi ảnh lên . Xin check email để giúp đỡ tôi. Xin cảm ơn !

    Reply
  6. I have tried to follow step by step the process outlined here but once I run the request I created, the output it brings has column headers titled: count, next, previous, results:1 ...instead of exporting the data. What I'm I missing?

    Reply
    • Please hit Edit fields > View raw response and check the raw response from your API request. If you see data there and not in your sheet, then most like you've applied a filter, and can remove it as described here. If the data isn't there at all then there's an issue with the request itself and you'll need to edit your request URL/body.

      Reply
  7. In Google Sheets menu Extensions/API Connector there's no "Open" for me, only "Help", and I can't even open the sidebar. What am I doing wrong?

    Reply
  8. Hello!
    I am having trouble with the rows / columns placement of the archived data. I need the "fresh" data to be collected in the next columns, but whether I select rows or columns in the sidebar, this new data is added in the rows below the old data. The option "Paste To Next Empty Range" is checked. How can I solve this?
    Thank you very much.

    Reply
    • This is a question about the Archive Data extension, not API Connector, correct? I'm not sure why selecting "columns" isn't working, since that option is designed to add new data to the columns next to the old data. Can you please contact support with a screenshot of your setup or a link to your sheet?

      Reply
  9. Hello!

    I hope this message finds you well. I am writing to seek assistance with an issue I'm currently experiencing with Google Sheets extension.

    Issue Description:
    - Inability to edit, run, or delete any requests within the extension.
    - Inability in navigating between tabs in the extension interface.

    Troubleshooting Steps Taken:
    - Refreshed the Google Sheet multiple times.
    - Completely closed and reopened Google Chrome.
    - Attempted to access the extension on different sheets to check if the issue is isolated to a specific document.

    Unfortunately, none of these steps have resolved the issue. I woul appreciate any guidance or solutions you could provide to resolve this issue.

    Thank you in advance!

    Reply
    • Sorry for the inconvenience, this is a bug currently affecting all Chromium-based browsers (i.e. Chrome, Edge, and Brave). You can see updates on this issue in Google's bug tracker here: https://issuetracker.google.com/issues/313466551

      Google has responded to that thread so hopefully they will fix the issue soon, but for now please try a different browser (Firefox or Safari).
      Update: This issue has now been resolved.

      Reply

Leave a Comment

Jump To