I'm trying to set up a flow that when an email arrives in to a mailbox, there is a check of whether the subject of the email contains the Title of an item in a Sharepoint List. If it does, then it moves it to the folder specified in Sharepoint based on Dynamic. If it doesn't then it moves it to a triage inbox folder.
As well as for new emails, I want it to be all emails in the inbox. e.g. if an email arrives and it's not in the list because the case# is missing and it moves it to the triage folder, an employee will find the case#, add it to the subject and drag it back to the Inbox.
The flow should then pick that email up to find the correct subfolder and move accordingly.
I've tried a flow that recurs every 1 minute and then "Gets emails (V3)" followed by "Get items" then start a condition of 'Subject' contains 'Title'
If yes: Move email with 'Folder' (which is a column in the sharepoint list and matches the Inbox subfolder) as dynamic content.
If no: Move email to 'Triage' (which is a subfolder).
What I can't get to work is that it adds an "Apply to each" for both the email value and the sharepoint value so it starts running the flow for every item in the sharepoint list then ends up failing as the message ID no longer exists once its complete.
Any help is appreciated.
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1