Google Sheets (prebuilt connector)
Description
Google Sheets is whatever you want it to be! Retrieve and update data from your sheets as needed.
API documentation
API documentation for Google Sheets (used to build this connector) can be found via the link below:
Authentication
When adding connector instances for Google Sheets, the following authentication methods are supported:
OAuth 2 (client credentials)
When a user chooses to add a connector instance using OAuth 2 (client credentials) authentication, the credentials below are required:
Credential | Required? | Notes |
---|---|---|
| Follow the steps detailed below (your client ID is generated in Stage 3). | |
| Follow the steps detailed below (your client secret is generated in Stage 3). | |
| Follow the steps detailed below (your refresh token is generated in Stage 5). |
Prerequisites
You must have a Google Workspace account that's part of an organisation.
The steps
Stage 1: Create a Google APIs and services project
Step 1 Access the Google APIs console - APIs and Services.
Step 2 If you haven't got an account already, go ahead and create one (use the Google account associated with the sheets you want to access).
Step 3 Click the create project button.
If you have existing projects, this page may not be the same. If you can't see a create project button, click the dropdown at the top of the page to open the select a resource page, then click the new project button:
Step 4 Enter an appropriate name for this project (leave other settings as they default) and click the create button:
Stage 2: Configure consent screen
Step 1 Select OAuth consent screen from the left-hand navigation menu:
Step 2 Select the internal radio button and then click the create button:
Step 3 Complete app information:
The only mandatory fields are:
Field | Summary |
---|---|
App name | We recommend something clearly identifiable as a Patchworks integration |
User support email | Enter your own email address. |
Developer contact email address | Enter your own email address. |
Step 4 Click save and continue.
Step 5 Click the add or remove scopes button:
Step 6 Add the following in the manually add scopes section:
...then select add to table:
Step 7 Click the update button at the end of the page:
Step 8 Check that the new scope has been added under sensitive scopes:
Step 9 Click save and continue at the end of the page:
Stage 3: Create OAuth credentials
Step 1 Select credentials from the left-hand navigation menu:
Step 2 Click the create credentials button:
Step 3 Select OAuth client ID:
Step 4 Select web application:
Step 5
Enter a name for this application - we recommend something clearly identifiable as a Patchworks integration, for example Patchworks Web Client
:
Step 6 Move down to the authorised redirect URIs section and click the add URI button:
Step 7 Enter the following URI:
Step 8 Click the create button:
Step 9 Your client ID and client secret are displayed - copy these and add them to your password manager so they're available in the next stage (and for later use in Patchworks):
Step 10 Click OK to close this window.
Stage 4: Apply credentials in the OAuth playground
Step 1 In a new browser tab/window, access the following URL to access the OAuth playground:
Step 2 In the top-right corner, click the 'cog' icon to access OAuth 2.0 configuration:
Step 3 At the end of the configuration page, select the use your own OAuth credentials checkbox:
Step 4 Add your client ID and client secret (created in the previous stage) into given fields:
Step 5 Close this window.
Stage 5: Obtain a refresh token
Step 1 Still in the OAuth playground, move to the end of the left panel and enter the following URL in the input your own scopes field:
...then click the authorise APIs button:
Step 2 When prompted, log in with the same Google account that you started with in Stage 1:
...you should see confirmation that your app (in this case named Patchworks) has access to Google spreadsheets associated with this account:
Step 3 Click allow to continue to the OAuth 2.0 playground.
Step 4 Click the exchange authorization code for tokens button:
Step 5 Copy the refresh token and add it to your password manager.
Stage 6: Enable the Google Sheets API
Step 1 Switch back to your Google APIs console - APIs and Services tab/window and select enabled APIs and services from the left-hand navigation menu:
Step 2 Select enable APIs and Services at the top of the page:
Step 3 Search for Google sheets API:
Step 4 Click the Google sheets API result tile:
Step 5 Click the enable button:
Step 6 Google Sheets setup is now complete. If you haven't done so already, you can install the Google Sheets connector from the Patchworks marketplace and then use your client ID, client secret, and refresh token to add required connector instances.
Last updated