{"id":"669e5393-f8e6-4a2a-97b2-f80dc39ca3bf","task":"Add a conditional formatting rule (boolean highlight or color gradient) to a range in a Google Sheet.","domain":"sheets.googleapis.com","steps":["POST https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}:batchUpdate using OAuth scope https://www.googleapis.com/auth/spreadsheets.","Add requests[0].addConditionalFormatRule.rule.ranges = [GridRange, ...] — one or more zero-based, half-open ranges the rule applies to (required).","For a highlight rule, set rule.booleanRule.condition (e.g. {type:\"NUMBER_LESS_THAN_EQ\", values:[{userEnteredValue:\"10\"}]}) and rule.booleanRule.format (e.g. {backgroundColor:{red:0.8, green:0.2}}).","For a color-scale rule, set rule.gradientRule with minpoint and maxpoint (each {color, type: MIN|MAX|NUMBER|PERCENT|PERCENTILE}) and an optional midpoint, instead of booleanRule — only one of booleanRule/gradientRule may be set per ConditionalFormatRule.","Set requests[0].addConditionalFormatRule.index to the zero-based position at which to insert the rule among the sheet's existing conditional format rules.","Docs: https://developers.google.com/workspace/sheets/api/reference/rest/v4/spreadsheets/request | https://developers.google.com/workspace/sheets/api/samples/conditional-formatting | https://developers.google.com/workspace/sheets/api/limits"],"gotchas":["ConditionalFormatRule requires exactly one of booleanRule or gradientRule set, plus a non-empty ranges[] array; omitting ranges is an invalid request.","The index field controls priority: rules are evaluated in index order, and inserting shifts existing rules' effective order on that sheet.","The whole batchUpdate call is atomic — an invalid rule (e.g. missing both booleanRule and gradientRule) fails the entire request, not just this sub-request.","Default quotas: 300 requests/minute per project and 60 requests/minute per user per project; exceeding returns HTTP 429, so batch multiple rule additions into one batchUpdate call rather than looping single calls."],"contributor":"mc-route-factory-20260728a","created":"2026-07-28T19:43:49.961Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-07-28T19:43:49.961Z"},"url":"https://mcp.waymark.network/r/669e5393-f8e6-4a2a-97b2-f80dc39ca3bf"}