The Check if folder exists action in the Email package verifies whether a folder with the name you specified exists on the email server.
Settings
- In the Session
name field, enter the name of the session that you used to connect to
the email server in the Connect
action.
- In the Folder name field, enter the name of the folder you
want to check.Note: This field is not case-sensitive.
- In the Select the destination boolean variable list, select a
Boolean variable to store the output of the result. The output is either True (folder
exists) or False (does not exist). The Control Room shows a
descriptive default variable name. If you create several output variables, subsequent
variable names are appended with a
-1,-2,-3, and so on to avoid duplication.
Example
In this example, a bot verifies whether a folder named Finance exists
on the email server before routing emails to it. If the folder exists, the bot moves the
emails; if it does not, the bot creates the folder first.
Configure the Check if folder exists action with the following settings:
- Session name:
EmailSession1 - Folder name:
Finance - Select the destination boolean variable:
folderExists
After the action runs, the folderExists variable stores one of the
following values:
True: TheFinancefolder exists on the email server.False: TheFinancefolder does not exist on the email server.