Google Sheets

GOOGLESHEETS_SET_BASIC_FILTER

Tool to set a basic filter on a sheet in a Google Spreadsheet. Use when you need to filter or sort data within a specific range on a sheet.

Remote googlesheets

Other tools also called GOOGLESHEETS_SET_BASIC_FILTER? See providers with this name

Input Schema


            {
  "type": "object",
  "properties": {
    "filter": {
      "type": "object",
      "required": [
        "range"
      ],
      "properties": {
        "range": {
          "type": "object",
          "required": [
            "sheet_id"
          ],
          "properties": {
            "sheet_id": {
              "type": "integer",
              "description": "The sheet this range is on."
            },
            "end_row_index": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "The end row (exclusive) of the range, or not set if unbounded."
            },
            "start_row_index": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "The start row (inclusive) of the range, or not set if unbounded."
            },
            "end_column_index": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "The end column (exclusive) of the range, or not set if unbounded."
            },
            "start_column_index": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ],
              "default": null,
              "description": "The start column (inclusive) of the range, or not set if unbounded."
            }
          },
          "description": "The range the filter covers.",
          "additionalProperties": false
        },
        "criteria": {
          "anyOf": [
            {
              "type": "object",
              "properties": {},
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "condition": {
                    "anyOf": [
                      {
                        "type": "object",
                        "required": [
                          "type"
                        ],
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "The type of condition."
                          },
                          "values": {
                            "anyOf": [
                              {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "relative_date": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null,
                                      "description": "A relative date."
                                    },
                                    "user_entered_value": {
                                      "type": [
                                        "string",
                                        "null"
                                      ],
                                      "default": null,
                                      "description": "A value the condition is based on."
                                    }
                                  },
                                  "description": "ConditionValue",
                                  "additionalProperties": false
                                }
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null,
                            "description": "The values of the condition."
                          }
                        },
                        "description": "BooleanCondition",
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "description": "A condition that must be true for values to be shown."
                  },
                  "hiddenValues": {
                    "anyOf": [
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "description": "Values that should be hidden."
                  },
                  "visibleBackgroundColorStyle": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "rgbColor": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "red": {
                                    "type": [
                                      "number",
                                      "null"
                                    ],
                                    "default": null,
                                    "description": "The amount of red in the color as a value in the interval [0, 1]."
                                  },
                                  "blue": {
                                    "type": [
                                      "number",
                                      "null"
                                    ],
                                    "default": null,
                                    "description": "The amount of blue in the color as a value in the interval [0, 1]."
                                  },
                                  "alpha": {
                                    "type": [
                                      "number",
                                      "null"
                                    ],
                                    "default": null,
                                    "description": "The fraction of this color that should be applied to the pixel."
                                  },
                                  "green": {
                                    "type": [
                                      "number",
                                      "null"
                                    ],
                                    "default": null,
                                    "description": "The amount of green in the color as a value in the interval [0, 1]."
                                  }
                                },
                                "description": "Color",
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "themeColor": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null,
                            "description": "Themecolor"
                          }
                        },
                        "description": "ColorStyle",
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "description": "The background fill color to filter by."
                  },
                  "visibleForegroundColorStyle": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "rgbColor": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "red": {
                                    "type": [
                                      "number",
                                      "null"
                                    ],
                                    "default": null,
                                    "description": "The amount of red in the color as a value in the interval [0, 1]."
                                  },
                                  "blue": {
                                    "type": [
                                      "number",
                                      "null"
                                    ],
                                    "default": null,
                                    "description": "The amount of blue in the color as a value in the interval [0, 1]."
                                  },
                                  "alpha": {
                                    "type": [
                                      "number",
                                      "null"
                                    ],
                                    "default": null,
                                    "description": "The fraction of this color that should be applied to the pixel."
                                  },
                                  "green": {
                                    "type": [
                                      "number",
                                      "null"
                                    ],
                                    "default": null,
                                    "description": "The amount of green in the color as a value in the interval [0, 1]."
                                  }
                                },
                                "description": "Color",
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null
                          },
                          "themeColor": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null,
                            "description": "Themecolor"
                          }
                        },
                        "description": "ColorStyle",
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "description": "The foreground color to filter by."
                  }
                },
                "description": "FilterCriteria",
                "additionalProperties": false
              }
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The criteria for showing/hiding values per column. The key is the column index."
        },
        "sortSpecs": {
          "anyOf": [
            {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "sortOrder": {
                    "anyOf": [
                      {
                        "enum": [
                          "ASCENDING",
                          "DESCENDING",
                          "SORT_ORDER_UNSPECIFIED"
                        ],
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "description": "The order data should be sorted."
                  },
                  "dimensionIndex": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "description": "The dimension the sort should be applied to."
                  },
                  "backgroundColorStyle": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "rgbColor": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "red": {
                                    "type": [
                                      "number",
                                      "null"
                                    ],
                                    "default": null,
                                    "description": "The amount of red in the color as a value in the interval [0, 1]."
                                  },
                                  "blue": {
                                    "type": [
                                      "number",
                                      "null"
                                    ],
                                    "default": null,
                                    "description": "The amount of blue in the color as a value in the interval [0, 1]."
                                  },
                                  "alpha": {
                                    "type": [
                                      "number",
                                      "null"
                                    ],
                                    "default": null,
                                    "description": "The fraction of this color that should be applied to the pixel."
                                  },
                                  "green": {
                                    "type": [
                                      "number",
                                      "null"
                                    ],
                                    "default": null,
                                    "description": "The amount of green in the color as a value in the interval [0, 1]."
                                  }
                                },
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null,
                            "description": "Color"
                          },
                          "themeColor": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null,
                            "description": "Theme Color"
                          }
                        },
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "description": "The background fill color to sort by."
                  },
                  "foregroundColorStyle": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "rgbColor": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "red": {
                                    "type": [
                                      "number",
                                      "null"
                                    ],
                                    "default": null,
                                    "description": "The amount of red in the color as a value in the interval [0, 1]."
                                  },
                                  "blue": {
                                    "type": [
                                      "number",
                                      "null"
                                    ],
                                    "default": null,
                                    "description": "The amount of blue in the color as a value in the interval [0, 1]."
                                  },
                                  "alpha": {
                                    "type": [
                                      "number",
                                      "null"
                                    ],
                                    "default": null,
                                    "description": "The fraction of this color that should be applied to the pixel."
                                  },
                                  "green": {
                                    "type": [
                                      "number",
                                      "null"
                                    ],
                                    "default": null,
                                    "description": "The amount of green in the color as a value in the interval [0, 1]."
                                  }
                                },
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "default": null,
                            "description": "Color"
                          },
                          "themeColor": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null,
                            "description": "Theme Color"
                          }
                        },
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "description": "The foreground color to sort by."
                  },
                  "dataSourceColumnReference": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "default": null,
                            "description": "The display name of the column."
                          }
                        },
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "default": null,
                    "description": "Reference to a data source column."
                  }
                },
                "description": "SortSpec",
                "additionalProperties": false
              }
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The sort specifications for the filter."
        }
      },
      "description": "The filter to set.",
      "additionalProperties": false
    },
    "spreadsheetId": {
      "type": "string",
      "description": "The ID of the spreadsheet."
    }
  }
}