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

Extract specific text from email body to create planner task

Hello,

 

I have a flow set up to create a planner task from an email that comes into my inbox. It creates the task just fine, but it titles the task as the subject of the email where I want it to title the task based on certain text in the body of the email.

 

Here is my currently flow:

 

dshipley_0-1599246234231.png

The body of the email that comes in looks like this:

dshipley_1-1599246310388.png

 

I want the title of the Planner task to be whatever is after the first sentence (ending in "safe.") but before the email signature which starts with ("---").

 

So in this case - the task that is created in Planner from this flow should be called "Coca-Cola".

 

Thanks in advance for your help!

5 REPLIES 5
ChristianAbata
Super User
Super User

@dshipley  please paste here the content of email.. to help you



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

Below is the body of the email:

 

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


Coca-Cola
---
Sent using the Google Assistant

@dshipley  here you have friend

solution.gifsplit.PNGsplit2.PNG

 

 

I made this solution to be dinamic, so no maters what you have before --- you are going to be able to get it.

 

Hope this can helps



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

Thank you so much for the quick response. I am getting the following error, however:

 

Unable to process template language expressions in action 'Compose_2' inputs at line '1' and column '2877': 'The template language expression 'uriComponentToString(replace(uriComponent(outputs('Get_Title')[1]),'%0A',''))' cannot be evaluated because array index '1' is outside bounds (0, 0) of array. Please see https://aka.ms/logicexpressions for usage details.'.

 

 

Could you help?

dshipley_0-1599258806240.png

Thanks!

 

 Any help?

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,598)