Hello All,
I have a shared mailbox that is receiving emails from many different domains using a catch-all and forwarding rule on the domain registrar level. Next, the rule on OWA moves the email to a corresponding subfolder based on the recipient (domain)name.
To make sure there is no issue with forwarding on the domain level, once a week, I send a test email to all domains/subfolders and then manually check each of the 50 subfolders.
Now, I know I can create a Flow for each subfolder to check if the email has been received from aaa@xyz.com and then do something.
Is there a way to check all subfolders in a shared mailbox if the email hasn't been received, I would like to use single Flow for this task.
I would have to loop through each subfolder and check if there is email from aaa@xyz.com if not then send a notificaiton.
Thanks!
Here is a full flow if anyone can benefit from it.
Thanks @VictorIvanidze I found this expression https://powerusers.microsoft.com/t5/General-Power-Automate/Get-emails-V3-action-if-no-results/td-p/765935 which seems work for me.
In "Get emails" set top to 1. As the output of "Get emails" is an array, check its length.
Configure two parallel actions. One gets triggered on previous step success, the other on failure.
I can't figure out how to create a condition which checks if email exists.
If I check for the email body in empty subfolder condition fails with:
Unexpected error. Request to Azure Resource Manager failed with error: '{"error":{"code":"ActionRepetitionNotFound","message":"The specified repetition '000001-000000' of workflow action 'Condition' is not found."}}'.
If the email is found in subfolder then condition is True. Any idea @lbendlin ?
I only know how to do that using Outlook VBA, Powershell, or a standalone C# app. I don't think there are any options in Power Automate to do that - maybe via Graph API?
Thanks @lbendlin I’m curious now, how would deal with this if the folders are dynamic and new ones are added or removed.
That is good. In that case you can create an array with the folder paths, and then loop over that
In the Get Emails step you can specify your conditions. After the call you can check if it returned at least one email (in which case you skip to the next folder) or not (in which case you would send the notification - or collect the folder name so you can send a combined notification after all folders are checked).
It’s static, thanks!
Is your folder list static (ie could it be provided in an array and iterated over) or do you want a flow that automatically traverses all subfolders?
WarrenBelz
146,745
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,091
Most Valuable Professional