Our accounting department has a shared mailbox with a few dozen folders, to which mail is automatically moved based on the sender's address. The flow I'm working on should upload the attachments on these emails (if there are any) to an Azure Blob Storage and mark the email as read.
The issue here is that the "When a new email arrives (in a Shared mailbox)" trigger can only listen to a single folder.
One solution (sort of) is to create another folder, copy the email to it and have the trigger listen to this new folder instead. However, when doing so it will only mark emails as read in this new folder, and not the original folder.
Is there any way other way of doing this, so that mails are being marked as read in their original folder?
Yes, please. How to you go about scanning multiple subfolders in outlook? Right now i have about 30 folders (or could use categories) that I want to pull the attachments from and save to respective OneDrive folders. The only way I can see to do this is to create a separate Flow for each Outlook folder (and I don't even know where to start if I wanted to use Outlook categories instead).
Could you please share how we can scan all subfolders of o365 through flow?
Hi @alex93jansen, don't use a trigger at all. Run your flow every 10 minutes and scan all subfolders.
Currently there is a limitation that a Trigger for the Outlook connector can point to a single folder only. And if you are triggering a flow based on the new folder where the emails are being copied, the original email message ID is lost and therefore you cannot use the mark as read/unread action in the parent flow.
One thing you can try out is, when you are copying the original email to the other folder, you can flag it and trigger a flow when an email is flagged and then mark it as read (but again the problem is that this will need a flow for every folder)
Hope this Helps!
If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!