Dear community,
I want to create a Power Automate flow that moves existing emails from specific 2 subfolders (test1@test.com and test2@test.com) within a mailbox to designated folders based on a SharePoint list that provides the folder path and email subject.
I ran the flow and it says succeeded but did not move anything. I have the following alert:
Set Variable: ActionBranchingConditionNotSatisfied. The execution of template action 'Set_variable' skipped: the branching condition for this action is not satisfied.
Move Email (V2): ActionConditionFailed. The execution of template action 'Move_email_(V2)' is skipped: the 'runAfter' condition for action 'Set_variable' is not satisfied. Expected status values 'Succeeded' and actual value 'Skipped'.
My understanding is that it did not find existing emails to match with the SharePoint list. I would like your recommendations to make sure it can read the subfolders and all emails + match them with the SharePoint list (Equal or contains the subject name because all emails are not with he same format). And then to move them in their relevant folder. For those that could not be matched with the SharePoint list, they will remain into their folders and must be checked manually.
Thanks in advance for your help!
Copilot has suggested the following:
- Trigger: Manually trigger a flow
- Initialize Variable: FolderPath
- Name:
FolderPath
- Type:
String
- Value: Leave it empty for now.
- Get Emails: From test1@test.com
\Inbox
- Get Emails: From test2@test.com
\Inbox
- Get Items: From SharePoint list
Folder Path
- Apply to Each: Emails in test1@test.com
- Condition: If
Subject
equals Title
- If yes:
- Set Variable: FolderPath
- Name:
FolderPath
- Value:
Folder Path
(from SharePoint list)
- Move Email: To
Inbox\Companies\FolderPath
- Message Id:
Message Id
(from the Get emails action)
- Destination Folder:
Inbox\Companies\
followed by the FolderPath
variable
- Apply to Each: Emails in test2@test.com
- Condition: If
Subject
equals Title
- If yes:
- Set Variable: FolderPath
- Name:
FolderPath
- Value:
Folder Path
(from SharePoint list)
- Move Email: To
Inbox\Companies\FolderPath
- Message Id:
Message Id
(from the Get emails action)
- Destination Folder:
Inbox\Companies\
followed by the FolderPath
variable