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

Extract number from email text

I have a condition in Flow which sends an email depending on a number in the incoming email.

 

Condition "contains" is passing through without finding the number?

 

Flow.jpg

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Extract number from email text

Hi @tpitman,

 

Could you please share a full screenshot of your flow's configuration?

Could you share an sample of the incoming email that you mentioned?

 

I think there is something wrong with the formula within your Condition box. I assume that the body of the incoming email as below:6.JPGPlease take a try with the following workaround:

  • Add a "When a new email arrives" trigger.
  • Add a "Html to text" action, Content field set to Body dynamic content of the trigger.
  • Add a Condition, click "Edit in advanced mode", type the following formula:
@contains(body('Html_to_text'), '12345')

Note: The number should be wrapped with single quotes as above rather than double quotes. If you use basic mode within Condition box, please click "Edit in advanced mode", then check if the number is wrapped with single quotes.

 

Image reference:7.JPG

The flow works successfully as below:8.JPG

 

 

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: Extract number from email text

Mant thanks, I shall certainly try it

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (10,152)