Skip to main content

Google Sheets

Overview

Connect Superblocks to Google Sheets so you can build apps without needing to manage a database:

  • Read data from a spreadsheet and utilize it in API steps or UI components

  • Save information retrieved by other API steps or UI components by writing data to a spreadsheet

Setting up Google Sheets

Select Google Sheets from the in-app Integrations page and fill out the form according to your preferred authentication method, either a standard user based Google Account or a non-human Service Account that you can share specific spreadsheets with:

  • Display Name - Name that will be displayed to users when selecting this integration in Superblocks resources
  • Authentication - Connect using Google Account
  • Access Level - 'Read only' or 'Read and write'
caution

To restrict access to certain sheets in your Google Account, use a Service Account to connect to Superblocks.

After configuring the above, click 'Connect to Google account'.

Then follow the OAuth popup instructions to grant Superblocks access to your Google Account.

caution

Note: You need to grant both "See information about your Google Drive files" and "See all your Google Sheets spreadsheets" (for read access) or "See, edit, create, and delete all your Google Sheets spreadsheets" (for read and write access) when connecting. If you'd like to limit access on a per-spreadsheet basis, use a service account.

Once you are connected, Click "Create Integration" to finish the integration setup.

info

Currently, Staging and Prod environments must use the same account

Creating Google Sheets steps

Connect to your Google Sheets integration from Superblocks by creating steps in Application APIs, Workflows, and Scheduled Jobs. You can configure a Superblocks Google Sheets step to read a spreadsheet (whole or range), as well as append new rows to a spreadsheet. See example configuration for each type of action below.

Specify the settings:

  • Action - Read the whole spreadsheet
  • Spreadsheet - Name of the spreadsheet
  • Sheet name - Name of the sheet / tab
  • Table Header - Choose to use Row 1 of the sheet as the table header

Use cases

Applications

Read an entire Google Sheet and attach the API response to a Table component to visualize the Google Sheet in Superblocks.

Workflows

Automate sending a marketing campaign email to all your sales leads contained in a Google Sheet.

Scheduled Jobs

Copy data from Postgres to a Google Sheet on a daily basis for teams who need to see info on new bookings, but don't have access to the database.

Troubleshooting

When using or configuring the Google Sheets integration, you may come across errors. Below we list the most common errors and basic troubleshooting steps. If you are encountering an error that you don't see below, or the provided steps are insufficient to resolve the error, please contact us at help@superblockshq.com.

Insufficient permission

Error: Google Sheets client configuration failed. Insufficient Permission: Request had insufficient authentication scope

You can troubleshoot this error by making sure that all required permissions are allowed as requested by the Google Sheets integration. You need to grant both "See information about your Google Drive files" and "See all your Google Sheets spreadsheets" (for read access) or "See, edit, create, and delete all your Google Sheets spreadsheets" (for read and write access) when connecting. If you'd like to limit access on a per-spreadsheet basis, use a service account.

Token access revoked

Error: Failed to refresh user token on server, most likely the access has been revoked

If you receive this error, it means that your user token has had its access revoked on the Google side. Please recreate the Google Sheets integration in order to resolve this issue.

No spreadsheets are loading

If you see that your spreadsheets are not loading in and you're using a service account, double check that you have enabled the Google Drive and Google Sheets API in your GCP project. Additionally, only sheets that have been shared with the service account email will be available.