Notifications
Announcements
Hi
I am unable to parse the email body.
Hi @Rina_22
Pls try the below expression:
trim(join(reverse(take(reverse(split(outputs('split_bodytext'),' ')),3)),' '))
If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.
Thanks
I would try one of the following (depending on how it's storing your new line characters).
last(split(outputs('split_bodytext'), '\n')) last(split(outputs('split_bodytext'), decodeUriComponent('%0A')))
HI
thank you, but it doesnt work. Here is the error message:
Unable to process template language expressions in action 'Date' inputs at line '0' and column '0': 'The template language function 'split' expects its first parameter to be of type string. The provided value is of type 'Array'. Please see https://aka.ms/logicexpressions#split for usage details.'.
Pls share the output array of 'split_bodytext' action. Is it containing single or multiple elements?
Reference
this is the expression: last(split(outputs('split_bodytext')[0],': '))
Date
trim(join(reverse(take(reverse(split(outputs('reference'),' ')),3)),' '))
The output is showing the reference no. instead.
Both dont work. it is taking the reference no. instead of the date.
"body": "Ref : CAM/2023/686/AE\n\n \n\n15 December 2023
Pls try this one:
trim(join(reverse(take(reverse(split(first(outputs('split_bodytext')),' ')),3)),' '))
Hi @Rina_22 ,
You could try this regular expression to accurately match dates in a segment of text.
\b[0-3]?[0-9] (January|February|March|April|May|June|July|August|September|October|November|December) (1|2)\d{3}\b
About how to use regular expression in power automate:
https://andersjensen.org/how-to-use-regex-in-power-automate/
Best Regards,
Bof
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Michael E. Gernaey 538 Super User 2025 Season 2
Tomac 405 Moderator
abm abm 252 Most Valuable Professional