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

Pull Email address from VSTS "Assigned To"

I am creating a flow that notifies users if their assigned VSTS work item has not been touched for more than 7 days.

 

I have created a flow action that pulls a VSTS query result for work items not touched in 7 days.

 

I want to send an email to the person that the work item is assigned to. The output of 'Assigned To' is in this format: FirstName LastName <email@microsoft.com>. The Send an email action does not understand this as an input. How can I take the "Assigned To variable and only return the email address?

 

Here is the flow:

Capture.PNG

 

 

1 REPLY 1
v-yamao-msft
Community Support
Community Support

Hi @LeviC,

 

Do you want to get the email address from the output of Assigned to in format “FirstName LastName <email@microsoft.com> “?

 

Please try the following flow configuration.

 

In my testing flow, it is triggered by a button.

 

Add a Compose action, get the start position of the actual email address:

add(indexOf(triggerBody()['text'],'<'),1)

 

Add a Compose2 action, get the last position of the actual email address:

add(indexOf(triggerBody()['text'],'.com'),4)

 

Add a Compose3 action, get the actual email address:

substring(triggerBody()['text'],outputs('Compose'),sub(outputs('Compose_2'),outputs('Compose')))

 

I have made a test on my side and it works fine.

1.PNG2.PNG

Please try it on your side.

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,989)