cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PaulinoV
Microsoft
Microsoft

Trigger Automate only when certain users create a work item

Hi community,

 

Can you help me out with this: I'm building this flow, when an Epic is created (by certain users) with a particular tag, create X work items:

 

Now, I do have the Tag condition OK, but I can't figure how to approach the user list (5 users) I know there's a field for Created By in the trigger but can I add multiple values?

 

Screenshot 2021-07-14 124317.png

 

Can someone lend me a light please? 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @PaulinoV,

 

You could add the following expression to the trigger condition action in the settings:

Replace the 5 test e-mail addresses by the ones of your 5 users.

 

@or(contains(triggerOutputs()?['body']['fields']['System_CreatedBy'], 'test1@contoso.onmicrosoft.com'), contains(triggerOutputs()?['body']['fields']['System_CreatedBy'], 'test2@contoso.onmicrosoft.com'), contains(triggerOutputs()?['body']['fields']['System_CreatedBy'], 'test3@contoso.onmicrosoft.com'), contains(triggerOutputs()?['body']['fields']['System_CreatedBy'], 'test4@contoso.onmicrosoft.com'), contains(triggerOutputs()?['body']['fields']['System_CreatedBy'], 'test5@contoso.onmicrosoft.com'))

 

triggercondition_azuredevops.png

View solution in original post

2 REPLIES 2
Expiscornovus
Super User
Super User

Hi @PaulinoV,

 

You could add the following expression to the trigger condition action in the settings:

Replace the 5 test e-mail addresses by the ones of your 5 users.

 

@or(contains(triggerOutputs()?['body']['fields']['System_CreatedBy'], 'test1@contoso.onmicrosoft.com'), contains(triggerOutputs()?['body']['fields']['System_CreatedBy'], 'test2@contoso.onmicrosoft.com'), contains(triggerOutputs()?['body']['fields']['System_CreatedBy'], 'test3@contoso.onmicrosoft.com'), contains(triggerOutputs()?['body']['fields']['System_CreatedBy'], 'test4@contoso.onmicrosoft.com'), contains(triggerOutputs()?['body']['fields']['System_CreatedBy'], 'test5@contoso.onmicrosoft.com'))

 

triggercondition_azuredevops.png

View solution in original post

PaulinoV
Microsoft
Microsoft

@Expiscornovus This worked like a charm! Thanks

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
Users online (1,689)