cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Advocate II
Advocate II

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

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
2 REPLIES 2
Community Support
Community Support

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

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

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (26,546)