Google Sheets Component
Manage spreadsheets, sheets, and rows in Google Sheets.
Component key: google-sheets
Description
Google Sheets is a cloud-based spreadsheet service from Google. This component allows you to create and manage spreadsheets, manipulate sheets and rows, and read cell data within Google Drive.
API Documentation
This component was built using the Google Sheets API v4. Additional information can be found in the Google Sheets API Guides.
Connections
Google Sheets OAuth 2.0
key: oauth2The Google Sheets component authenticates requests through the Google Cloud Platform (GCP) OAuth 2.0 service. A GCP OAuth 2.0 app is required for the integration to authenticate and perform Google Sheets tasks on behalf of users.
Prerequisites
- A Google Developer account (sign up at https://console.cloud.google.com/)
Setup Steps
To create a Google Sheets OAuth 2.0 app:
- Open the Google Sheets API console at https://console.cloud.google.com/apis/api/sheets.googleapis.com.
- Click CREATE PROJECT to create a new GCP project, or select an existing project.
- Enable the Google Sheets API for the project by clicking ENABLE.
- On the sidebar, select Credentials.
- Configure the OAuth 2.0 Consent Screen by clicking CONFIGURE CONSENT SCREEN.
- Choose a User Type of External so the app will be available to users outside the organization.
- Fill out the OAuth consent screen with an app name, support email, and other required information.
- On the Scopes page, add the necessary scopes (see scope configuration below).
- Enter test users for testing purposes. The app will only work for those testing users until it is published.
- When ready for production, click PUBLISH APP on the OAuth consent screen to allow users to authorize the integration.
- Once the consent screen is configured, open the Credentials page from the sidebar.
- Click +CREATE CREDENTIALS and select OAuth client ID.
- Under Application type select Web application.
- Under Authorized redirect URIs enter the OAuth 2.0 callback URL:
https://oauth2.prismatic.io/callback - Click CREATE.
- Copy the Client ID and Client Secret that are generated.
Make sure to publish the OAuth 2.0 app after testing so users outside of the test users can authorize the integration to interact with Google Sheets on their behalf.
Configure the Connection
-
Enter the Client ID and Client Secret from the OAuth app credentials.
-
For Scopes, use the following value:
https://www.googleapis.com/auth/spreadsheets https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/drive.readonly- The
spreadsheetsscope allows full access to Google Sheets. - The
drive.filescope allows access to files created or opened by the integration. - The
drive.readonlyscope allows read-only access to Drive metadata. - Refer to Google's OAuth 2.0 Scopes for Google APIs for additional scope information.
- The
| Input | Notes | Example |
|---|---|---|
| Authorize URL | The OAuth 2.0 Authorization URL for Google Sheets. | https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&prompt=consent |
| Client ID | Client ID from your Google Cloud Console OAuth credentials. Learn more | 123456789012-abcdefghijklmnopqrstuvwxyz123456.apps.googleusercontent.com |
| Client Secret | Client Secret generated in your Google Cloud Console OAuth credentials. Learn more | GOCSPX-abcdefghijklmnopqrstuvwxyz |
| Scopes | Space-delimited list of OAuth scopes to request. Common scopes include spreadsheets (read/write), drive.file (create/edit files), and drive.readonly. Learn more | https://www.googleapis.com/auth/spreadsheets https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/drive.readonly |
| Token URL | The OAuth 2.0 Token URL for Google Sheets. | https://oauth2.googleapis.com/token |
Triggers
Spreadsheet Change Events
Receive change notifications for a Google Spreadsheet. Automatically creates and manages a Google Drive push notification subscription when the instance is deployed, and removes the subscription when the instance is deleted. | key: spreadsheetChangeEvents
| Input | Notes | Example |
|---|---|---|
| Connection | The Google Sheets connection to use. | |
| Spreadsheet ID | The spreadsheet to monitor for changes. | 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms |
The Spreadsheet Change Events trigger automatically creates and manages Google Drive push notification subscriptions for a Google Spreadsheet. This trigger handles the complete webhook lifecycle, including subscription creation, renewal, and deletion, eliminating the need for manual webhook configuration.
When the trigger is used in a flow:
- On Instance Deploy: The trigger creates a Google Drive file watch subscription for the specified spreadsheet. The subscription monitors all changes to the spreadsheet file and automatically renews before expiration.
- On Scheduled Renewal: The trigger automatically renews the subscription before it expires (subscriptions have a 7-day lifespan) to ensure uninterrupted change notifications.
- On Instance Deletion: The trigger removes the watch subscription from Google Drive and cleans up all associated resources.
Configuration
Configure the trigger with the following inputs:
- Connection: Google Sheets OAuth 2.0 connection with permissions to access Google Drive and create file watch subscriptions
- Spreadsheet ID: The unique identifier of the Google Spreadsheet to monitor (found in the spreadsheet URL:
https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit)
How It Works
The trigger manages push notifications through Google Drive's file watch API:
On Instance Deploy:
- Creates a file watch subscription using the Google Drive Files: watch endpoint
- Generates a unique channel ID for the subscription
- Sets a 7-day expiration for the subscription
- Stores the channel ID, resource ID, and expiration in cross-flow state
- Google sends a sync notification to confirm the subscription is active
On Change Notification:
- Receives push notification from Google Drive when the spreadsheet changes
- Validates the channel ID and resource ID match the stored subscription (prevents unauthorized calls)
- Checks the resource state from
X-Goog-Resource-Stateheader:- update: Spreadsheet content or properties changed
- remove: Spreadsheet was deleted or moved to trash
- sync: Initial confirmation notification
- For update events, fetches current spreadsheet metadata including all worksheets and file details
- Routes the enriched payload to the appropriate branch
Branches
The trigger uses two branches to handle different notification types:
Push Notifications - Handles actual spreadsheet change events:
- Triggered when the spreadsheet is updated or removed
- Payload includes enriched spreadsheet metadata, file details, and notification information
- The
notification.resourceStatefield indicates whether the spreadsheet was updated or removed - The
notification.changedFieldsfield specifies what changed (e.g., "content,properties")
Log Messages - Handles system notifications:
- Triggered for sync notifications (initial subscription confirmation)
- Triggered for scheduled renewal confirmations
- Provides operational visibility into subscription lifecycle events
- Useful for debugging and monitoring subscription health
Returned Data
The trigger returns different data structures depending on the notification type.
Example payload for spreadsheet update notification
{
"spreadsheet": {
"title": "Example Spreadsheet",
"spreadsheetId": "1ABC123DEF456GHI789JKL012MNO345PQR678STU901",
"worksheets": [
{
"title": "Sheet1",
"sheetId": 0,
"rowCount": 1000,
"columnCount": 26
}
],
"worksheetCount": 1
},
"file": {
"name": "Example Spreadsheet",
"modifiedTime": "2026-01-06T22:25:56.293Z",
"lastModifyingUser": {
"kind": "drive#user",
"displayName": "John Doe",
"photoLink": "https://lh3.googleusercontent.com/a/ExamplePhotoLinkId",
"me": true,
"permissionId": "12345678901234567890",
"emailAddress": "john.doe@example.com"
},
"webViewLink": "https://docs.google.com/spreadsheets/d/1ABC123DEF456GHI789JKL012MNO345PQR678STU901/edit?usp=drivesdk",
"size": "1024"
},
"notification": {
"resourceState": "update",
"changedFields": "content,properties",
"resourceId": "ExampleResourceId1234567890",
"timestamp": "2026-01-06T22:26:35.618Z"
}
}
Example payload for spreadsheet removal notification
When a spreadsheet is deleted or moved to trash, the payload contains minimal information:
{
"spreadsheet": null,
"file": null,
"notification": {
"resourceState": "remove",
"changedFields": null,
"resourceId": "ExampleResourceId1234567890",
"timestamp": "2026-01-06T22:26:35.618Z"
}
}
Example payload for sync notification (Log Messages branch)
{
"notification": {
"resourceState": "sync",
"resourceId": "ExampleResourceId1234567890",
"timestamp": "2026-01-06T22:26:35.618Z",
"type": "sync"
}
}
{
"branch": "Push Notifications",
"payload": {
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate, br",
"Host": "hooks.example.com",
"User-Agent": "APIs-Google; (+https://developers.google.com/webmasters/APIs-Google.html)",
"X-Amz-Cf-Id": "ExampleCloudFrontId123456789012345678901234567890123456==",
"X-Amzn-Trace-Id": "Root=1-12345678-abcdef0123456789abcdef01",
"X-Forwarded-For": "192.0.2.1, 198.51.100.1",
"X-Goog-Changed": "content,properties",
"X-Goog-Channel-Expiration": "Wed, 07 Jan 2026 07:10:37 GMT",
"X-Goog-Channel-ID": "12345678-abcd-1234-abcd-123456789012",
"X-Goog-Message-Number": "123456",
"X-Goog-Resource-ID": "ExampleResourceId1234567890",
"X-Goog-Resource-State": "update",
"X-Goog-Resource-URI": "https://www.googleapis.com/drive/v3/files/ExampleSpreadsheetId1234567890?alt=json&null"
},
"queryParameters": null,
"rawBody": {
"data": null,
"contentType": "application/octet-stream"
},
"body": {
"data": {
"spreadsheet": {
"title": "Example Spreadsheet",
"spreadsheetId": "1ABC123DEF456GHI789JKL012MNO345PQR678STU901",
"worksheets": [
{
"title": "Sheet1",
"sheetId": 0,
"rowCount": 1000,
"columnCount": 26
}
],
"worksheetCount": 1
},
"file": {
"name": "Example Spreadsheet",
"modifiedTime": "2026-01-06T22:25:56.293Z",
"lastModifyingUser": {
"kind": "drive#user",
"displayName": "John Doe",
"photoLink": "https://lh3.googleusercontent.com/a/ExamplePhotoLinkId1234567890abcdefg=s64",
"me": true,
"permissionId": "12345678901234567890",
"emailAddress": "john.doe@example.com"
},
"webViewLink": "https://docs.google.com/spreadsheets/d/1ABC123DEF456GHI789JKL012MNO345PQR678STU901/edit?usp=drivesdk",
"size": "1024"
},
"notification": {
"resourceState": "update",
"changedFields": "content,properties",
"resourceId": "ExampleResourceId1234567890",
"timestamp": "2026-01-06T22:26:35.618Z"
}
},
"contentType": "application/octet-stream"
},
"pathFragment": "",
"webhookUrls": {
"Spreadsheet Change Events": "https://hooks.example.com/trigger/RXhhbXBsZUluc3RhbmNlRmxvd0NvbmZpZ0lkMTIzNDU2Nzg5MDEyMzQ1Njc4OTA="
},
"webhookApiKeys": {
"Spreadsheet Change Events": []
},
"invokeUrl": "https://hooks.example.com/trigger/RXhhbXBsZUluc3RhbmNlRmxvd0NvbmZpZ0lkMTIzNDU2Nzg5MDEyMzQ1Njc4OTA=",
"executionId": "RXhhbXBsZUV4ZWN1dGlvblJlc3VsdElkMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY=",
"customer": {
"id": "testCustomerId",
"name": "Test Customer",
"externalId": "testCustomerExternalId"
},
"instance": {
"id": "SW5zdGFuY2U6OGRiNWQ4NmYtMjBkYS00MzI5LWI2MmMtM2ZhOWFiNDUwYjUw",
"name": "Google Sheets - DEV - Spreadsheet Change Events"
},
"user": {
"id": "testUserId",
"email": "testUserEmail@example.com",
"name": "Test User",
"externalId": "testUserExternalId"
},
"integration": {
"id": "SW50ZWdyYXRpb246ZDk2YzcxNmItODFmMS00NmQ4LTk0NzItNDU3NDZmMzg2Mjgw",
"name": "Google Sheets - DEV",
"versionSequenceId": "testIntegrationVersionSequenceId",
"externalVersion": ""
},
"flow": {
"id": "SW50ZWdyYXRpb25GbG93OmM4Y2IzY2UwLTFjYTUtNDVhZC04Yjc1LWNmNDc4YWE1Y2RlYQ==",
"name": "Spreadsheet Change Events"
},
"startedAt": "2026-01-06 07:22:38.313677+00",
"globalDebug": false
},
"response": {
"statusCode": 200,
"contentType": "application/json"
}
}
Data Sources
Select Column
Select a Column from a Worksheet | key: selectColumn | type: picklist
| Input | Notes | Example |
|---|---|---|
| Connection | The Google Sheets connection to use. | |
| Spreadsheet ID | The unique identifier of the spreadsheet. You can find the spreadsheet ID in the URL: https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit | 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms |
| Worksheet Title | The title of the worksheet within the spreadsheet. | Sheet1 |
{
"result": [
{
"key": "Column 1",
"label": "Column 1"
},
{
"key": "Column 2",
"label": "Column 2"
}
]
}
Select Columns
Select Columns from a Worksheet | key: selectColumns | type: objectSelection
| Input | Notes | Example |
|---|---|---|
| Connection | The Google Sheets connection to use. | |
| Spreadsheet ID | The unique identifier of the spreadsheet. You can find the spreadsheet ID in the URL: https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit | 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms |
| Worksheet Title | The title of the worksheet within the spreadsheet. | Sheet1 |
{
"result": [
{
"object": {
"key": "id",
"label": "id"
}
},
{
"object": {
"key": "equipmentId",
"label": "equipmentId"
}
}
]
}
Select Spreadsheet
Select a Spreadsheet | key: selectSpreadsheet | type: picklist
| Input | Notes | Example |
|---|---|---|
| Connection | The Google Sheets connection to use. |
Select Worksheet
Select a Worksheet | key: selectWorksheet | type: picklist
| Input | Notes | Example |
|---|---|---|
| Connection | The Google Sheets connection to use. | |
| Spreadsheet ID | The unique identifier of the spreadsheet. You can find the spreadsheet ID in the URL: https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit | 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms |
| Worksheet Return | Select whether to return the worksheet ID (numeric) or name (title) in the response. | false |
{
"result": [
{
"key": "1",
"label": "Sheet1"
}
]
}
Actions
Add Worksheet
Add a new Worksheet to a Google Sheet Document | key: addSheet
| Input | Notes | Example |
|---|---|---|
| Connection | The Google Sheets connection to use. | |
| Column Headings | An array of strings representing the column header names. | |
| Spreadsheet ID | The unique identifier of the spreadsheet. You can find the spreadsheet ID in the URL: https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit | 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms |
| Worksheet Title | The title of the worksheet within the spreadsheet. | Sheet1 |
Append Rows
Append new rows to a Worksheet | key: appendRows
| Input | Notes | Example |
|---|---|---|
| Connection | The Google Sheets connection to use. | |
| Rows | An array of row data. Can be an array of arrays (e.g., [[1,2,3], [4,5,6]]) or an array of objects where keys are column headers (e.g., [{"Column 1": "a"}]). | |
| Spreadsheet ID | The unique identifier of the spreadsheet. You can find the spreadsheet ID in the URL: https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit | 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms |
| Store Raw Values | When true, stores values exactly as provided without conversion. When false, values are converted as if typed into the spreadsheet (e.g., "=SUM(A1:A5)" becomes a formula). | false |
| Worksheet Title | The title of the worksheet within the spreadsheet. | Sheet1 |
Clear Worksheet
Clear all data in the a Worksheet | key: clearSheet
| Input | Notes | Example |
|---|---|---|
| Connection | The Google Sheets connection to use. | |
| Spreadsheet ID | The unique identifier of the spreadsheet. You can find the spreadsheet ID in the URL: https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit | 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms |
| Worksheet Title | The title of the worksheet within the spreadsheet. | Sheet1 |
Create Spreadsheet
Create a new Google Sheet Document | key: createDocument
| Input | Notes | Example |
|---|---|---|
| Connection | The Google Sheets connection to use. | |
| Document Title | Specifies the title of the document. | Sheet1 |
List Columns
Get the headers of a Worksheet | key: listColumns
| Input | Notes | Example |
|---|---|---|
| Connection | The Google Sheets connection to use. | |
| Spreadsheet ID | The unique identifier of the spreadsheet. You can find the spreadsheet ID in the URL: https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit | 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms |
| Worksheet Title | The title of the worksheet within the spreadsheet. | Sheet1 |
{
"data": [
"Column 1",
"Column 2"
]
}
List Rows
List the cell values of rows in a Worksheet | key: getRows
| Input | Notes | Example |
|---|---|---|
| Connection | The Google Sheets connection to use. | |
| Limit | The maximum number of rows to retrieve. | 100 |
| Offset | The number of rows to skip from the top of the worksheet. | 0 |
| Spreadsheet ID | The unique identifier of the spreadsheet. You can find the spreadsheet ID in the URL: https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit | 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms |
| Worksheet Title | The title of the worksheet within the spreadsheet. | Sheet1 |
{
"data": [
{
"Column 1": "a",
"Column 2": "b"
},
{
"Column 1": "c",
"Column 2": "d"
}
]
}
List Worksheets
List information about all Worksheets in a Google Sheet Document | key: listSheets
| Input | Notes | Example |
|---|---|---|
| Connection | The Google Sheets connection to use. | |
| Spreadsheet ID | The unique identifier of the spreadsheet. You can find the spreadsheet ID in the URL: https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit | 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms |
{
"data": [
{
"spreadsheetId": "1K__zH9e2bd",
"title": "Sheet1",
"worksheetId": "od6"
}
]
}
Raw Request
Send raw HTTP request to Google Sheets | key: rawRequest
| Input | Notes | Example |
|---|---|---|
| Connection | The Google Sheets connection to use. | |
| Data | The HTTP body payload to send to the URL. | {"exampleKey": "Example Data"} |
| File Data | File Data to be sent as a multipart form upload. | [{key: "example.txt", value: "My File Contents"}] |
| File Data File Names | File names to apply to the file data inputs. Keys must match the file data keys above. | |
| Form Data | The Form Data to be sent as a multipart form upload. | [{"key": "Example Key", "value": new Buffer("Hello World")}] |
| Header | A list of headers to send with the request. | User-Agent: curl/7.64.1 |
| Max Retry Count | The maximum number of retries to attempt. Specify 0 for no retries. | 0 |
| Method | The HTTP method to use. | |
| Query Parameter | A list of query parameters to send with the request. This is the portion at the end of the URL similar to ?key1=value1&key2=value2. | |
| Response Type | The type of data you expect in the response. You can request json, text, or binary data. | json |
| Retry On All Errors | If true, retries on all erroneous responses regardless of type. This is helpful when retrying after HTTP 429 or other 3xx or 4xx errors. Otherwise, only retries on HTTP 5xx and network errors. | false |
| Retry Delay (ms) | The delay in milliseconds between retries. This is used when 'Use Exponential Backoff' is disabled. | 0 |
| Timeout | The maximum time that a client will await a response to its request | 2000 |
| URL | Input the path only (/v4/spreadsheets/{spreadsheetId}), The base URL is already included (https://sheets.googleapis.com). For example, to connect to https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}, only /v4/spreadsheets/{spreadsheetId} is entered in this field. | /v4/spreadsheets/{spreadsheetId} |
| Use Exponential Backoff | Specifies whether to use a pre-defined exponential backoff strategy for retries. When enabled, 'Retry Delay (ms)' is ignored. | false |
Remove Worksheet
Remove a Worksheet from a Google Sheet Document | key: removeSheet
| Input | Notes | Example |
|---|---|---|
| Connection | The Google Sheets connection to use. | |
| Spreadsheet ID | The unique identifier of the spreadsheet. You can find the spreadsheet ID in the URL: https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit | 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms |
| Worksheet Title | The title of the worksheet within the spreadsheet. | Sheet1 |
Set Header Row
Set the column headings in a Worksheet | key: setHeaderRow
| Input | Notes | Example |
|---|---|---|
| Connection | The Google Sheets connection to use. | |
| Column Headings | An array of strings representing the column header names. | |
| Spreadsheet ID | The unique identifier of the spreadsheet. You can find the spreadsheet ID in the URL: https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit | 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms |
| Worksheet Title | The title of the worksheet within the spreadsheet. | Sheet1 |
Update Rows
Update call values of rows in a Worksheet | key: updateRows
| Input | Notes | Example |
|---|---|---|
| Connection | The Google Sheets connection to use. | |
| Spreadsheet ID | The unique identifier of the spreadsheet. You can find the spreadsheet ID in the URL: https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit | 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms |
| Store Raw Values | When true, stores values exactly as provided without conversion. When false, values are converted as if typed into the spreadsheet (e.g., "=SUM(A1:A5)" becomes a formula). | false |
| Worksheet Title | The title of the worksheet within the spreadsheet. | Sheet1 |
| Values | An object where keys are row numbers and values are objects mapping column names to cell values. |
Changelog
2026-01-26
Added Spreadsheet Change Events trigger with automatic webhook lifecycle management for real time spreadsheet notifications