{"id":2482,"date":"2026-02-09T16:10:00","date_gmt":"2026-02-09T15:10:00","guid":{"rendered":"https:\/\/blog.kodono.info\/wordpress\/?p=2482"},"modified":"2026-02-09T16:10:00","modified_gmt":"2026-02-09T15:10:00","slug":"power-automate-flow-copy-folder-when-one-of-its-files-is-updated","status":"publish","type":"post","link":"https:\/\/blog.kodono.info\/wordpress\/2026\/02\/09\/power-automate-flow-copy-folder-when-one-of-its-files-is-updated\/","title":{"rendered":"Power Automate Flow: copy folder when one of its files is updated"},"content":{"rendered":"<p>I had the scenario where when files are updated in a specific folder of a SharePoint Documents Library, then the folder should be copied to another document library.<\/p>\n<p>Because we don&#8217;t want the copy process to trigger for ever changes (like if we bulk upload files, or if someone is doing changes in live in a file), so here is my solution:<\/p>\n<ol>\n<li>Create a SharePoint List called &#8220;File Processing&#8221; with two fields:\n<ul>\n<li>A lookup field called &#8220;File&#8221; that is based on our source Document Library \u2013 make sure to select the option <b>&#8220;Enforce unique values&#8221;<\/b>;<\/li>\n<li>A Date and Time field called &#8220;LastModified&#8221;.<\/li>\n<\/ul>\n<\/li>\n<li>Create a Power Automate Flow that is manually triggered \u2013 we&#8217;ll call it with &#8220;Run a Child&#8221;: this one is only used to do the copy of the folder from source to destination<\/li>\n<li>Create a Power Automate Flow that triggers when a file is created or modified (properties only):\n<ol>\n<li>When we confirm the file updates happened in the correct folder, then we add an entry in the &#8220;File Processing&#8221; list with the file ID and the file Modified date;<\/li>\n<li>Terminate the flow.<\/li>\n<\/ol>\n<\/li>\n<li>Create a Power Automate Flow that triggers when an item is created or modified in the &#8220;File Process&#8221; list:\n<ol>\n<li>Add a <b>&#8220;Delay&#8221;<\/b> of 5 minutes;<\/li>\n<li>Add the action <b>&#8220;Get file properties&#8221;<\/b> from our source document library using the file ID from the item;<\/li>\n<li>Check with a condition if the field &#8220;LastModified&#8221; is greater or equal to the Modified date of the file:\n<ul>\n<li>If <strong>yes<\/strong>, then use the action <b>&#8220;Get items&#8221;<\/b> on the &#8220;File Processing&#8221; list to see if we have any other items in the list: if no other items, run the child process to make the copy \u2013 and, finally, delete the current item in &#8220;File Processing&#8221; whatever there is other items or not;<\/li>\n<li>If <strong>no<\/strong>, then update the field &#8220;LastModified&#8221; of the current item using the Modified date of the file.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p>This solution permits to only trigger the copy process when there is no more files update in the folder.<\/p>\n<p><b>Note:<\/b> if we nee to monitor different folders in the source library, we can add a lookup column in &#8220;File Process&#8221; that contains the folder ID, and when checking if there is no other items for the folder, we just add a condition based on the folder ID.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had the scenario where when files are updated in a specific folder of a SharePoint Documents Library, then the folder should be copied to another document library. Because we don&#8217;t want the copy process to trigger for ever changes (like if we bulk upload files, or if someone is doing changes in live in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","hide_page_title":"","footnotes":""},"categories":[15,170,20],"tags":[153,123,155],"class_list":["post-2482","post","type-post","status-publish","format-standard","hentry","category-astuce","category-english","category-niveau-expert","tag-astuce","tag-english","tag-niveau-expert"],"_links":{"self":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts\/2482","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/comments?post=2482"}],"version-history":[{"count":10,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts\/2482\/revisions"}],"predecessor-version":[{"id":2500,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts\/2482\/revisions\/2500"}],"wp:attachment":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/media?parent=2482"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/categories?post=2482"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/tags?post=2482"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}