Actions40
- Create Bullets Request Actions
- Create Document Request Actions
- Create Headers & Footers Request Actions
- Create Images Request Actions
- Create Named Ranges Request Actions
- Create Tables Request Actions
- Create Tabs Request Actions
- Create Text Request Actions
- Send Request Actions
Create Tables Request → Update Table Cell Style
AI-generatedSummary
Applies styling changes to a specific table cell or range of cells in a Google Doc.
Inputs
- selectionType — The type of selection to make: Table Range (defines a cell via row/column indices and spans) or Location (defines a cell via an index and segment/tab context).
- index (required) — The zero-based index, in UTF-16 code units, relative to the beginning of the segment specified by segmentId.
- additionalLocationFields — Additional fields for the end of segment location: Segment ID (header/footer/footnote) and Tab ID (document tab).
- rowIndex — The zero-based row index of the cell (only when selectionType is 'tableRange').
- columnIndex — The zero-based column index of the cell (only when selectionType is 'tableRange').
- rowSpan — The number of rows the cell spans (only when selectionType is 'tableRange'). Defaults to 1.
- columnSpan — The number of columns the cell spans (only when selectionType is 'tableRange'). Defaults to 1.
- style — A collection of style fields to apply: Background Color, Borders (Top/Bottom/Left/Right with color/width/dash style), Padding (Top/Bottom/Left/Right), Content Alignment, and Row/Column Span.
- fields — The specific fields that should be updated (e.g., 'backgroundColor', 'borderTop'). If empty, defaults to all style fields.
Output shape
no body — success/failure only
Returns a request object that is processed by the node's execution engine; the actual document update is performed asynchronously by Google Docs.
Examples
Example 1: Apply a red background to a single cell at Row 2, Column 3.
Set selectionType to 'tableRange', rowIndex to 2, columnIndex to 3, and style.backgroundColor to '#FF0000'.
Example 2: Add a thick solid black border to the top of a specific cell identified by its index.
Set selectionType to 'location', provide the index, and style.borderTop with color '#000000', width 3, and dashStyle 'SOLID'.
Example 3: Merge a 2x2 block of cells and center the content.
Set selectionType to 'tableRange', rowIndex to 0, columnIndex to 0, rowSpan to 2, columnSpan to 2, style.contentAlignment to 'CONTENT_ALIGNMENT_MIDDLE', and style.rowSpan/columnSpan to 2.