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

Extracting an email address from a task description in planner

I have a flow to create a task in planner using the responses from a form. The email address of the person who completes the form is added, with other information, to the task description, as below:

Anders4_0-1600876370284.png

 

I now want another flow to send an email to the person who originally submitted the form when the task is completed. How can I extract the email address from the task description so it can be used in the 'To' field on the 'send email (V2) part of the flow? Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

Seems we are close to a happy ending, right?

Now on the new issue, I would try the following:

Add a 'Compose' action block at the top of your flow just after the trigger, lets call it 'Compose NewLine', now you need to assign as its input a value... so just hit the 'Enter' key from your keyboard

Next, you can modify a little bit the expression shared before:

replace(first(split(last(split(variables('myTaskDescription'),'Responder:')),'Submitted On:')),outputs('Compose_NewLine'),'')

Please note the expression relies on the fact you renamed the Compose action block into 'Compose NewLine'

 

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

7 REPLIES 7
efialttes
Super User
Super User

You mean the responder's email?

Assuming you store the task description in a variable called 'myTaskDEscription', I would try with the following WDL expression:

first(split(last(split(variables('myTaskDescription'),'Responder:')),'Submitted On:'))

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Thanks for this advice. However, I don't have 'mytaskdescription' as an option in the dynamic content to select. The closest is 'hascontent', but this errors if I try to use it. I can't see any option that relates to the description. Any ideas?

 

Thanks.

Hi!

As far as I remember, task description can be obteined by adding 'Get task details' action block just after the trigger 'When a task is completed'. Then you can add an 'Initialize action block' type string, name 'myTaskDescription' and assign task description as its value by selecting it from the dynamic content menu

Not with my laptop, unable to doublecheck



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



 Thanks for this @efialttes, I am getting closer. The flow now fails due to the email address saying the full email address with \n at the end, I guess due to the line break in the task details.

 

Is it possible to solve this so it doesn't try to see the \n as part of the email address?

 

Thanks


Andy

Seems we are close to a happy ending, right?

Now on the new issue, I would try the following:

Add a 'Compose' action block at the top of your flow just after the trigger, lets call it 'Compose NewLine', now you need to assign as its input a value... so just hit the 'Enter' key from your keyboard

Next, you can modify a little bit the expression shared before:

replace(first(split(last(split(variables('myTaskDescription'),'Responder:')),'Submitted On:')),outputs('Compose_NewLine'),'')

Please note the expression relies on the fact you renamed the Compose action block into 'Compose NewLine'

 

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

@efialttes That's amazing thank you, all works as planned.

 

Really appreciate your help on this

 

Thanks

Issue solved, right?

Hurray! Good Job!

THanx for marking this topic as solved! THis way other community members facing a similar issue can find their way faster!

Thanx for your kindness!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,334)