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 threads

Use the Google Mail - Get threads action A tool for building the processes, logic, and direction within workflows. to retrieve a list of all the message threads in a user's mailbox. You can use a query to retrieve specific threads 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 threads 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 threads 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 message threads from the user's mailbox.

To refresh the available connections, click .

(n/a)
  Email The email address of the user for whom you want to retrieve threads. 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 threads 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. 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
  Labels Retrieves threads with labels that match all of the specified labels. This field is case sensitive; use the correct capital and lower-case letters. Text, Decimal, Integer, Boolean, DateTime, Collection
Output Threads Stores the result of the action as an object. The following values are retrieved:
  • Threads: (Collection) A collection containing:
    • ID: (Text) The unique ID of the thread.
    • Snippet: (Text) A short part of the message text.
    • History ID: (Text) The ID of the last history record that modified the thread.
  • Next page token: (Text) A page token to retrieve the next page of results in the list.
Object