Gmail (Custom) - Search messages action

The Search messages action lists the messages in a Gmail mailbox. This action requires one of the following OAuth scopes: https://www.googleapis.com/auth/gmail.metadata, https://mail.google.com/, https://www.googleapis.com/auth/gmail.modify, or https://www.googleapis.com/auth/gmail.readonly.

Input

Input fieldDescription
User idEnter the user's email address.
QueryEnter a query to use. Supports the same query format as the Gmail search box. For example, from:[email protected] is:unread. You can't use the query if the connection only has the gmail.metadata scope.
Label IDsEnter any labels to return messages that match all of the specified label IDs. Provide label IDs separated by a comma.
Max resultsEnter the maximum number of messages to return.
Page tokenEnter the page token to retrieve a specific page of results.
Include spam trashSelect Yes to include messages from SPAM and TRASH in the results.

Output

Output fieldDescription
MessagesArray of matching messages. Each entry includes a message ID and a thread ID.
Next page tokenToken to retrieve the next page of results.
Result size estimateEstimated total number of matching messages.
User idThe user's email address.

Last updated: