Skip to main content
Google Sheets logo

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

Read data from a Google Sheet and use it within an Application

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

Write data into a Google Sheet using a backend API

Setting up Google Sheets

Select Google Sheets from the 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'. Connect to Google Sheets using a 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.

Use Google OAuth to connect to Google Sheets
Allow Superblocks permissions to access your Google Sheets

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

Read the whole spreadsheet to pull in data from Google Sheets

Use cases

Applications

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

Visualize an entire Google Sheet data in applications using a table component

Workflows

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

Use a workflow to send emails to 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.

Use a scheduled job to copy Postgres data into Google Sheets and send out a daily report

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@superblocks.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.

Unexpected Token in JSON

Error: Google Sheets request failed. Failed to parse rows to append as JSON: Unexpected token * in JSON at position 15

Proper syntax for writing into a spreadsheet encloses the bindings in quotes in the Rows to append field. Example:

[
{
"Name": "{{nameInputUpdate.value}}",
"Favorite Food": "{{foodInputUpdate.value}}",
"Email": "{{emailInputUpdate.value}}"
}
]

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.