Skip to content

Importing from Google Sheets

Google Sheets is a popular web-based spreadsheet operated by Google. You can import your Google Sheets spreadsheets into Sheetlabs directly, without first needing to download and then upload them.

To import from Google Sheets:

  1. Navigate to Data Tables from the menu at the top, and then click “Import from Google”.
  2. At this point you will be prompted to give Sheetlabs access to your Google account. Sheetlabs only needs access to your spreadsheets in your Google Drive account. Once Sheetlabs has access to your Google account you will be presented with a searchable list of all of your Google Sheets.
  3. To begin importing your Google Sheet into Sheetlabs, simply click the Import button next to the row in question.
  4. Once the import has been completed, you will be able to begin creating an API.

If your spreadsheet is very large (over 10MB) then it will be imported in the background and may take a few seconds or even a few minutes to import. During this time you will not be able to use it for creating APIs.

Automatic updates

You can optionally keep Sheetlabs in sync with your Google Sheet. To do this, check the box "Refresh data automatically" whilst setting up the table. You can change this later by clicking Edit next to a data table.

Please note that this synchronisation process is one-way (Sheetlabs pulls data from Google Sheets; it does not write data back to Google Sheets). If you make changes to your data table in Sheetlabs then the changes will not be reflected in the original Google Sheet. Moreover, if you change the data in the data table in Sheetlabs and then re-sync data from Google, then your changes will be lost.

Data will typically be updated within 10-30 seconds of your Google Sheet being changed. However, this may increase to a few minutes if you are making very frequent changes to the Google Sheet. In these cases Google will notify Sheetlabs of changes less frequently. Please note that Google Sheets hosted on Shared Drives within your Google account will only update once every 15 minutes.

Handling errors

If you have significantly changed the structure of your data in Google Sheets, then Sheetlabs will not be able to import the data automatically. In these cases you will be notified via email that the import has failed, and a description of the error that was encountered will be included.

Forcing a Google Sheet update via API call

If you need to programmatically force an immediate update for a linked Google Sheet, you can make an API request as follows:

curl \
    -X POST \
    -u "user@example.com:auth_token" \
    "https://sheetlabs.com/datatables/google_refresh/{table_id}?force=true"