Skip to main content

Notifications

Community site session details

Community site session details

Session Id : kpYK5WJG0sjZGsaoseIHAp
Power Automate - Building Flows
Unanswered

Existing Email Classification Flow

Like (0) ShareShare
ReportReport
Posted on 14 Mar 2025 12:20:39 by
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:
 
  1. Trigger: Manually trigger a flow
  2. Initialize Variable: FolderPath
    • Name: FolderPath
    • Type: String
    • Value: Leave it empty for now.
  3. Get Emails: From test1@test.com\Inbox
  4. Get Emails: From test2@test.com\Inbox
  5. Get Items: From SharePoint list Folder Path
  6. 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
  7. 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
  • Building with Why Profile Picture
    193 on 14 Mar 2025 at 13:00:14
    Existing Email Classification Flow
    Your Apply to each goes to the Email Inbox
    But you do not have a filter to compare the email Subject to the Title.  There are multiple Title items to compare against.  This is resulting in a fail in your Condition.
    Filter the SharePoint List
    Title eq Subject
     
    This will result in a "list" of 1?? SharePoint item for your email.  Get the first item by using the first function to get the Folder Name and Folder Path.  This will also prevent an unnecessary Apply to each nested inside your current Apply to each.
     
    Please like this if it helped.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Thomas Rice – Community Spotlight

We are honored to recognize Thomas Rice as our March 2025 Community…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,508 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,431 Most Valuable Professional

Leaderboard
Loading complete