Hi,
The following tutorial will help you. You can use filter of ForEachEmail activity for your condition.
Regards,