cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Srigmac
New Member

Use Power automate to pull values from an email for the title of a task

Hi all

I'm using Power automate to create tasks from flagged emails. 

Is there a way to pull out a set string of information from that form email? I'd like the title of the task to be the course code the student enrolled in. 

 

Every email has this phrase in it but the course numbers change:

"This letter is to officially inform you that you have been
registered in BIOL*1009 online." 

 

I've tried a few things but I would appreciate any help! #Newbie

Cheers

Sarah

3 REPLIES 3
Winlou
Frequent Visitor

Working on a similar Flow now actually.  

 

You'll need to:

1. Convert the email from HTML to TEXT - There is a connector

2. Search the TEXT for the phrase "been registered in".  - This will give you a number.  This number represents the beginning of your phrase. (the "b" in "been") - Text Function Search Text connector

3.  Use the Text Functions substring connector to extract the text you want from the TEXT. 

You'll need to the give it a starting place which would be the location of Step 2 added to the number of characters of your search string the and a length of extraction, which from your example looks to be about nine characters.

 

 

 

I just realized that the find position will not work as the length of the student names will alter the position. Is there are a way to search the text for the phrase around it?

TIA

 

Winlou
Frequent Visitor

You'll need to account for that.  That start position might change, but the start position relative the information you want will not.

 

Possible Solution:   Find the position before and after the name then shift ( add() )  the substring start position over by that amount.

 

It might be helpful if you could post more of the email.  

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Users online (1,964)