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? 

 

 

2 ACCEPTED SOLUTIONS

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

PaulinoV
Microsoft
Microsoft

@Expiscornovus This worked like a charm! Thanks

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

PaulinoV
Microsoft
Microsoft

@Expiscornovus This worked like a charm! Thanks

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,812)