Action: Create Conditional Formatting Rule

Google Sheets Operation

The Create Conditional Formatting Rule action applies a new conditional formatting rule to a specified range.

Example User Story

I want to create a conditional formatting rule in Google Sheets so that I can visually highlight cells that meet specific criteria.

Fields

Field Name
Field Type
Required
Description

spreadsheetId

String

Yes

The spreadsheet to apply the rule to.

sheetId

Integer

Yes

Sheet tab ID (0 = first sheet).

startRowIndex

Integer

Yes

First row (0-based, inclusive).

endRowIndex

Integer

Yes

Last row (0-based, exclusive).

startColumnIndex

Integer

Yes

First column (0-based, inclusive).

endColumnIndex

Integer

Yes

Last column (0-based, exclusive).

conditionType

String

Yes

Condition type (e.g. NUMBER_GREATER_THAN).

conditionValues

String

No

Value(s) for the condition.

backgroundColorRed

Float

No

Red component of background color (0.0–1.0).

backgroundColorGreen

Float

No

Green component of background color (0.0–1.0).

backgroundColorBlue

Float

No

Blue component of background color (0.0–1.0).

textColorRed

Float

No

Red component of text color (0.0–1.0).

textColorGreen

Float

No

Green component of text color (0.0–1.0).

textColorBlue

Float

No

Blue component of text color (0.0–1.0).

ruleIndex

Integer

No

Rule priority (0 = highest). Default: 0.

Google Sheets

Example link

Code (Apache v2.0): Operation

Last updated