Note: Use and transfer of information received from Google APIs to any other app will adhere to Google API Services User Data Policy, including the Limited Use requirements.

Google Mail - Get messages

Use the Google Mail - Get messages action A tool for building the processes, logic, and direction within workflows. to retrieve a list of all the messages in a user's mailbox. You can use a query to retrieve specific messages that match the criteria.

For more information about the Google Mail connector Service used to define a connection required for associated actions and start events. Examples include Salesforce and Box. Method of integration to cloud services, business applications and content stores., go to Google Mail.

Configure the Google Mail - Get messages action

  1. Add the action to the workflow and open the action configuration panel. For more information, see Add, rename, and copy actions.

  1. Select a Connection. If you do not have a connection, see Add a connection.
  1. Specify an Email address for the user.
  2. Create or select a variable for the output.

Google Mail - Get messages action fields, buttons, and settings

Section

Field

Description

Variable types

(unlabeled) Connection Credentials and other settings required to pass data between the workflow and the indicated service, which could be a cloud service, business application, or content store. The Google Mail connection to use to retrieve a list of messages.

To refresh the available connections, click .

(n/a)
  Email The email address of the user for whom you want to get messages. The default value "me" shows the authenticated user. If you want to select another user, insert a variable in the Email field. When using a variable, use the user's email address. Text, Decimal, Integer, Boolean, DateTime, Collection
  Item limit The maximum number of messages to return. If you want to select a number that is not in the list, insert a variable in the Item limit field. Text, Decimal, Integer, Boolean, DateTime, Collection
  Query

Use this to return messages matching the specified query. This field is optional. If you specify a Query, the results are filtered according to the query parameters. Your query should be in the format of a query string search containing a field, operator and value. This action supports the same query format as the Gmail search box. For more information see the Gmail API.

Example:

from:someuser@example.com rfc822msgid:<somemsgid@example.com> is:unread

Text, Decimal, Integer, Boolean, DateTime, Collection
  Page token The token to use to return the next page of results. Text, Decimal, Integer, Boolean, DateTime, Collection
Output Messages Stores the result of the action as an object with the following output:
  • Messages: (Collection) A collection containing:
    • ID: (Text) The ID of the message.
    • Thread ID: (Text) The ID of the thread the message belongs to.
  • Next page token: (Text) The token to retrieve the next page of results in the list.
Object