CONNECT APP
Build with Google Sheets
Productivity
- OAuth
MCP
Give your agent Google Sheets tools
Every Google Sheets action is exposed as an MCP tool on Pipedream's remote server. Point a client at it with your end user's ID and Connect resolves that user's Google Sheets account for each tool call — you store no tokens.
// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "google_sheets",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// e.g. run Add Single Row:
const result = await mcp.callTool({
name: "google_sheets-add-single-row",
arguments: {
drive: "Drive",
sheetId: "Spreadsheet ID",
},
})# access_token: mint a short-lived token with the Connect SDK — see the MCP guide
headers = {
"Authorization": f"Bearer {access_token}",
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", # any stable ID for this user in your system
"x-pd-app-slug": "google_sheets",
}
async with streamablehttp_client("https://remote.mcp.pipedream.net/v3", headers=headers) as (read, write, _):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
# e.g. run Add Single Row:
result = await session.call_tool("google_sheets-add-single-row", {
"drive": "Drive",
"sheetId": "Spreadsheet ID",
})API PROXY
Call the Google Sheets API directly
For an endpoint with no pre-built tool, the Connect proxy forwards your request to the Google Sheets API with the connected user's credentials attached. You store no tokens and write no refresh logic.
const resp = await pd.proxy.get({
externalUserId: "{external_user_id}", // any stable ID for this user in your system
accountId: "apn_xxxxxxx",
url: "https://sheets.googleapis.com/",
})
// Any allowed Google Sheets endpoint works here. Pipedream attaches the
// connected account's credentials to the outgoing request.# The path segment is the target URL, URL-safe base64 encoded:
# https://sheets.googleapis.com/
curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9zaGVldHMuZ29vZ2xlYXBpcy5jb20v?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
-H "Authorization: Bearer {access_token}" \
-H "x-pd-environment: production"SDK
Run Google Sheets actions from your backend
Connect a user's Google Sheets account once, then run Add Single Row on their behalf from your own code — TypeScript, Python, or plain HTTP.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "google_sheets-add-single-row",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
google_sheets: { authProvisionId: "apn_xxxxxxx" },
drive: "Drive",
sheetId: "Spreadsheet ID",
},
})from pipedream import Pipedream
pd = Pipedream(
client_id="{oauth_client_id}",
client_secret="{oauth_client_secret}",
project_id="{project_id}",
project_environment="production",
)
result = pd.actions.run(
id="google_sheets-add-single-row",
external_user_id="{external_user_id}", # any stable ID for this user in your system
configured_props={
"google_sheets": {"authProvisionId": "apn_xxxxxxx"},
"drive": "Drive",
"sheetId": "Spreadsheet ID",
},
)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "google_sheets-add-single-row",
"configured_props": {
"google_sheets": { "authProvisionId": "apn_xxxxxxx" },
"drive": "Drive",
"sheetId": "Spreadsheet ID"
}
}'TOOLS
Google Sheets actions
On-demand operations your product or agent can configure and run on behalf of a connected user.
-
Add Single Row
actionAdd a single row to a Google Sheet. By default the row is appended to the end. To INSERT the row at a specific position instead — pushing the rows at and below that position DOWN without overwriting them — set Row Index (e.g. Row Index 2 inserts directly below a header row). Use this tool (not Update Row or Update Multiple Rows) whenever the goal is to insert a row between existing rows or add a row while keeping every current row: the Update tools overwrite cells in place and do NOT shift rows down. See the documentationWritev3.0.1 -
Add Multiple Rows
actionAppend multiple rows to a Google Sheet in one call. Providerowsas a JSON array of arrays — each inner array is one row, with cell values in column order (e.g.[["Alice","alice@ingen.test","Engineering"],["Bob","bob@ingen.test","Paleontology"]]). Use Get Spreadsheet Info first to see the column order. Rows are appended after the last row with data. To add a single row, or to insert at a specific position, use Add Single Row instead. See the documentationWritev0.3.1 -
Get Values in Range
actionGet all values or values from a range of cells using A1 notation. See the documentationRead-onlyv0.1.20 -
Add Conditional Format Rule
actionCreate conditional formatting with color scales or custom formulas. See the documentationWritev0.0.4 -
Add Conditional Formatting
actionAdd a conditional formatting rule to a range in Google Sheets, so cells style themselves based on their contents — highlight values over a threshold, flag blanks, color-code by text, or apply a red-to-green color scale. Use this when the user wants formatting driven by the data ('highlight anything over 100', 'make overdue rows red', 'heat-map the revenue column'). For formatting that applies to cells regardless of their value, use Format Cells instead. Use Get Spreadsheet Info to discover worksheet names and Read Rows to see the values you're writing a rule against.rangeis A1 notation WITHOUT the worksheet name (B2:B100,C:C).valuessupplies the numbers/text the condition compares against: one value for most conditions, two forNUMBER_BETWEEN, none forIS_BLANK/IS_NOT_BLANK/COLOR_SCALE, and a formula starting with=forCUSTOM_FORMULA. Example: to highlight revenue cells above 10000 with a light green fill, call with sheetName="Financials", range="B2:B100", condition="NUMBER_GREATER", values="10000", backgroundColor="light green" → returns the rule that was created and its index on the sheet. See the documentationWritev0.0.1 -
Add Protected Range
actionAdd edit protection to cell range with permissions. See the documentationWritev0.0.4 -
Add Rows
actionAppend one or more rows to a Google Sheets worksheet. Pass rows as a JSON array. Preferred format: array of objects with column header keys (e.g.,[{"Name": "Alice", "Email": "alice@example.com"}]). Use Get Spreadsheet Info first to discover the exact column header names — keys must match headers exactly (case-sensitive). Alternatively, pass rows as arrays of positional values matching column order. New rows are appended after the last row with data.Writev0.0.4 -
Add Worksheet
actionAdd a new worksheet (tab) to an existing spreadsheet. Optionally set column headers. Use Get Spreadsheet Info to see existing worksheets before creating.Writev0.0.4 -
Clear Cell
actionDelete the content of a specific cell in a spreadsheet. See the documentationWritev0.1.21 -
Clear Rows
actionDelete the content of a row or rows in a spreadsheet. Deleted rows will appear as blank rows. See the documentationWritev0.1.19 -
Copy Worksheet
actionCopy an existing worksheet to another Google Sheets file. See the documentationWritev0.1.17 -
Create Column
actionCreate a new column in a spreadsheet. See the documentationWritev0.1.17 -
Create Spreadsheet
actionCreate a blank spreadsheet or duplicate an existing spreadsheet. See the documentationWritev0.1.19 -
Create Worksheet
actionCreate a blank worksheet with a title. See the documentationWritev0.1.17 -
Delete Conditional Format Rule
actionRemove conditional formatting rule by index. See the documentationWritev0.0.4 -
Delete Rows
actionDeletes the specified rows from a spreadsheet. See the documentationWritev0.0.18 -
Delete Worksheet
actionDelete a specific worksheet. See the documentationWritev0.1.17 -
Find Row
actionFind one or more rows by a column and value. See the documentationRead-onlyv0.2.20 -
Find Rows
actionSearch for rows matching a value in a specific column. Use Get Spreadsheet Info to discover column header names. Returns matching rows as objects with row numbers (useful for subsequent Update Rows calls). For simple reads without filtering, use Read Rows instead.Read-onlyv0.0.5 -
Format Cells
actionApply formatting to a range of cells in a Google Sheets worksheet: bold/italic/underline, font size and family, text and background color, alignment, text wrapping, number formats (currency, percent, date), borders, and cell merging. Use this whenever a user asks to style, highlight, bold, color, align, wrap, merge, or number-format cells — including making a header row stand out. To change cell values instead, use Update Multiple Rows; to freeze rows or resize columns, use Format Worksheet; to style cells based on their contents, use Add Conditional Formatting. Use Get Spreadsheet Info to discover worksheet names, and Read Rows to see which cells hold the data you want to format. Colors accept a hex code (#1a73e8,#fff) or a common name (light gray,dark blue,yellow).rangeis A1 notation WITHOUT the worksheet name —A1:F1(a block),B:B(a whole column),2:2(a whole row), orA1(one cell). Only the attributes you pass are changed; everything else in the range keeps its current formatting. Example: to make the header row of a 6-column sheet bold, white on dark blue, and centered, call with sheetName="Financials", range="A1:F1", bold=true, textColor="#ffffff", backgroundColor="#1155cc", horizontalAlignment="CENTER" → returns the applied attributes plus a link to the worksheet. See the documentationWritev0.0.1 -
Format Worksheet
actionChange worksheet-level layout in Google Sheets: freeze header rows or columns, auto-resize columns to fit their contents, set explicit column widths or row heights, hide gridlines, color the sheet tab, or rename the worksheet. Use this when a user asks to freeze/lock a header row, make columns wide enough to read, widen or narrow a column, or tidy up a sheet they just uploaded or imported.autoResizeColumnsis usually what fixes an imported sheet where columns are too narrow and numbers show as####. To style the cells themselves (bold, colors, number formats), use Format Cells. Use Get Spreadsheet Info to discover worksheet names. Example: to lock the header row and fit every column to its content on a freshly imported sheet, call with sheetName="Q3 Revenue", freezeRows=1, autoResizeColumns="ALL" → returns the layout changes applied plus a link to the worksheet. See the documentationWritev0.0.1 -
Get Cell
actionFetch the contents of a specific cell in a spreadsheet. See the documentationRead-onlyv0.1.20 -
Get Cell Formatting
actionRead the current formatting of a range of cells in Google Sheets — bold, italic, font size and family, text and background colors (as hex), alignment, wrapping, number formats and borders — plus worksheet-level layout (frozen rows/columns, merged ranges, hidden gridlines). Use this to answer questions about how a sheet looks ('is the header row bold?', 'what format is column C?', 'is the top row frozen?'), to check the result of a Format Cells or Format Worksheet call, or to copy one range's styling onto another. To read cell values instead of their styling, use Read Rows.rangeis A1 notation WITHOUT the worksheet name (A1:F1,C2:C50). Attributes left at their Google Sheets default are omitted from each cell, so whatever comes back is formatting that was deliberately applied. Example: to check how a header row is styled, call with sheetName="Financials", range="A1:F1" → returns one entry per cell such as{cell: "A1", value: "Region", bold: true, backgroundColor: "#1155cc", textColor: "#ffffff", horizontalAlignment: "CENTER"}alongside{frozenRowCount: 1, mergedRanges: []}. See the documentationRead-onlyv0.0.1 -
Get Current User
actionRetrieve Google Sheets account metadata for the authenticated user by calling Drive'sabout.get, returning the user profile (display name, email, permission ID) and storage quota information. Helpful when you need to verify which Google account is active, tailor sheet operations to available storage, or give an LLM clear context about the user identity before composing read/write actions. See the Drive API documentation.Read-onlyv0.0.5 -
Get Spreadsheet by ID
actionReturns the spreadsheet at the given ID. See the documentation for more informationRead-onlyv0.1.18 -
Get Spreadsheet Info
actionGet the structure of a Google Spreadsheet — worksheet names, column headers (first row of each sheet), and row counts. Call this first before reading or writing data, so you know the worksheet names and column headers. The column headers are used as keys when writing data with Add Rows or Update Rows. The spreadsheet ID is the long string in the Google Sheets URL:https://docs.google.com/spreadsheets/d/{spreadsheetId}/edit.Read-onlyv0.0.4 -
Insert an Anchored Note
actionInsert a note on a spreadsheet cell. See the documentationWritev0.1.17 -
Insert Comment
actionInsert a comment into a spreadsheet. See the documentationWritev0.1.18 -
Insert Dimension
actionInsert a dimension into a spreadsheet. See the documentationWritev0.0.4 -
List Spreadsheets
actionList Google Spreadsheets accessible to the authenticated user. Optionally search by name withquery. Returns an array of{ spreadsheetId, name, url }whose IDs can be used with all other tools. Returns up tolimitresults (default 20); when more may exist the summary says so — raiselimitto fetch them. See the documentationRead-onlyv0.1.1 -
List Worksheets
actionGet a list of all worksheets in a spreadsheet. See the documentationRead-onlyv0.1.18 -
Merge Cells
actionMerge a range of cells into a single cell. See the documentationWritev0.0.4 -
Move Dimension
actionMove a dimension in a spreadsheet. See the documentationWritev0.0.4 -
New Spreadsheet
actionCreate a new Google Spreadsheet with an optional worksheet name and column headers. Returns the spreadsheet ID and URL. Use the spreadsheet ID with other tools to read/write data.Writev0.0.17 -
Read Rows
actionRead rows from a Google Sheets worksheet. Returns data as objects (keys = column headers from row 1) by default, or as raw arrays. Use Get Spreadsheet Info first to discover worksheet names. Optionally specify a range in A1 notation (e.g.,A2:D10) to read a subset. For searching rows by value, use Find Rows instead.Read-onlyv0.0.4 -
Set Data Validation
actionAdd data validation rules to cells (dropdowns, checkboxes, date/number validation). See the documentationWritev0.0.4 -
Update Cell
actionUpdate a cell in a spreadsheet. See the documentationWritev0.1.19 -
Update Conditional Format Rule
actionModify existing conditional formatting rule. See the documentationWritev0.0.4 -
Update Formatting
actionUpdate the formatting of a cell in a spreadsheet. See the documentationWritev0.0.5 -
Update Multiple Rows
actionOverwrite a contiguous block of cells in a Google Sheet, defined by an A1 range. ProviderangeWITHOUT the worksheet name — just the cells, e.g.A2:C3(the tool prepends the worksheet automatically; passingSheet1!A2:C3will fail). Providerowsas a JSON array of arrays matching the range, each inner array a row in column order (e.g. rangeA2:C3with[["Alice","alice@ingen.test","Active"],["Bob","bob@ingen.test","Active"]]). Use Read Rows to see current values and Get Spreadsheet Info for the column order. This overwrites the range in place; to insert rows and shift others down, use Add Single Row. See the documentationWritev0.2.1 -
Update Row
actionOverwrite cells in an existing row of a Google Sheet. Providerow(the 1-based row number — use Find Rows or Read Rows to get it from a row's_rowNumber) andmyColumnData, a positional array of values starting at column A (e.g.["Alice","alice@ingen.test","Engineering"]). Values are written left-to-right from column A, so include the current value of every column up to the one you're changing (read them first via Get Spreadsheet Info / Read Rows); columns after your last value are left unchanged, not cleared. To add a new row instead of overwriting one, use Add Single Row. See the documentationWritev1.0.1 -
Upsert Row
actionUpsert a row of data in a Google Sheet. See the documentationWritev0.1.21
EVENTS
Google Sheets triggers
Event sources your backend can deploy for users and receive through a webhook.
-
New Comment
triggerEmit new event each time a comment is added to a spreadsheet.v0.0.5 -
New Comment (Instant)
triggerEmit new event each time a comment is added to a spreadsheet.v0.1.7 -
New Row Added
triggerEmit new event each time a row or rows are added to the bottom of a spreadsheet.v0.1.7 -
New Row Added (Instant)
triggerEmit new event each time a row or rows are added to the bottom of a spreadsheet.v0.2.7 -
New Updates
triggerEmit new event each time a row or cell is updated in a spreadsheet.v0.0.6 -
New Updates (Instant)
triggerEmit new event each time a row or cell is updated in a spreadsheet.v0.3.8 -
New Worksheet (Instant)
triggerEmit new event each time a new worksheet is created in a spreadsheet.v0.2.7 -
New Worksheet (Polling)
triggerEmit new event each time a new worksheet is created in a spreadsheet.v0.0.5
MULTI-APP
Use Google Sheets with other popular apps
Most products don't stop at one integration. Pair Google Sheets with the other apps your users rely on, and ship use cases that span both.
- App slug
- google_sheets
- Authentication
- OAuth
- Categories
- Productivity
- Actions
- 42
- Triggers
- 8
- API proxy
- Available
OAuth scopes
These are the scopes Pipedream's managed Google Sheets OAuth client requests when one of your users connects an account. Supply your own OAuth client to request a different set.
- profile
- https://www.googleapis.com/auth/drive