Move mail

This activity is used to move the mail to the specified folder from the account.  

Technical reference:

 

 

 

 

 

 

 

     INPUT

AddLabel: Specify the label name of the folder to which the mail needs to be moved.

MailMessage: Specify the list of message variable from the read mail activity as the input to move mail from the folder.

RemoveLabel: Specify the name of the folder from where the mail is placed. This property is used to remove the mail from the folder and moves to another folder.

 

 

 

 

 

 

 

 

      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

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. This keypath entered in Gmail scope will enable to give access to the mail account specified and only accepts JSON file format.

 

Use Case:

You can use labels to tag, organize, and categorize messages and threads in Gmail. A label has a many-to-many relationship with messages and threads: a single message or thread may have multiple labels applied to it and a single label may be applied to multiple messages or threads. This activity is used to move mails between the labels in the mail account.

Example:

The following activity explains how to move the mail by using the MoveMail activity. The activities that needs to be used – Gmail scope, Read mail, Move mail and Write Log.

Let’s continue from Read Mail activity example,

1.      Drag and drop the Move Mail activity and connect it below the Read mail activity.

2.      Enter the label name as “Starred” in the add label box from the properties panel.

3.      Enter the mail message as Test(1) to move the mails from the list of message variables.

4.      Enter the label name as “Inbox” in the remove label box from the properties panel.

5.      Declare a variable as “Success” in the result from the output properties panel.

6.      Add write log activity and connect it below to move mail activity.

7.      Enter the input string as “Success.ToString” in the write log properties panel.

8.      Enter the log level as “Info”.

9.      Now, execute the workflow.

 

The bot will identify the labels and moves them accordingly and then returns the status of the write log activity.