ReadMail

This activity is used to read the mails from the Gmail account.

Technical Reference

 

 

 

 

 

 

 

 

   INPUT

Filter: This option enables to filter only the specified mail address and reads them. Specify the address within the double quotes.

FolderName: Specify the folder name from where the mail address is available.

IncludeSpamTrash: Specify either True or false to enable/ disable to include the spam trash from the mail.

MarksAsUnread: Specify either True or false to enable/ disable to mark as unread to the specified mail.

NoOfMails: Specify the number of mails that needs to be read from the mail address specified.

Unread: Specify either True or False to enable / disable to select the unread mails also from the mail address.

 

 

  

 

    MISC

Display Name: Displays the name of the activity. You can also customize the activity name to help troubleshoot issues faster. This name will be used for logging purposes.

SkipOnError: It specifies whether to continue executing the workflow even if it throws an error. This supports only Boolean value “True or False”. By default, it is set to “False.”

True: Continues the workflow to the next step

False: Stops the workflow and throws an error.

Version: It specifies the version of the Gmail automation feature in use

  

 OUTPUT

List: Declare and assign a variable to return the list of messages.

Result: Declare and assign a variable to get the return status of the condition either as success or failure. This is not a mandatory field however declare a variable to get the result.

* Mandatory fields to execute the workflow.

Process of Gmail Authentication

The Gmail automation enables the user to extract, send, reply, move, read, and save
from the mails. Before proceeding to process the automation, the bot authenticates the
gmail/ mail account that is specified. This process occurs only on the first time when the
activity is used with the mail account entered. This keypath entered in Gmail scope will
enable to give access to the mail account specified and only accepts JSON file format.

Use Case

Read Mail activity will be the precursor for all other activities in the Gmail Automation
Package, except for one. That is, all other activities (Get Mail Details, Move Mail,
Reply and Save Attachment) will be connected to the read mail activity and will work in
conjunction with the input and output of the read mail activity. However, the only
exception will be Send Mail activity for which we do not require a read mail activity
and it can be used independently.

Steps to execute a bot

The following activity explains how to read the mail from the specified address.

1.       Drag and drop the Gmail scope activity from the Gmail automation.

2.       Enter the mail account name within the double quotes.

3.       Specify the keypath in JSON format within the double quotes.

4.       Add Read mail activity inside the body of the Gmail scope activity.

5.       Enter the from address of the mail in which you want to read as
from:dnr@icsi.edu.”

6.       Specify the folder name as “Inbox

7.       Specify either True or False in the boxes of Include spam trash, Mark as Read,
Unread
.

8.       Enter the number of mails that needs to be read such as five.

9.       Now, declare a variable in the List section as “Read_Mail” from the properties
panel.

10.   This variable stores the value in list format and will be used as input in other
Gmail Activities.

11.   Declare another variable in Result as “Test” from the properties panel.

12.   Add a write log activity and connect it below the read mail activity.

13.   Enter the variable as “Test.ToString” as the input of write log activity.

14.   Enter the log level as “Info

15.   Now, execute the workflow.

The bot will access to that mail account and filters to read the specified mail
address accordingly and returns the success state of the activity.