cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
scheu
Microsoft
Microsoft

How to parse email body as a condition in MS flow

Hi,

 

In my email body, I want to build a flow with a condition to look for email body with this string

 

<span style=\\"background:red\\">Fail</span>

 

So I tried but it does not work.  Can you please tell me what am I missing?

@or(contains(triggerBody()?['Body'], '<span style=\\"background:red\\">Fail</span>'), contains(triggerBody()?['Body'], '"background:red\\'))

 

2 REPLIES 2
v-yamao-msft
Community Support
Community Support

Hi @scheu,

 

Please try to add an action Convert HTML to text before the Condition.

I have made the following test and it just works fine.

The condition is configured likes below:

@or(contains(body('Html_to_text'), '<span style=\\"background:red\\">Fail</span>'),contains(body('Html_to_text'),'background:red\\'))

Image for your reference.

1.PNG

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @scheu

Not sure if you have considered using https://parserr.com ? Its called Parserr in the connector list

Helps to do this without code and also extracts from PDF, CSV and Excel

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (81,562)