I hope you're doing well.
I need to ask for your assistance because I created a power automate flow that extracts data from an automated email received every time people request a product through a third party platform. The problem that I have is that the email format is never consistent. The lines change for every single email received; therefore, my flow fails all the time.
AHORRO 1 - SAMPLE
*** EXTERNAL EMAIL ***
Gestión APP
Retiro de ahorro
Nombre del asociado:XXXXXXX XXXXXX XXXXXXIdentificación del
asociado:1234567Ahorro retirado:ahorro a la vistaFecha y hora:29/8/2025
11:10:35Institución bancaria:BANCONúmero de cuenta:XXXXXXXDetalle
del movimiento:Solicitud de transferencia 1817Principal anterior:20,000.00Retiro
Principal:20,000.00Cargos a aplicar principal:0.00Principal actual:0.00Intereses
anterior:0.00Retiro de intereses:0.00Cargos a aplicar intereses:0.00Intereses
actual:0.00Total a retirar:20,000.00Total
desembolso:20,000.00Observaciones:
AHORRO 2 - SAMPLE
*** EXTERNAL EMAIL ***
Gestión APP
Retiro de ahorro
Nombre del asociado:XXXXX XXXXX XXXXXIdentificación del
asociado:1234567Ahorro retirado:ahorro vacacional (12 meses)Fecha y
hora:29/8/2025 13:02:39Institución bancaria:BANCONúmero de
cuenta:XXXXXXXXXDetalle del movimiento:Solicitud de transferencia 1820Principal
anterior:140,000.00Retiro Principal:100,000.00Cargos a aplicar
principal:0.00Principal actual:40,000.00Intereses anterior:0.00Retiro de
intereses:0.00Cargos a aplicar intereses:0.00Intereses actual:0.00Total a
retirar:100,000.00Total desembolso:100,000.00Observaciones:
AHORRO 3 - SAMPLE
[
"*** EXTERNAL EMAIL ***",
"",
"",
"Gestión APP",
"Retiro de ahorro",
"",
"",
"Nombre del asociado:XXXXX XXXXX XXXXXXIdentificación del asociado:12345678Ahorro",
"retirado:ahorro a la vistaFecha y hora:29/8/2025 13:56:24Institución",
"bancaria:BANCONúmero de cuenta:XXXXXXXXXXXXDetalle del",
"movimiento:Solicitud de transferencia 1821Principal anterior:50,000.00Retiro",
"Principal:50,000.00Cargos a aplicar principal:0.00Principal actual:0.00Intereses",
"anterior:0.00Retiro de intereses:0.00Cargos a aplicar intereses:0.00Intereses",
"actual:0.00Total a retirar:50,000.00Total desembolso:50,000.00Observaciones:",
"",
" ",
"",
"",
"",
"",
"",
""
My flow looks like this:

My ComposeSplitLines uses this formula:
split(replace(replace(replace(body('Html_to_text'), decodeUriComponent('%0D%0A'), decodeUriComponent('%0A')), decodeUriComponent('%0D'), decodeUriComponent('%0A')), '<br>', decodeUriComponent('%0A')), decodeUriComponent('%0A'))
Then I have a filter to get each one of the datapoints I need (FullName, EmployeeID, Product, Amount and Date) Filter arrays formulas look like this:
After each filter array, there is a compose action retrieving the values between delimiters:
split(split(first(body('FilterName')), 'Nombre del asociado:')[1], 'Identificación')[0]
But since the order of the data changes with every email, it keeps failing. I've tried doing it in so many ways but nothing seems to work. Could you please help?
Thanks in advance!