cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

SharePoint Get items from Email message invalid Expression

Hi there, 

 

I have been battling with this and need some help in trying to figure this out. I have an App that users area using to log some issues. What I'm in trying to do is get the MessageID which is a long string of characters from the Emails users area sending to a specific inbox. I'm using the Get Items control and using the the Filter Query to catch the MessageID from the incoming email. 

The Field Name is MessageID ans this is what I'm entering in there; MessageID eq (this is the dynamic content coming from the email) in this case is MessageID so the query is; MessageID eq  trigger()?['messageid']

I just can't make it work, I keeps failing saying that the Expression is not valid. 

 

But when I enter MessageID eq and the actual string of characters enclosed in single quotes, it works. but I need this to be dynamic.

 

Let me know if you have some ideas how to resolve this.

 

Thanks very much in advance.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @MidwayC11 ,

Try to use condition action and check for the length of value from the previous action and if it is greater than 0 continue your flow with other actions in the 'Yes' branch, in the 'No' branch leave empty or you can perform failover actions if any.

Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...

View solution in original post

8 REPLIES 8
Super User III
Super User III

Can you post a screenshot of the get items action including the filter?
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

 
 
 
 
 
 

Capture.JPG

 

TicketMessageID is the column name coming from the list. The internet Message Id is the dymanic content coming from from Email. 

Thanks for your help.

 

 

 

 

Hi @MidwayC11 

Try to include the dynamic expression inside single quotes. Flow will automatically map the dynamic value inside the quotes. Try it and let us know.

 

Hope it helps, please like it or mark it as a solution if it resolves ur clarification or issue
-Sudharsan K...

Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...

Capture1.JPG

 

I did wrap the dynamic expression in single quotes but this is what I get. A null value. 

Hi @MidwayC11 

The screenshot shows the returned values which is an empty array, which means that there is no items matching the filter query. It would be helpful, if you post the full screenshot, so that we can check the messageid that is being sent in the query and also the screenshot of the SharePoint list item matching the messageid.

Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...

Thanks for replying to my post here. Now I have been trying to evaluate when the array comes out empty or not. How would you evaluate if the array comes out empty or not empty in a condition?

 

Thanks for your help again.

 

Hi @MidwayC11 ,

Try to use condition action and check for the length of value from the previous action and if it is greater than 0 continue your flow with other actions in the 'Yes' branch, in the 'No' branch leave empty or you can perform failover actions if any.

Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...

View solution in original post

Thanks very much for your help, that did the trick!

Helpful resources

Announcements
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

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 (10,070)