cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
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

Highlighted

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (3,637)