web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Split email string the...
Power Automate
Unanswered

Split email string then move email based off string value using condition

(0) ShareShare
ReportReport
Posted on by 162

Probably on hour 4 now...and still can't get this to work...

 

What I'm trying to do:

  • Pertinent background info - My organization's email address begins with a 1-3 digit number or it does not depending on the location we work, followed by a period, then name, then @organization. A few examples: (2.ssmith@org.com, 102.sclark@org.com, bjones@org.com)
  • High level Flow overview - When an email arrives in a shared mailbox, get the text before the "." in the From address, then, depending on the value, move the email to a specific folder in the 'main' mailbox.  The goal is to consolidate a number of shared mailboxes into one.  We think Flow will give us some flexibility with routing emails (maybe Flow is not the best idea?!)
  • I believe i have the expression to get the value before the period, but I can't get the condition to work. it either errors, or evaluates as false when it should be true.  It may be a string/integer issue but every combination i try fails to work. I also am not a variable/compose expert, so maybe i am using the wrong data operation
  • Here's my latest version of the Flow (I now have 4 different saved versions...all of which are not working). Note that i have hardcoded the condition value as a string:
    email flow.pngwhen testing this version, I am using an email sent from 2.name@org.com.  Here is the error I am getting:
  • email flow error.pngI've searched for help on this but can't seem to figure it out; any help would be greatly appreciated!
  • Thanks!
  • -Kurt
Categories:
I have the same question (0)
  • v-yuazh-msft Profile Picture
    on at

    Hi @kbarber,

     

    I have made a test on my side, please modify the expression in the Condition as below:

    @equals(outputs('Compose'), '2')

    The screenshot of the flow as below:

    Capture.PNG

    If the email address is "2.ssmith@org.com", the flow would run successfully as below:

    Capture.PNG

     

    Best regards,

    Alice

  • kbarber Profile Picture
    162 on at

    Thank you @v-yuazh-msft!

     

    So I think I was mistaken regarding what was causing the error.  I realize now that I am getting an error on the condition because the ensuing action is failing.  If the condition succeeds, the Move Email action should run, which takes the Message ID from the "When a new email arrives in a shared inbox" trigger and moves the email to the specified folder (see initial screenshot above).

    Here's more detail on the error:

     

    The specified object was not found in the store., The process failed to get the correct properties.
    clientRequestId: 706ee073-9726-4259-869b-adb6642c4a4a
    serviceRequestId: 2604d23b-4418-4dcb-a5ba-c0ea98a9c490

    email flow error2.png

    So, i believe the condition is working find.

    I did some research on the "Move Email" action but haven't found anything yet that explains the error...

     

    Any ideas?

     

    Thanks again,

    - Kurt

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard