How to use Retry Scope for Get Exchange Mail Messages

Hello Team,

I’m trying to read the emails using the Get Exchange Mail Messages, Sometimes due to the email server error, the Activity Fails and throws out an exception. I want the Activity " Get Exchange Mail Message" to be retried thrice before i finally throw out an exception to the Catch Block.

I need to include the Get Exchange Mail Messages Activity in the Action Section of Retry scope activity,I need to set a condition in the Condition section of the Retry Scope. I know we should use “Is True” or “Is False” but can you help me with the condition what needs to be set for “Is True” or “Is False” ?


@vvaidya @andrzej.kniola @loginerror

Can you guys help me with this?

Swapnil M Kadam


I am not sure if you need additional ‘Try Catch’ activity. Use ‘Retry Scope’ which has its own error catch mechanism. After Get Exchange mail activity add ‘assign’ activity which for example set boolean value to True (by default it is False) and add this boolean check to Retry Scope ‘Condition’ - use ‘Is True’ activity and inside input put this boolean variable.

Hi @Swapnil_Kadam

I don’t think retry scope can handle exception it is basically similar to do while loop execute the action part and check for the condition and if it not met it will retry, hence it will throw an exception if it has any.

The solution would be to use try catch inside a while loop and use two variables one Boolean variable and one int variable to increase the count whenever there is an exception (increase the count inside the catch part).

The condition will be if the Boolean variable is false (initialy it will be false and set to true at the end of try so we know that there is no exception occured) or the int variable is less then 3(initialy it is 0 or 1).


Yes it does handle and in my opinion it is enough for retrying purposes. Attached test workflow. In this example I initialize error at first retry only. Main.xaml (6.8 KB)

Hello All,

Thank you for the Inputs.

So for the check true condition.

I get a exception .Lets say Exception is “mail not found” for example.

so my condition would be boolean variable= exception.message.contains(“mail not found”)

now i put that boolean variable in “Is True” as condition.

Is my understanding correct?


If you want to handle only certain exceptions then - you have to use Try Catch because Retry Scope does not have any catch module.

If its throwing exception then use try catch along with while loop as stated before i think that would be more feasible…