View as Markdown
Google Sheets icon

Google Sheets ACTION

Get Cell Formatting

Read 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. range is 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 documentation
  • Action
  • Read only
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Google Sheets account once, then configure and run Get Cell Formatting from your backend or agent.

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-get-cell-formatting",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    google_sheets: { authProvisionId: "apn_xxxxxxx" },
    spreadsheetId: "Spreadsheet ID",
    sheetName: "Worksheet Name",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Get Cell Formatting inputs
Property Type Description
spreadsheetId Spreadsheet ID string
The spreadsheet ID from the Google Sheets URL. Use List Spreadsheets to find it by name.
Required
sheetName Worksheet Name string
The worksheet (tab) name. Use Get Spreadsheet Info to discover worksheet names.
Required
range Range string
The cells to inspect, in A1 notation and WITHOUT the worksheet name. Examples: A1:F1 (a header row), C2:C50, B:B (a whole column), A1 (one cell). Keep the range tight —at most 500 cells are described per call.
Required
includeCellDetail Include Cell Detail boolean
Whether to return per-cell formatting. Default true. Set false for just the worksheet-level summary (frozen rows, merged ranges, gridlines, and the distinct number formats in the range) — much smaller, and enough to answer 'is this sheet formatted?' over a large range.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
google_sheets-get-cell-formatting
Version
0.0.1
App
Google Sheets
Authentication
OAuth
Read-only
Yes
Destructive
No
Open world
Yes