This activity is used to extract the mail details from the specified account.
Technical Reference
|
INPUT
|
MailMessage: Specify the list of message variable from the read mail activity as the input to get mail details from the account. |
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 |
Body: Declare and assign a variable to extract the body of the mail from the account. This is not a mandatory field however declare a variable to get the output. |
|
Date: Declare and assign a variable to extract the date of the mail received from the sender. This is not a mandatory field however declare a variable to get the output. |
||
FromAddress: Declare and assign a variable to extract the from address of the sender. This is not a mandatory field however declare a variable to get the output. |
||
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 output. |
||
Subject: Declare and assign a variable to extract the subject of the mail from the account. This is not a mandatory field however declare a variable to get the output. |
||
ToAddress: Declare and assign a variable to extract the to address from the mail. This is not a mandatory field however declare a variable to get the output. |
* Mandatory fields to execute the workflow.
Pre-requisites
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 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
The following activity explains how to extract the mail details by using the
GetMailDetails activity and display the output. Here we are extracting Date,
FromAddress and Subject from the mailbox. The activities that needs to be
used – Gmail scope, Read mail, Get mail details and Message box. When
you use the ReadMail activity, the output will be a list of mail messages,
and the user cannot get the details. Such as (To, From, Subject, Body, etc.)
from a message directly. They need to parse the message to a MIME kit for
getting those details. Thus, use GetMailDetails activity from the Gmail
automation package to extract details such as Body, To & From address,
Subject from the mail messages.
Steps to execute a bot
Let’s continue from Read Mail activity example,
1. Drag and drop the Get Mail Details activity and connect it below the Read
mail activity.
2. Enter the read mail variable here as “Read_Mail(0)” in the input from the
properties panel.
3. Declare a variable as Get_1 in the Date from the properties panel to get
the output.
4. Declare a variable as Get_2 in the FromAddress from the properties panel
to get the output.
5. Declare a variable as Get_3 in the Subject from the properties panel to
get the output.
6. Drag and drop 3 message box activities and connect it below the Get Mail
Details.
7. Enter the variables Get_1, Get_2 and Get_3 as the input string in the
message box respectively.
8. Enter the title for the message box.
9. Now, execute the workflow.
The output will be,
The bot will access to the mail and then extracts the details to give the value
as the output.