I am trying to create a flow when a new file is created in sharepoint library, if it's created by User A, it will trigger a message to the teams channel.
The trouble I'm having is, I don't know how to check the created by column via the PowerAutomate condition. Any help will be much appreciated.
Solved! Go to Solution.
Hi @Alec2020,
If you are using the trigger "When a file is created(properties only)", you could use the dynamic content to get the Email or username of the creator, and then create a Condition action to determine:
If you are using the trigger "When a file is created in a folder", you should get the file metadata to extract the File ID, then use Get file properties action to get the information of creator:
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Alec2020 I wouldn't use a Condition for this as it will get very messy if you have a lot of different users creating documents. It would be better to use a Switch control (a form of condition that looks at one specific value) with the Created By as the switch. Then you can have up to about 26 different cases each with actions in them. So in case Created By is User A then send a message to the Teams channel. If it's User B then do something else.
Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.
Hi!
You should be able to get this info from dynamic content menu.
Or, by using the equivalent expression:
triggerBody()?['Author']
Please note the output is an object of type person, so if you need the email you should use
triggerBody()?['Author']?['Email']
If this suggestion does not work, can you please share a screenshot from your current flow design?
Thanx!
Proud to be a Flownaut!
Hi @Alec2020,
If you are using the trigger "When a file is created(properties only)", you could use the dynamic content to get the Email or username of the creator, and then create a Condition action to determine:
If you are using the trigger "When a file is created in a folder", you should get the file metadata to extract the File ID, then use Get file properties action to get the information of creator:
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
89 | |
37 | |
26 | |
13 | |
12 |
User | Count |
---|---|
128 | |
53 | |
38 | |
26 | |
21 |