Skip to main content

Authorization

In order to get started with the Google Sheets Blueprints, a service account with the necessary GCP permissions is required. Additionally, this Service account will need to be invited to any Google Sheet you wish to access programatically.

Creating a Service Account for Google Sheets​

  1. Login to your GCP console
  2. Using the top selector, choose the Project where you want your Google Sheets service accounts to live.

  1. Search for "Google Sheets API" in the search bar

  1. Depending on your existing setup, either click "ENABLE" or "MANAGE"
  2. Click "Credentials" in the sidebar

  1. Click "+ CREATE CREDENTIALS" and select "Service account" from the options

  1. Add a service account name
    a. Do not edit the ID field which will auto-populate
    b. Optionally add a description to the service account

  1. Click "CREATE AND CONTINUE"
  2. Click "Select a role" dropdown
    a. Scroll down the options and hover over "Basic"
    b. Select "Editor"

  1. Click "CONTINUE"
  2. Click "DONE"
  3. Find the new service on the service accounts table
    a. Click the pencil icon under the "Actions" column to edit

  1. Click the "KEYS" tab at the top

  1. On the Keys tab, click the "ADD KEY" dropdown and select "Create new key"
  2. Click "Create new key"

  1. In the popup modal select "JSON" and click "CREATE"
  2. Copy the downloaded file JSON contents and save for safe keeping. The contents of this file can be pasted into the "Service Account" input for all Google Sheets Blueprints.

Inviting a Service Account to a Google Sheet​

  1. Navigate to the credentials page for the Google Sheets API.
  2. In the table shown, copy the email/name of the service account you want to use. It should be formatted like name@project.iam.gserviceaccount.com

NOTE: This value can also be found either be found under "client_email" in the Service Account JSON.

  1. Navigate to the Google Sheet you're wanting to use.
  2. Click the Share button.

  1. Paste the email of the service account from step 2 and click the email option that appears (or press Enter)

  1. Ensure that the Service Account email has Editor access.
  2. Click "Send".

  1. Click "Share anyway"

  1. Now you can start using any of our Blueprints with that sheet!

INFO: Pro Tip Want to access multiple Google Sheets files with the same credentials? You can also share Google Drive folders with the Service Account Email, causing every file in that folder to be accessible.

Accessing the Sheet Name or ID​

  1. Navigate to the Google Sheet you want to access with a Blueprint.
  2. a. Copy the Name, shown in the top-left of the screen. This name is case sensitive. OR
    b. Copy the ID, found in the URL https://docs.google.com/spreadsheets/d/sheet_id/edit

INFO: Pro Tip The ID of your Spreadsheet will never change, while the Spreadsheet name can be updated. We recommend using the ID where possible.