create_gmail_filter
Create Gmail filters to automatically organize incoming mail. Define criteria and actions to manage messages.
Instructions
Creates a Gmail filter using the users.settings.filters API.
Args: user_google_email (str): The user's Google email address. Required. criteria (Dict[str, Any]): Criteria for matching messages. action (Dict[str, Any]): Actions to apply to matched messages.
Returns: str: Confirmation message with the created filter ID.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"user_google_email": "<user_google_email>",
"criteria": "<criteria>",
"action": "<action>"
},
"name": "create_gmail_filter"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Filter action object as defined in the Gmail API. | |
| criteria | Yes | Filter criteria object as defined in the Gmail API. | |
| user_google_email | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |