> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Update conditional format rule

> Replace a Google Sheets conditional-format rule at a sheet index.

`googleSheets.updateConditionalFormatRule()` completely replaces a rule at one sheet's zero-based index without moving it.

## Example

```ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { googleSheets } from "automate.ax/google-sheets"

export default automation("Update order highlighting", () => {
  onDashboardRun({ title: "Update order highlighting" })

  googleSheets.updateConditionalFormatRule({
    spreadsheet: "spreadsheet-id",
    sheet: "Orders",
    index: 0,
    ranges: [{ sheet: "Orders", startRow: 2, startColumn: 3 }],
    rule: {
      type: "boolean",
      condition: { type: "textEqual", value: "Overdue" },
      format: { bold: true, backgroundColor: "#FCE8E6" },
    },
  })
})
```

## Inputs

Provide `spreadsheet`, `sheet`, zero-based `index`, complete replacement `ranges`, and a complete replacement `rule`. All ranges must resolve to `sheet`. See [Create conditional format rule](/reference/integrations/google-sheets/actions/create-conditional-format-rule#inputs) for range targets, conditions, gradients, strict colors, and supported conditional-format properties.

Table targets resolve to fixed grid ranges at update time. Rule indexes are per sheet and can shift after other rule lifecycle operations. Second argument `{ account }` selects the Google Account. All action inputs accept compatible signals.

## Output

Returns the updated `{ index, ranges, rule }` with normalized zero-based ranges.
