HTML Extract from email


I want to get the order number from an email I receive when a customer of ours buys a product.
I always receive the same email and I manage to extract part of the data from the email utilitzing the html extract, but I don’t know how to go further, and not if it’s even possible.

[<a href=""></a>]<br>Booyah! A new order!<br>23562275 :<br>Order recap :

That’s the result I get, I want to receive just the information after the text "A new order!
and befor “:
Order recap :” is it possible to search for a text and pass by the values in between?

Yes you can do this in the Code node - google for how to extract a number from a line in Javascript and that should get you the order# - you may have to use some Regex too

Hi @suardim,

Yes, for example with a set node you can do it with the .split() command. In the example you send, you can split the text by the <br> and then remove the text following the order number.


Thanks a lot @martinhache.

It works perfectly.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.