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
Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

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