cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Morizk
Regular Visitor

Create a Flow when email body contain a specific string ?

hi

how can i create a Flow when received email body contain a specific string/text (example: "top urgent") , and send notification email to me ?

 

and to be applied only for body text before the first "From to:" , to avoid retrieving text from older emails in thread

3 ACCEPTED SOLUTIONS

Accepted Solutions
CFernandes
Super User
Super User

Hey @Morizk 

 

Please see the solution below -

 

CFernandes_0-1647935610442.png

 

I did a quick test and it works for me...

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

View solution in original post

Hey Mate @KvB1 

 

I assume you are trying to Parse the content - If yes, see - https://www.youtube.com/watch?v=7tZ6bRtco3Y 

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

 

 

View solution in original post

KvB1
Solution Sage
Solution Sage

You could use something like:

 

split(body('HTML_to_text'),'From:')[1]
 
In your condition
 
 
Explanation:
split(                                      tells PA that you want to split a string
body('HTML_to_text')            the string you want to split
'From:'                                   the string you want to split by
 
The output of this will be an array of strings. By saying [1] you make PA grab the second string in the array. [0] would return the 1st, etc

View solution in original post

11 REPLIES 11
CFernandes
Super User
Super User

Hey @Morizk 

 

Please see the solution below -

 

CFernandes_0-1647935610442.png

 

I did a quick test and it works for me...

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

Hi @CFernandes 

 

looks good, but i want the condition (Body contain text) to lookup only the text of the latest email on top

as you know when you reply to an email you get older emails added to the body below , if the text "top urgent" is included in an email that was already replied to a month ago then the flow will return True, which is not what i want 

 

so if possible to lookup only between the beginning of email to the first "From:" would work 

or if you can suggest something else would be great 

 

KvB1
Solution Sage
Solution Sage

Can you post the output of the html to text action from when you tested?

 

I think it should be possible to find the string that sepparates the conversation history, then split the body on this string, and then grab the first string from that array.

Hey Mate @KvB1 

 

I assume you are trying to Parse the content - If yes, see - https://www.youtube.com/watch?v=7tZ6bRtco3Y 

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

 

P.S. take a look at my blog here and like & subscribe to my YouTube Channel thanks.

 

 

Morizk
Regular Visitor

hi @KvB1 

 

plz check below , this's a blank test email with the text i'm looking for in an older email down below (highlighted in yellow) , i believe that the string that separates the conversation history here should be the text "From:" in red 

Untitled.png

 

KvB1
Solution Sage
Solution Sage

Yeah sure, just make sure you grab the second string in the array that you would get when splitting the text on that phrase

Morizk
Regular Visitor

yes but i'm not sure how to do it , would you plz suggest a solution ?

 

Untitled.png

KvB1
Solution Sage
Solution Sage

You could use something like:

 

split(body('HTML_to_text'),'From:')[1]
 
In your condition
 
 
Explanation:
split(                                      tells PA that you want to split a string
body('HTML_to_text')            the string you want to split
'From:'                                   the string you want to split by
 
The output of this will be an array of strings. By saying [1] you make PA grab the second string in the array. [0] would return the 1st, etc
Morizk
Regular Visitor

hi @KvB1 

i'm almost there , but the checker gives me an error in the split expression , i don't know why 

Untitled.png

KvB1
Solution Sage
Solution Sage

You can see the name of the action that you want to use:

KvB1_0-1647951947292.png

 

In the previous screenshots you posted one what was called 'Html to text', now its 'Html to text 2'. So you have to adjust the input of what you want to split in the expression accordingly to: body('Html_to_text_2')

Morizk
Regular Visitor

thank you dear 

it's working now 🙏

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events happening this month - don't miss out!

 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (4,020)