I'm using these solutions for adding two paths in when. File created or modified https://learn.microsoft.com/en-us/answers/questions/1182747/how-to-pass-two-folder-paths-in-when-a-file-is-cre my paths are documents/abc/mar-2023/abc_Feb_as on 05042023. 2nd path is Documents/abc/2023/Mar/05-Mar/example.xlsx So while create a date month folders also logic app will trigger how we can avoid these case only logic app will trigger when file created in the path
Asked
Active
Viewed 87 times
1 Answers
0
After reproducing from my end, I could get this done using trigger conditions from trigger settings. Below is the expression that was working only for files and not folders.
@equals(triggerBody()?['{IsFolder}'], false)

SwethaKandikonda
- 7,513
- 2
- 4
- 18
-
Thank you shweta but how can I give my file path on your expression – James Mar 06 '23 at 07:48
-
@James you need not to add any path. its for trigger conditions. – SwethaKandikonda Mar 06 '23 at 08:05
-
But how can I pasa my two paths of the file is uploaded on that path then only logic app will trigger – James Mar 06 '23 at 08:20
-
A/b/c/2023/03/06/example.xlsx so in these path if I create the date folder logic app will trigger so logic will will trigger only when the file is uploaded in desired path – James Mar 06 '23 at 08:21
-
Logic app will get triggered only when the file is upload and not the folder using the above mentioned expression. – SwethaKandikonda Mar 06 '23 at 08:39
-
I would recommend you to use the trigger without mentioning any folders then that would check only if the uploaded one is file or not then you can use switch case and mention the conditions like mentioned in https://stackoverflow.com/questions/75644051/how-to-check-file-names-under-two-triggers-in-one-logic-app/75648653#75648653 – SwethaKandikonda Mar 06 '23 at 08:42