Hi
I am using PowerAutomate to pull Text from a standard email template like below, I have tried splits previously, The problem I'm having is some of the fields such as "Vehicles" Aren't always on the same email line as some fields are multiple lines or single lines.
The bold Text is always the same.
Destination: Parnngurr
Arrival Date: 11/03/2024
Check In Time: 16:00
Vehicles: KJ33 1HPI 326 n/a KJ35 1HZU453 n/a KJ13 1HHN906 n/a n/a .n/a .
I'm currently using below variable mentioned in a post here, but I keep getting the The length of substring can't be longer than '251' which is the length of the source string, Regardless of what I change the numbers too.
substring(triggerOutputs()?['body/bodyPreview'],add(indexOf(triggerOutputs()?['body/bodyPreview'],'Departing From: '),14),sub(indexOf(triggerOutputs()?['body/bodyPreview'],'Travelling Via: '),add(indexOf(triggerOutputs()?['body/bodyPreview'], 'Departing From: '),7)))
Help is much appreciated.