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

Re: Extract number from email text

Mant thanks, I shall certainly try it

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: 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!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,386)