add_conditional_format
Apply conditional formatting to a Google Sheets range. Supports conditions like number greater/less, text contains, blank, and applies a chosen background color.
Instructions
Add a conditional formatting rule to a range.
Args: spreadsheet_id: The ID of the spreadsheet sheet: Sheet/tab name range: A1 notation range (e.g., 'B2:B100') rule_type: Condition type — 'NUMBER_GREATER', 'NUMBER_LESS', 'NUMBER_EQ', 'TEXT_CONTAINS', 'TEXT_NOT_CONTAINS', 'BLANK', 'NOT_BLANK', 'NUMBER_BETWEEN', 'NUMBER_NOT_BETWEEN' values: Condition values (e.g., ['100'] for greater than 100, ['10','50'] for between) background_color: Hex color to apply when condition is met (e.g., '#FF0000')
Returns: Result of the conditional formatting operation
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spreadsheet_id | Yes | ||
| sheet | Yes | ||
| range | Yes | ||
| rule_type | No | NUMBER_GREATER | |
| values | No | ||
| background_color | No | #FF0000 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |