i need to grab the text from the body of the email that comes before the "$" symbol but i cant figure out the flow expression to use.
My email body would look like this :
1456B$ blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
I want to grab the text before the $, so in this case i need my output to be 1456B
I know my email will alway start with the bit of text i'm after ; there will be no spaces before or in it ; the text I want ends with $
Then the rest of the email body continues but that bit is irrelevant to me.
I hope someone out there can help me please.
I have some questions:
1. Is the 1456B$ always at the begining of the Email, without the Greeting string?
2. Is there only one $ symbol within all the Email Body?
We could take use of Microsoft Flow expression to deal with such a situation.
General steps should be as below:
1. Convert Email Body from HTML to Text,
2. Use Split function to analyze the OutPuts of the Convert action, then split out the string before $ symbol.
Split (this function will convert a whole string into an string Array) usage:
Splits the string using a separator. For example, this function returns
["a", "b", "c"]:
It would be much helpful if you could share an exact example of the Email Body.
1. Is the 1456B$ always at the begining of the Email, without the Greeting string? CORRECT
2. Is there only one $ symbol within all the Email Body? CORRECT
i'm aware of the split flow expression, what i was having trouble with is executing it - it kept coming up with invalid error. The Function Expression link you refer to is quite nebulous which is why i came to forum for specific advice.
Fortunately i have solved it on my own this evening, turns out i must use ' not " in the expression
there's a number of Split posts on here but none really explained it in a way i understood, so for anyone else out there here's what worked for me...
convert body HTML to text
to grab the text BEFORE the # symbol : first(split(body('Html_to_text'),'#'))
to grab the text AFTER the # symbol : last(split(body('Html_to_text'),'#'))
Been looking for the first(split command. Wanted to grab all of the text before the @ sign in an email address when a new email is received, the below worked a treat, thank you.
Learn how to create your own user groups today!
Check out the new Power Platform Community Connections gallery!
Congratulations, the new Super User Season 2 for 2021 has started!
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.