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
Community Champion
Community Champion

@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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,752)