set_conditional_format
Add conditional formatting rules to a Google Sheets range. Define conditions like number greater or text contains, and apply highlights (background, text color, bold) with priority ordering.
Instructions
Add a conditional-format rule to a range.
Args: spreadsheet_id_or_url: Full Sheets URL or bare spreadsheet ID. sheet: Sheet name OR gid string. range: Bare A1 range without sheet prefix. condition_type: e.g. NUMBER_GREATER, TEXT_CONTAINS, CUSTOM_FORMULA, BLANK. condition_values: Values/formula for the condition (e.g. ['100'] or ['=B2>C2']). bg_color: Highlight background '#RRGGBB'. fg_color: Highlight text color '#RRGGBB'. bold: Bold the matching cells. index: Rule priority position (0 = highest). dry_run: If true, return the execution plan without changing anything.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bold | No | ||
| index | No | ||
| range | Yes | ||
| sheet | Yes | ||
| dry_run | No | ||
| bg_color | No | ||
| fg_color | No | ||
| condition_type | Yes | ||
| condition_values | No | ||
| spreadsheet_id_or_url | Yes |