Hi All,
I have been trying to build a flow that collects the data from an e-mail and writes it into an excel using add a row into a table function.
Other fields are working just fine however, I need to split the last line into the two fields as follows:
Field1: xxxx
Field2: xxxx
Field3: xxxx
Amount to Pay: 4,344,772.60 in USD

I was using the expressions below for big amounts, but the problem is that amount is changing between <100 and 10 of millions.
It was working just fine until I receive small amounts. When amounts are too low like 66.70 in USD columns are shifting as expected and I see something like '66,70 in U' in Amount to Pay column and 'SD' in Currency column.
Amount to Pay:
substring(body('Html_to_text'),add(lastIndexOf(body('Html_to_text'),'Amount to Pay:'), 14),12)
Currency:
substring(body('Html_to_text'),add(lastIndexOf(body('Html_to_text'),'Amount to Pay:'), 31),3)
How can I adjust my flow so that it can properly parse the information that I need?
Many thanks.