{"id":2404,"date":"2022-01-06T12:15:13","date_gmt":"2022-01-06T12:15:13","guid":{"rendered":"https:\/\/365stack.in\/?p=2404"},"modified":"2022-01-06T12:15:17","modified_gmt":"2022-01-06T12:15:17","slug":"trigger-flow-when-a-folder-is-created-in-the-sharepoint-library","status":"publish","type":"post","link":"https:\/\/365stack.in\/index.php\/2022\/01\/06\/trigger-flow-when-a-folder-is-created-in-the-sharepoint-library\/","title":{"rendered":"Trigger flow when a folder is created in the SharePoint library"},"content":{"rendered":"\n<p>There are many triggers available for SharePoint list and libraries but in some cases, the flow should be triggered only a folder is created or a file is created inside the library, there are no direct triggers available but with the help of conditions we can trigger the flow when needed.<\/p>\n\n\n\n<p>We are going to make use of Trigger conditions in the flow trigger. In this example, we used the &#8220;When a file is created (properties only)&#8221; trigger.<\/p>\n\n\n\n<p>SharePoint returns the &#8220;<strong>IsFolder<\/strong>&#8221; value whenever the flow is triggered, we will use it in the trigger conditions.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"468\" data-attachment-id=\"2405\" data-permalink=\"https:\/\/365stack.in\/index.php\/2022\/01\/06\/trigger-flow-when-a-folder-is-created-in-the-sharepoint-library\/screenshot-713\/\" data-orig-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2022\/01\/Screenshot-713.png?fit=1035%2C757&amp;ssl=1?v=1641469857\" data-orig-size=\"1035,757\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-713\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2022\/01\/Screenshot-713.png?fit=300%2C219&amp;ssl=1?v=1641469857\" data-large-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2022\/01\/Screenshot-713.png?fit=640%2C468&amp;ssl=1?v=1641469857\" src=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2022\/01\/Screenshot-713-1024x749.png?resize=640%2C468&#038;ssl=1\" alt=\"\" class=\"wp-image-2405\" srcset=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2022\/01\/Screenshot-713.png?w=1024&amp;ssl=1 1024w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2022\/01\/Screenshot-713.png?w=300&amp;ssl=1 300w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2022\/01\/Screenshot-713.png?w=768&amp;ssl=1 768w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2022\/01\/Screenshot-713.png?w=1035&amp;ssl=1 1035w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><figcaption>Trigger Conditions<\/figcaption><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>@equals(triggerOutputs()?&#91;'body\/{IsFolder}'],true)<\/code><\/pre>\n\n\n\n<p>Now the flow will trigger whenever the folder is created. It can be changed vice-versa if the flow needs to be triggered only a file is created then we can make the condition as false.<\/p>\n\n\n\n<p>But here is one additional use case, if the flow needs to be triggered when a folder is created as a Parent folder and it should not be triggered when it is created inside another folder.<\/p>\n\n\n\n<p>We need to make use of the &#8220;<strong>LinktoItem<\/strong>&#8221; property and see whether it is a parent folder.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"468\" data-attachment-id=\"2406\" data-permalink=\"https:\/\/365stack.in\/index.php\/2022\/01\/06\/trigger-flow-when-a-folder-is-created-in-the-sharepoint-library\/screenshot-714\/\" data-orig-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2022\/01\/Screenshot-714.png?fit=1043%2C763&amp;ssl=1?v=1641471039\" data-orig-size=\"1043,763\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Screenshot-714\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2022\/01\/Screenshot-714.png?fit=300%2C219&amp;ssl=1?v=1641471039\" data-large-file=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2022\/01\/Screenshot-714.png?fit=640%2C468&amp;ssl=1?v=1641471039\" src=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2022\/01\/Screenshot-714-1024x749.png?resize=640%2C468&#038;ssl=1\" alt=\"\" class=\"wp-image-2406\" srcset=\"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2022\/01\/Screenshot-714.png?w=1024&amp;ssl=1 1024w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2022\/01\/Screenshot-714.png?w=300&amp;ssl=1 300w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2022\/01\/Screenshot-714.png?w=768&amp;ssl=1 768w, https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2022\/01\/Screenshot-714.png?w=1043&amp;ssl=1 1043w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" data-recalc-dims=\"1\" \/><figcaption>Trigger Condition<\/figcaption><\/figure><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>@equals(length(split(split(triggerOutputs()?&#91;'body\/{Link}'],'LibraryNameFromURL')&#91;1],'\/')),2)<\/code><\/pre>\n\n\n\n<p>Please post your queries in the comment section. Happy Building \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are many triggers available for SharePoint list and libraries but in some cases, the flow should be triggered only a folder is created or a file is created inside the library, there are no direct triggers available but with the help of conditions we can trigger the flow when needed. We are going to make use of Trigger conditions [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":2406,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[8,32,4],"tags":[99,98,33,10,30],"class_list":["post-2404","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-power-automate","category-power-platform","category-sharepoint","tag-folder-trigger","tag-library","tag-power-platform","tag-powerautomate","tag-sharepoint"],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2022\/01\/Screenshot-714.png?fit=1043%2C763&ssl=1?v=1641471039","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":2044,"url":"https:\/\/365stack.in\/index.php\/2021\/12\/31\/how-to-stop-infinite-flow-trigger-in-power-automate-using-csom\/","url_meta":{"origin":2404,"position":0},"title":"How to stop infinite flow trigger in Power Automate using CSOM","author":"Hemanthkumar Rajan","date":"December 31, 2021","format":false,"excerpt":"Infinite flow trigger is a common scenario in workflow softwares like Nintex, K2 and even in Power Automate. There is a classic way of handling it by using the flag column with form, flag column without form. In classic SharePoint sites, Javascript can be injected in the form load, we\u2026","rel":"","context":"In &quot;Power Automate&quot;","block_context":{"text":"Power Automate","link":"https:\/\/365stack.in\/index.php\/category\/power-platform\/power-automate\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Screenshot-523.png?fit=1200%2C564&ssl=1%3Fv%3D1639334604&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1973,"url":"https:\/\/365stack.in\/index.php\/2022\/06\/24\/http-triggers-in-power-automate-explained\/","url_meta":{"origin":2404,"position":1},"title":"HTTP triggers in Power Automate explained","author":"Hemanthkumar Rajan","date":"June 24, 2022","format":false,"excerpt":"Power Automate flows can be triggered with HTTP triggers and it will be useful in many scenarios. There are HTTP actions available inside a flow that can be used to get or post data to an external system, In the Azure Form recognizer example, we have used HTTP get request.\u2026","rel":"","context":"In &quot;Power Automate&quot;","block_context":{"text":"Power Automate","link":"https:\/\/365stack.in\/index.php\/category\/power-platform\/power-automate\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Screenshot-612-1.png?fit=1200%2C550&ssl=1%3Fv%3D1640102154&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1547,"url":"https:\/\/365stack.in\/index.php\/2021\/11\/25\/how-to-update-the-changes-in-office-365-outlook-calendar-event\/","url_meta":{"origin":2404,"position":2},"title":"How to track the changes in Office 365 outlook events","author":"Premkumar Perumal","date":"November 25, 2021","format":false,"excerpt":"We may need to update calendar events details such as attendees, event details and etc. after the events created and those updates need to be tracked. We use SharePoint list and Power Automate to the automate this process. Prerequisite: We use SharePoint list to submit requests to create events in\u2026","rel":"","context":"In &quot;Power Automate&quot;","block_context":{"text":"Power Automate","link":"https:\/\/365stack.in\/index.php\/category\/power-platform\/power-automate\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/11\/Screenshot-2021-11-25-181435.png?fit=762%2C277&ssl=1%3Fv%3D1637844347&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2060,"url":"https:\/\/365stack.in\/index.php\/2021\/12\/12\/how-to-stop-infinite-flow-trigger-in-power-automate-using-flag-column\/","url_meta":{"origin":2404,"position":3},"title":"How to stop infinite flow trigger in Power Automate using flag column","author":"Hemanthkumar Rajan","date":"December 12, 2021","format":false,"excerpt":"Infinite flow trigger is a common scenario in workflow softwares like Nintex, K2 and even in Power Automate. If the Canvas app is involved in this process we can handle it easily with the \"Flag\" column. Create a Flag column with default values as \"Yes\" Flag Column Customize form for\u2026","rel":"","context":"In &quot;Canvas Apps&quot;","block_context":{"text":"Canvas Apps","link":"https:\/\/365stack.in\/index.php\/category\/power-platform\/powerapps\/canvas-apps\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Screenshot-530.png?fit=1200%2C562&ssl=1%3Fv%3D1639337681&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":1220,"url":"https:\/\/365stack.in\/index.php\/2021\/07\/05\/a-complete-guide-for-migration-to-power-platform-pre-development-analysis-part-1\/","url_meta":{"origin":2404,"position":4},"title":"A Complete Guide for Migration to Power Platform: Pre-Development Analysis &#8211; Part 1","author":"Hemanthkumar Rajan","date":"July 5, 2021","format":false,"excerpt":"If the application is going to be created from a new requirement, we can focus only on the Power Platform by analyzing the use cases of the requirement and a feasibility study should suffice for common scenarios like approval, functions, references, CRUD operations, integrations, performance, limitations has to be taken\u2026","rel":"","context":"In &quot;Power Platform&quot;","block_context":{"text":"Power Platform","link":"https:\/\/365stack.in\/index.php\/category\/power-platform\/"},"img":{"alt_text":"Pre Development Analysis","src":"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/07\/Requirement-Anlaysis-scaled.jpeg?fit=1200%2C829&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":2187,"url":"https:\/\/365stack.in\/index.php\/2021\/12\/30\/how-to-stop-infinite-loop-using-in-power-automate-using-multiple-lines-of-text\/","url_meta":{"origin":2404,"position":5},"title":"How to stop infinite loop in Power Automate using Multiple lines of text","author":"Hemanthkumar Rajan","date":"December 30, 2021","format":false,"excerpt":"We have previously discussed how to stop infinite flow using CSOM update, flag column with form and modified by column, By the way, in this method we can do from the workflow itself even if we don't have a customized form and it will be much easier than the uglier\u2026","rel":"","context":"In &quot;Power Automate&quot;","block_context":{"text":"Power Automate","link":"https:\/\/365stack.in\/index.php\/category\/power-platform\/power-automate\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/365stack.in\/wp-content\/uploads\/2021\/12\/Screenshot-566.png?fit=1181%2C735&ssl=1%3Fv%3D1639846959&resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/posts\/2404","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/comments?post=2404"}],"version-history":[{"count":1,"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/posts\/2404\/revisions"}],"predecessor-version":[{"id":2407,"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/posts\/2404\/revisions\/2407"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/media\/2406"}],"wp:attachment":[{"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/media?parent=2404"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/categories?post=2404"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/365stack.in\/index.php\/wp-json\/wp\/v2\/tags?post=2404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}