Google Sheets
Read, write, and manage data in Google Sheets spreadsheets.
On this page
- Connect
- Call it from a workflow
- Actions (21)
- clear_sheet
- find_rows
- insert_row
- update_row
- copy-worksheet
- create-column
- create-spreadsheet
- create-worksheet
- custom_api_call
- delete_row
- delete-worksheet
- export_sheet
- find_row_by_num
- find_spreadsheets
- find-worksheet
- format-row
- get_next_rows
- get-many-rows
- google-sheets-insert-multiple-rows
- rename-worksheet
- update-multiple-rows
- Details
Connect
Auth type: OAuth (oauth2). Click Connect and approve access on the provider's page. Appbricx runs the OAuth flow (signed single-use state, PKCE where the provider supports it), stores the tokens encrypted and refreshes them before they expire.
Scopes requested: https://www.googleapis.com/auth/spreadsheets
OAuth needs an OAuth app: the platform's when the operator configured one, or your own (admin panel, Integrations, Configure). You can also bring your own credentials.
- In the editor: Backend panel, Integrations tab, then Connect. This connects it for the project.
- For every project in a workspace: Workspace settings, Integrations.
- Owners and admins choose which integrations members may connect in the admin panel (Integrations tab), and can attach their own OAuth app there.
Call it from a workflow
Pass the action name and its input. The call resolves with { success, output, error? }; a missing connection resolves with success false and the reason. See ctx.integrations.invoke and ctx.integrations.call.
// .workflow.js (native ctx)
export async function run(ctx) {
const res = await ctx.integrations.invoke("google_sheets", "clear_sheet", {
"spreadsheetId": "<spreadsheetId>",
"sheetId": "<sheetId>",
"is_first_row_headers": true,
"headerRow": 1
});
if (!res.success) throw new Error(res.error);
ctx.log.info("Google Sheets answered", { output: res.output });
}// defineWorkflow module (@app/sdk ctx)
import { defineWorkflow } from "@app/sdk";
export default defineWorkflow({
id: "google-sheets-clear-sheet",
name: "Google Sheets: Clear Sheet",
description: "Calls Google Sheets when a row is created.",
trigger: { type: "entity_event", entity: "tickets", event: "created" },
async run(ctx, event) {
const res = await ctx.integrations.call("google_sheets", {
"action": "clear_sheet",
"spreadsheetId": "<spreadsheetId>",
"sheetId": "<sheetId>",
"is_first_row_headers": true,
"headerRow": 1
}) as { success: boolean; error?: string };
if (!res.success) throw new Error(res.error);
},
});curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/google_sheets/clear_sheet" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{"spreadsheetId":"<spreadsheetId>","sheetId":"<sheetId>","is_first_row_headers":true,"headerRow":1}}'Actions
clear_sheetin catalog
Clear Sheet. Clears all rows on an existing sheet.
| Input | Type | Description |
|---|---|---|
includeTeamDrivesoptional | boolean | Turn this on to also see spreadsheets from Shared Drives. |
spreadsheetIdrequired | id (picked from your account) | The ID of the spreadsheet to use. |
sheetIdrequired | id (picked from your account) | The ID of the worksheet to use. |
is_first_row_headersrequired | boolean | First Row Contains Headers ? |
headerRowrequired | number | Enter the row number where your column headers are located (usually row 1). |
find_rowsin catalog
Find Rows. Look up rows in a worksheet based on a column value.
| Input | Type | Description |
|---|---|---|
includeTeamDrivesoptional | boolean | Turn this on to also see spreadsheets from Shared Drives. |
spreadsheetIdrequired | id (picked from your account) | The ID of the spreadsheet to use. |
sheetIdrequired | id (picked from your account) | The ID of the worksheet to use. |
columnNamerequired | id (picked from your account) | The name of the column to search in |
searchValueoptional | text | The value to look for in the selected column. Leave empty to return all rows. |
matchCaserequired | boolean | Only return rows where the cell value exactly matches the search value. |
startingRowoptional | number | Start searching from this row number. |
numberOfRowsoptional | number | How many rows to return. Defaults to 1 if not specified. |
headerRowrequired | number | The row number that contains the column names. |
useHeaderNamesoptional | boolean | Use column names as keys instead of A, B, C. |
insert_rowin catalog
Add Row. Add a new row of data to a specific spreadsheet.
| Input | Type | Description |
|---|---|---|
includeTeamDrivesoptional | boolean | Turn this on to also see spreadsheets from Shared Drives. |
spreadsheetIdrequired | id (picked from your account) | The ID of the spreadsheet to use. |
sheetIdrequired | id (picked from your account) | The ID of the worksheet to use. |
first_row_headersrequired | boolean | First Row Contains Headers ? |
as_stringoptional | boolean | Inserted values that are dates and formulas will be entered strings and have no effect |
valuesrequired | object (depends on other props) | The values to add |
update_rowin catalog
Update Row. Update the data in an existing row.
| Input | Type | Description |
|---|---|---|
includeTeamDrivesoptional | boolean | Turn this on to also see spreadsheets from Shared Drives. |
spreadsheetIdrequired | id (picked from your account) | The ID of the spreadsheet to use. |
sheetIdrequired | id (picked from your account) | The ID of the worksheet to use. |
row_idrequired | number | The row number to update |
first_row_headersrequired | boolean | First Row Contains Headers ? |
valuesrequired | object (depends on other props) | The values to add |
copy-worksheet
Copy Worksheet. Creates a new worksheet by copying an existing one.
| Input | Type | Description |
|---|---|---|
includeTeamDrivesoptional | boolean | Turn this on to also see spreadsheets from Shared Drives. |
spreadsheetIdrequired | id (picked from your account) | Spreadsheet Containing the Worksheet to Copy |
sheetIdrequired | id (picked from your account) | Worksheet to Copy |
desinationSpeadsheetIdrequired | id (picked from your account) | Spreadsheet to paste in |
create-column
Create Spreadsheet Column. Creates a new column in a specific spreadsheet.
| Input | Type | Description |
|---|---|---|
includeTeamDrivesoptional | boolean | Turn this on to also see spreadsheets from Shared Drives. |
spreadsheetIdrequired | id (picked from your account) | The ID of the spreadsheet to use. |
sheetIdrequired | id (picked from your account) | The ID of the worksheet to use. |
columnNamerequired | text | Column Name |
columnIndexoptional | number | The column index starts from 1.For example, if you want to add a column to the third column, enter 3.Ff the input is less than 1 the column will be added after the last current column. |
create-spreadsheet
Create Spreadsheet. Creates a blank spreadsheet.
| Input | Type | Description |
|---|---|---|
titlerequired | text | The title of the new spreadsheet. |
includeTeamDrivesoptional | boolean | Turn this on to also see spreadsheets from Shared Drives. |
folderoptional | id (picked from your account) | The folder to create the worksheet in.By default, the new worksheet is created in the root folder of drive. |
create-worksheet
Create Worksheet. Create a new blank worksheet with a title.
| Input | Type | Description |
|---|---|---|
includeTeamDrivesoptional | boolean | Turn this on to also see spreadsheets from Shared Drives. |
spreadsheetIdrequired | id (picked from your account) | Spreadsheet |
titlerequired | text | The title of the new worksheet. |
headersoptional | array | Headers |
custom_api_call
Custom API Call. Make a custom API call to a specific endpoint
| Input | Type | Description |
|---|---|---|
urlrequired | object (depends on other props) | url |
methodrequired | one of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD" | Method |
headersrequired | object | Authorization headers are injected automatically from your connection. |
queryParamsrequired | object | Query Parameters |
body_typeoptional | one of "none" | "json" | "form_data" | "raw" | Body Type |
bodyoptional | object (depends on other props) | Body |
response_is_binaryoptional | boolean | Enable for files like PDFs, images, etc. |
failsafeoptional | boolean | No Error on Failure |
timeoutoptional | number | Timeout (in seconds) |
followRedirectsoptional | boolean | Follow redirects |
delete_row
Delete Row. Delete a specific row from the selected sheet.
| Input | Type | Description |
|---|---|---|
includeTeamDrivesoptional | boolean | Turn this on to also see spreadsheets from Shared Drives. |
spreadsheetIdrequired | id (picked from your account) | The ID of the spreadsheet to use. |
sheetIdrequired | id (picked from your account) | The ID of the worksheet to use. |
rowIdrequired | number | The number of the row you want to delete. |
delete-worksheet
Delete Worksheet. Permanently delete a specific worksheet.
| Input | Type | Description |
|---|---|---|
includeTeamDrivesoptional | boolean | Turn this on to also see spreadsheets from Shared Drives. |
spreadsheetIdrequired | id (picked from your account) | The ID of the spreadsheet to use. |
sheetIdrequired | id (picked from your account) | The ID of the worksheet to delete. |
export_sheet
Export Worksheet. Download a worksheet as a CSV or TSV file.
| Input | Type | Description |
|---|---|---|
includeTeamDrivesoptional | boolean | Turn this on to also see spreadsheets from Shared Drives. |
spreadsheetIdrequired | id (picked from your account) | The ID of the spreadsheet to use. |
sheetIdrequired | id (picked from your account) | The ID of the worksheet to use. |
formatrequired | one of "csv" | "tsv" | Select the file type to export the sheet as. |
returnAsTextoptional | boolean | Return the exported data as text instead of a file. |
find_row_by_num
Get Single Row by ID. Retrieve a specific row using its unique ID.
| Input | Type | Description |
|---|---|---|
includeTeamDrivesoptional | boolean | Turn this on to also see spreadsheets from Shared Drives. |
spreadsheetIdrequired | id (picked from your account) | The ID of the spreadsheet to use. |
sheetIdrequired | id (picked from your account) | The ID of the worksheet to use. |
rowNumberrequired | number | Enter the row number you want to retrieve |
headerRowrequired | number | Enter the row number where your column headers are located (usually row 1). |
find_spreadsheets
Find Spreadsheet(s). Find spreadsheet(s) by name.
| Input | Type | Description |
|---|---|---|
includeTeamDrivesoptional | boolean | Turn this on to also see spreadsheets from Shared Drives. |
spreadsheet_namerequired | text | Enter the name of the spreadsheet to search for |
exact_matchoptional | boolean | If true, only return spreadsheets that exactly match the name. If false, return spreadsheets that contain the name. |
find-worksheet
Find Worksheet(s). Finds a worksheet(s) by title.
| Input | Type | Description |
|---|---|---|
includeTeamDrivesoptional | boolean | Turn this on to also see spreadsheets from Shared Drives. |
spreadsheetIdrequired | id (picked from your account) | Spreadsheet |
titlerequired | text | Title |
exact_matchoptional | boolean | If true, only return worksheets that exactly match the name. If false, return worksheets that contain the name. |
format-row
Format Row(s). Format one or multiple rows in specific spreadsheet.
| Input | Type | Description |
|---|---|---|
includeTeamDrivesoptional | boolean | Turn this on to also see spreadsheets from Shared Drives. |
spreadsheetIdrequired | id (picked from your account) | The ID of the spreadsheet to use. |
sheetIdrequired | id (picked from your account) | The ID of the worksheet to use. |
startingRowrequired | number | The first row number where formatting should begin. |
endingRowoptional | number | The last row number where formatting should stop (leave empty to format only the starting row). |
bgColoroptional | text | Provide a HEX color code (example: #FFD966) |
textColoroptional | text | Provide a HEX color code (example: #FFD966) |
boldoptional | boolean | Make text bold |
italicoptional | boolean | Make text Italic |
strikethroughoptional | boolean | Make text Strikethrough |
get_next_rows
Get next row(s). Get next group of rows from a specifiec workheet
| Input | Type | Description |
|---|---|---|
includeTeamDrivesoptional | boolean | Turn this on to also see spreadsheets from Shared Drives. |
spreadsheetIdrequired | id (picked from your account) | The ID of the spreadsheet to use. |
sheetIdrequired | id (picked from your account) | The ID of the worksheet to use. |
startRowrequired | number | Which row to start from? |
headerRowrequired | number | Which row contains the headers? |
useHeaderNamesoptional | boolean | Map A/B/C… to the actual column headers (row specified above). |
memKeyrequired | text | The key used to store the current row number in memory |
groupSizerequired | number | The number of rows to get |
get-many-rows
Get All Rows. Get all the rows from a specific sheet.
| Input | Type | Description |
|---|---|---|
includeTeamDrivesoptional | boolean | Turn this on to also see spreadsheets from Shared Drives. |
spreadsheetIdrequired | id (picked from your account) | The ID of the spreadsheet to use. |
sheetIdrequired | id (picked from your account) | The ID of the worksheet to use. |
first_row_headersrequired | boolean | First Row Contains Headers ? |
google-sheets-insert-multiple-rows
Add Multiple Rows. Add multiple rows of data at once to a specific spreadsheet.
| Input | Type | Description |
|---|---|---|
includeTeamDrivesoptional | boolean | Turn this on to also see spreadsheets from Shared Drives. |
spreadsheetIdrequired | id (picked from your account) | The ID of the spreadsheet to use. |
sheetIdrequired | id (picked from your account) | The ID of the worksheet to use. |
input_typerequired | one of "csv" | "json" | "column_names" | Select the format of the input values to be added into the worksheet. |
valuesrequired | object (depends on other props) | The values to add. |
overwriteoptional | boolean | Enable this option to replace all existing data in the sheet with new data from your input. This will clear any extra rows beyond the updated range. |
check_for_duplicateoptional | boolean | Enable this option to check for duplicate values before inserting data into the sheet. Only unique rows will be added based on the selected column. |
check_for_duplicate_columnoptional | object (depends on other props) | The column to check for duplicate values. |
as_stringoptional | boolean | Inserted values that are dates and formulas will be entered as strings and have no effect |
headerRowrequired | number | Enter the row number where your column headers are located (usually row 1). |
rename-worksheet
Rename Worksheet. Rename specific worksheet.
| Input | Type | Description |
|---|---|---|
includeTeamDrivesoptional | boolean | Turn this on to also see spreadsheets from Shared Drives. |
spreadsheetIdrequired | id (picked from your account) | The ID of the spreadsheet to use. |
sheetIdrequired | id (picked from your account) | The ID of the worksheet to rename. |
newNamerequired | text | New Sheet Name |
update-multiple-rows
Update Multiple Rows. Updates multiple rows in a specific spreadsheet.
| Input | Type | Description |
|---|---|---|
includeTeamDrivesoptional | boolean | Turn this on to also see spreadsheets from Shared Drives. |
spreadsheetIdrequired | id (picked from your account) | The ID of the spreadsheet to use. |
sheetIdrequired | id (picked from your account) | The ID of the worksheet to use. |
valuesrequired | object (depends on other props) | The values to update. |
as_stringoptional | boolean | Inserted values that are dates and formulas will be entered as strings and have no effect |
headerRowrequired | number | Which row contains the headers? |
Details
- Id
google_sheets- Category
- Productivity
- Tags
- spreadsheet, data, google, sheets
- Package
@activepieces/piece-google-sheets@0.14.6- Tier
- Built in