Google Sheets

This guide provides step-by-step instructions for connecting Google Sheets to Unistream.

Prerequisites

You will need:

  • A Google account with access to the spreadsheet(s) you want to connect

  • Access to Google Cloud Console (to create OAuth credentials)

  • The Google Sheets spreadsheet you want to connect

  • Unistream platform credentials


Step 1: Set Up Google Cloud OAuth 2.0 Credentials

Before connecting to Unistream, you need to create OAuth 2.0 credentials in Google Cloud Console.

1.1 Enable Google Sheets API

  1. In your project, go to APIs & ServicesLibrary

  2. Search for "Google Sheets API"

  3. Click on Google Sheets API

  4. Click Enable

1.2 Create OAuth 2.0 Credentials

  1. Go to APIs & ServicesCredentials

  2. Click + CREATE CREDENTIALSOAuth client ID

  3. Select Application type: Web application

  4. Enter a name: "Unistream Google Sheets Connector"

  5. Under Authorized redirect URIs, add:

    • https://developers.google.com/oauthplayground

  6. Click Create

  7. Important: Copy and save the Client ID and Client Secret

1.3 Obtain Refresh Token

  1. In the left panel, find and select:

    • Google Sheets API v4https://www.googleapis.com/auth/spreadsheets.readonly

  2. Click Authorize APIs

  3. Sign in with your Google account

  4. Allow the permissions

  5. Click Exchange authorization code for tokens

  6. Important: Copy and save the Refresh token


Step 2: Find Your Google Sheets Information

2.1 Get Spreadsheet ID

Your Google Sheets URL looks like this:

The Spreadsheet ID is the long string between /d/ and /edit

Example:

2.2 Identify Sheet Names and Ranges

  1. Open your Google Sheets

  2. Note the sheet names (tabs at the bottom)

  3. Determine the data range you want to sync:

    • Full sheet: Leave range empty or use A1:Z (adjust Z to your last column)

    • Specific range: Use Excel-style notation (e.g., A1:D100)

    • Named range: Use the named range from your spreadsheet

Step 3: Connect to Unistream

3.1 Add Google Sheets Source

  1. In Unistream, navigate to Lake

  2. Click Add Source

  3. Select Google Sheets

3.2 Configure General Fields

Fill in the General Fields:

  • Name: Enter a descriptive name for your connection (e.g., "Sales Data Google Sheets")

  • Code: Enter a unique code identifier (e.g., "sales_gsheets")

3.3 Configure OAuth

Fill in the OAuth Configuration:

  • Client ID: Paste the OAuth 2.0 Client ID from Step 1.3

  • Client Secret: Paste the OAuth 2.0 Client Secret from Step 1.3

  • Refresh Token: Paste the Refresh token from Step 1.4

3.4 Configure Spreadsheet

Fill in the Spreadsheet Configuration:

Option A: Enter Spreadsheet ID directly

  • Spreadsheet ID: Paste the Spreadsheet ID from Step 2.1

Option B: Extract from URL

  • Paste the full Google Sheets URL in the "Or extract from URL" field

  • Click Extract ID

  • The Spreadsheet ID will be automatically populated

3.5 Configure Sheets

Configure which sheets and ranges to sync:

  1. Click + Add Sheet

  2. For each sheet you want to sync:

    • Sheet name (required): Enter the exact name of the sheet (tab name in Google Sheets)

    • Range: Enter the data range (e.g., A1:B10, AA1:BC100)

    • Click Save

  3. Repeat for additional sheets

Need Help?

If you encounter any issues not covered in this guide, please contact Unistream support

For Google Cloud and OAuth-specific issues, refer to Google's OAuth 2.0 documentationarrow-up-right

Last updated