Hi I new here, so I need to iterate through mail and check their subject if the subject is "Invoice I need to proceed further or else I need to throw an error after loop is completed I already created workflow but its not working when email subject is dif

Hi @Simran2,

I think in GetOutlookMailMessage, put condition “@SQL=(urn:schemas:httpmail:subject LIKE ‘%Invoice%’)”.
This will fetch all unread mails where subject line contains Invoice keyword and then in if condition you can check if mailMessage count>0, proceed with steps else throw exception.
This way we can avoid loop as well.

Thanks & Regards,
Disha Jain