Move Gmail Email

You can select this activity to move emails between Gmail labels.

This table lists the properties for the activity:

Property Type Property Name Data Type Description
Input Email InArgument<Mail> The email message to move. This property is mandatory.
Input Destination Label InArgument<String> The destination Gmail label where the email must be moved. For nested labels, specify the full path, such as Projects/Active. This field is mandatory.
Input Source Label InArgument<String> The source Gmail label to remove from the email. When no source label is specified, the INBOX label is removed by default.
Common Continue on error Boolean Set to True for continuing the workflow even if the activity fails. The default value is set to True.
Output Moved Status OutArgument<Boolean> Indicates whether the email is moved successfully.
Output Moved Email OutArgument<Mail> The moved email message.
Output Response code OutArgument<Int32> Response code for the activity.
Note: Gmail does not have folders. Gmail uses labels. Moving an email means adding one label and removing another label.

Activity behavior

Review this behavior of the activity when moving messages between labels:

  • The activity adds the destination label to the message and removes the source label from the message.
  • If the destination label does not exist, the value in the Moved Status field is set to False and the Response Code is 400.
  • If the operation is completed successfully, the value in the Moved Status field is set to True and the Response Code is 200.
  • If an unexpected error occurs, the Response Code is 500.