Get
|
|||||
|
|
Gets a filter
Authorization
To use this building block you will have to grant access to at least one of the following scopes:
- Read, compose, send, and permanently delete all your email from Gmail
- View and modify but not delete your email
- View your email messages and settings
- Manage your basic mail settings
Input
This building block consumes 2 input parameters
Name | Format | Description |
---|---|---|
userId Required |
STRING |
User's email address. The special value "me" can be used to indicate the authenticated user |
id Required |
STRING |
The ID of the filter to be fetched |
= Parameter name
= Format
userId STRING Required User's email address. The special value "me" can be used to indicate the authenticated user |
id STRING Required The ID of the filter to be fetched |
Output
This building block provides 15 output parameters
Name | Format | Description |
---|---|---|
action |
OBJECT |
A set of actions to perform on a message |
action.addLabelIds[] |
STRING |
|
action.forward |
STRING |
Email address that the message should be forwarded to |
action.removeLabelIds[] |
STRING |
|
criteria |
OBJECT |
Message matching criteria |
criteria.excludeChats |
BOOLEAN |
Whether the response should exclude chats |
criteria.from |
STRING |
The sender's display name or email address |
criteria.hasAttachment |
BOOLEAN |
Whether the message has any attachment |
criteria.negatedQuery |
STRING |
Only return messages not matching the specified query. Supports the same query format as the Gmail search box. For example, "from:[email protected] rfc822msgid: is:unread" |
criteria.query |
STRING |
Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:[email protected] rfc822msgid: is:unread" |
criteria.size |
INTEGER |
The size of the entire RFC822 message in bytes, including all headers and attachments |
criteria.sizeComparison |
ENUMERATION |
How the message size in bytes should be in relation to the size field |
criteria.subject |
STRING |
Case-insensitive phrase found in the message's subject. Trailing and leading whitespace are be trimmed and adjacent spaces are collapsed |
criteria.to |
STRING |
The recipient's display name or email address. Includes recipients in the "to", "cc", and "bcc" header fields. You can use simply the local part of the email address. For example, "example" and "example@" both match "[email protected]". This field is case-insensitive |
id |
STRING |
The server assigned ID of the filter |
= Parameter name
= Format
action OBJECT A set of actions to perform on a message |
action.addLabelIds[] STRING |
action.forward STRING Email address that the message should be forwarded to |
action.removeLabelIds[] STRING |
criteria OBJECT Message matching criteria |
criteria.excludeChats BOOLEAN Whether the response should exclude chats |
criteria.from STRING The sender's display name or email address |
criteria.hasAttachment BOOLEAN Whether the message has any attachment |
criteria.negatedQuery STRING Only return messages not matching the specified query. Supports the same query format as the Gmail search box. For example, "from:[email protected] rfc822msgid: is:unread" |
criteria.query STRING Only return messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:[email protected] rfc822msgid: is:unread" |
criteria.size INTEGER The size of the entire RFC822 message in bytes, including all headers and attachments |
criteria.sizeComparison ENUMERATION How the message size in bytes should be in relation to the size field |
criteria.subject STRING Case-insensitive phrase found in the message's subject. Trailing and leading whitespace are be trimmed and adjacent spaces are collapsed |
criteria.to STRING The recipient's display name or email address. Includes recipients in the "to", "cc", and "bcc" header fields. You can use simply the local part of the email address. For example, "example" and "example@" both match "[email protected]". This field is case-insensitive |
id STRING The server assigned ID of the filter |