Search email in Gmail
Search your email in Gmail.
Query documentation: https://support.google.com/mail/answer/7190
Application
- Google Gmail
Inputs (what you have)
| Name | Description | Data Type | Required? | Example |
|---|---|---|---|---|
| Gmail credentials | The connected account to use for the request | Connected Account | Yes | |
| Query | Only return messages matching the specified query. Supports the same query format as the Gmail search box. Example: from:someuser@example.com rfc822msgid:is:unread | Text (Long) | Yes | from:someuser@example.com rfc822msgid:is:unread |
| Email address | The Email address you would like to search in. Defaults to ‘me’. Example: support@wrk.com | No | support@wrk.com | |
| Maximum number of results | Default: 100 | Number | No | 10 |
| Label IDs | List of IDs of labels to search by. Example: sent, important | Text (Long) | No | sent, important |
| Include spam and trash? | Indicates if the spam and trash folders should be included in the search | True/False | No |
List of the correct query documentation: https://support.google.com/mail/answer/7190
Search and filter differences: Gmail UI versus Gmail API
- The Gmail UI performs alias expansion which allows it to infer an account alias from a Google Workspace account. For example, suppose you have an account of
myprimary@mycompany.netand your admin sets up an alias for that account ofmyalias@mycompany.net. Ifmyalias@mycompany.netsends an email, but you search for "from: myprimary@mycompany.net)" the email sent bymyalias@mycompany.netshows up as a search result the Gmail UI, but not in the API response. - The Gmail UI allows users to perform thread-wide searches, but the API doesn't.
Outputs (what you get)
| Name | Description | Data Type | Required? | Example |
|---|---|---|---|---|
| Number of emails returned | Number | No | ||
| gmailSearchEmailMessageResults | List of undefined | No |
Outcomes
| Name | Description |
|---|---|
| Success | This status is selected if the job has successfully completed. |
| No result | This status is selected if the job has successfully completed but no result was produced. |
Requirements
- N/A