
{"id":7669,"date":"2020-07-15T08:54:23","date_gmt":"2020-07-15T08:54:23","guid":{"rendered":"https:\/\/rax-stg-wp-aws.com\/blogs\/use-microsoft-flow-to-provision-sites-in-sharepoint-office-365\/"},"modified":"2026-11-03T19:28:57","modified_gmt":"2026-11-03T19:28:57","slug":"use-microsoft-flow-to-provision-sites-in-sharepoint-office-365","status":"publish","type":"blogs","link":"https:\/\/www.rackspace.com\/de\/blogs\/use-microsoft-flow-to-provision-sites-in-sharepoint-office-365\/","title":{"rendered":"Use Microsoft Flow to provision sites in Sharepoint Office 365"},"content":{"rendered":"<p><strong>Introduction<\/strong><\/p>\n<p>A cloud-based solution, Microsoft\u00ae (MS) Flow effectively automates and&nbsp;simplifies business processes by creating automated workflows with MS Flow.<\/p>\n<p>This post describes how to create a fully automated bulk solution to provision&nbsp;a sub-site in SharePoint\u00ae Office 365\u00ae (SPO) for any site creation&nbsp;requests that come through a custom list. You can achieve this goal by using a<br \/>\nscheduled MS Flow workflow and the REST API features.&nbsp;<br \/>\nWhen you create a workflow, keep the following considerations in mind:<\/p>\n<ul>\n<li>Create new requests in a custom list.<\/li>\n<li>The approval workflow might not run on the newly created item.<\/li>\n<li>A scheduled MS Flow (Power Automate) workflow picks up all the approved&nbsp;requests from the list and provisions a site. The scheduling time depends on your requirements.<\/li>\n<li>After you provision the site, you should update the value in a custom list&nbsp;so that the system won\u2019t pick up the request when the next workflow runs.<\/li>\n<\/ul>\n<p>\nSteps to build the solution:<\/p>\n<ul>\n<li>Create a custom list<\/li>\n<li>Create and schedule a workflow<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p><strong>&nbsp;Create a SharePoint list<\/strong><\/p>\n<p>Create a custom SharePoint list, <strong>Site Creation Request<\/strong>, with the first eight&nbsp;columns in <strong>Figure 1<\/strong><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26466-body-Picture1_13.png\" alt=\"m365 pic 1\" \/><\/p>\n<p><strong>Figure 1<\/strong>:<em> Set of columns<\/em><\/p>\n<p>Now add items to the <strong>Site Creation Request<\/strong>&nbsp;list.&nbsp;For example, add two items to the list, one without a unique permission and&nbsp;another with a unique permission, as shown in <strong>Figure 2<\/strong>.<\/p>\n<p>The <strong>IsUniquePermission<\/strong> column indicates if the requested site inherits&nbsp;permissions from its parent or is unique permission. The <strong>Site Template&nbsp;<\/strong>column contains the <strong>Site Template ID<\/strong>&nbsp;in the following format:<\/p>\n<p>&#8211; <strong>Teams<\/strong>: <em>`STS#3`<\/em><br \/>\n&#8211; <strong>Communication Site<\/strong>: `<em>SITEPAGEPUBLISHING#0`<\/em><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26466-body-Picture2_8.png\" alt=\"m65 pic 2\" \/><\/p>\n<p><strong>Figure 2<\/strong>: Add an item to the&nbsp;<em>site creation request<\/em>&nbsp;list&nbsp;<\/p>\n<p><strong>Create and schedule a workflow<\/strong><\/p>\n<p>Use the following steps to create and schedule an MS Flow workflow:<\/p>\n<p><strong>Step 1: Build a scheduled workflow<\/strong><\/p>\n<p>Build a scheduled flow, as shown in <strong>Figure 3<\/strong>, pass all the parameters, and&nbsp;click <strong>Create<\/strong>.<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26466-body-Picture3_4.png\" alt=\"m365 pic 3\" \/><\/p>\n<p>\n<strong>Figure 3<\/strong>: Create the scheduled workflow&nbsp;<\/p>\n<p><strong>Step 2: Add a variable action<\/strong><\/p>\n<p>In the next screen, after the recurrence step, add two <strong>Initialize Variable&nbsp;<\/strong>actions for the <strong>List Name<\/strong>&nbsp;and <strong>IsUniquePermission <\/strong>variables, as shown in <strong>Figure 4<\/strong><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26466-body-Picture4_2.png\" alt=\"m365 pic 4\" \/><\/p>\n<p><strong>Figure 4<\/strong>: Add the <em>initialize<\/em>&nbsp;variable action<\/p>\n<p><strong>Step 3: Add Get Items action<\/strong><\/p>\n<p>Add a <strong>Get Items<\/strong>&nbsp;action to fetch all the records from the <strong>Site Creation&nbsp;<\/strong>list based on the condition, Approved is equal to <strong>Yes <\/strong>and Site Created is equal&nbsp;to <strong>No<\/strong>, as shown in <strong>Figure &nbsp;5<\/strong>.<\/p>\n<p><strong>Note<\/strong>: The <strong>Filter Query<\/strong>&nbsp;parameter receives only <strong>OData Query<\/strong>.<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26466-body-Picture5_1.png\" alt=\"m65 pic 5\" \/><\/p>\n<p><strong>Figure 5<\/strong>: Add the <em>get items<\/em>&nbsp;auction<\/p>\n<p><strong>Step 4: Add an Apply to Each action<\/strong><\/p>\n<p>Add the <strong>Apply to each<\/strong>&nbsp;action and select the value from the previous&nbsp;<strong>Get Items<\/strong>&nbsp;action, as shown in <strong>Figure 6<\/strong>.<br \/>\n&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26466-body-Picture6_1.png\" alt=\"m365 pic 6\" \/><\/p>\n<p><strong>Figure 6<\/strong>: Add the <strong>Apply to each<\/strong>&nbsp;action&nbsp;<\/p>\n<p><strong>Step 5: Add a Compose action<\/strong><\/p>\n<p>Inside the <strong>Apply to each<\/strong>&nbsp;block, add a <strong>Compose<\/strong>&nbsp;action to get the&nbsp;<strong>Site Template ID<\/strong>&nbsp;of the current item in the loop. Split the selected&nbsp;<strong>Site Templated Id<\/strong>&nbsp;and get only the Site ID from the value, by using the the following command, as shown in <strong>Figure 7<\/strong>.<\/p>\n<p><em>&nbsp; &nbsp; split(item()[&#8216;SiteTemplate&#8217;]?[&#8216;Value&#8217;],&#8217;-&#8216;)<\/em><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26466-body-Picture7_1.png\" alt=\"m365pic 7\" \/><\/p>\n<p><strong>Figure 7<\/strong>: Add the <strong>Apply to each<\/strong>&nbsp;action&nbsp;<\/p>\n<p><strong>Step 6: Add a Send HTTP action to the provision site<\/strong><\/p>\n<p>Inside the <strong>Apply to each<\/strong>&nbsp;block, add a <strong>Send an HTTP request to SharePoint&nbsp;<\/strong>action to construct and execute a SharePoint REST API call to provision a site&nbsp;based on the parameters, as shown in <strong>Figure 8<\/strong>.<\/p>\n<p>The details of the map request follow:<\/p>\n<p>&#8211; <strong>Site Address<\/strong>: Maps to the <strong>RootSiteURL<\/strong>&nbsp;column.<br \/>\n&#8211; <strong>Method<\/strong>: `<em>POST`<\/em><br \/>\n&#8211; <strong>URI<\/strong>: <em>\/_api\/web\/webinfos\/add<\/em><br \/>\n&#8211; <strong>Accept header<\/strong>: <em>`application\/json;odata=verbose`<\/em><br \/>\n&#8211; <strong>Content Type header<\/strong>: <em>`application\/json;odata=verbose`<\/em><br \/>\n&#8211; <strong>Body:<\/strong><br \/>\n<em>&nbsp; &nbsp; &nbsp; &nbsp; { &#8216;parameters&#8217;:<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; { &#8216;__metadata&#8217;:<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; { &#8216;type&#8217;: &#8216;SP.WebInfoCreationInformation&#8217; },<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8216;Url&#8217;:&#8217;@{items(&#8216;Apply_to_each&#8217;)[&#8216;SubSite&#8217;]}&#8217;,<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8216;Title&#8217;:&#8217;@{items(&#8216;Apply_to_each&#8217;)[&#8216;SubSite&#8217;]}&#8217;,<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8216;Description&#8217;:&#8217;My Description&#8217;,<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8216;Language&#8217;:&#8217;1033&#8242;,<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8216;WebTemplate&#8217;:&#8217;@{trim(outputs(&#8216;Get_Site_Template_Id&#8217;)[1])}&#8217;,<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8216;UseUniquePermissions&#8217;:&#8217;@{items(&#8216;Apply_to_each&#8217;)[&#8216;isUniquePermission&#8217;]}&#8217;<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; }<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; }<\/em><\/p>\n<p>The body parameter details include the following elements:<\/p>\n<p>&#8211; <strong>Title<\/strong>: Maps to the column <strong>SubSite<\/strong>.<\/p>\n<p>&#8211; <strong>WebTemplate<\/strong>: Gets the output from the <strong>Site Template ID<\/strong>&nbsp;action by using&nbsp;&nbsp; the command: <em>`trim(outputs(&#8216;Get_Site_Template_Id&#8217;)[1])`<\/em><\/p>\n<p>&#8211; <strong>UseUniquePermissions<\/strong>: &nbsp;Maps to the column <strong>IsUniquePermission<\/strong>.<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26466-body-Picture8_1.png\" alt=\"m365 pic 8\" \/><\/p>\n<p><strong>Figure 8<\/strong>: Add the HTTP request to provision the site<\/p>\n<p><strong>Step 7: Add a Send HTTP action to update the column<\/strong><\/p>\n<p>Add a <strong>Send an HTTP request to SharePoint<\/strong>&nbsp;to update the <strong>Site Created&nbsp;<\/strong>column of the current item to <em>YES<\/em>, as shown in <strong>Figure 9<\/strong>.<\/p>\n<p>&#8211; <strong>Site Address<\/strong>: Maps to the <strong>RootSiteURL<\/strong>&nbsp;column.<br \/>\n&#8211; <strong>Method<\/strong>: <em>`POST`<\/em><br \/>\n&#8211; <strong>URI<\/strong>: <strong>_api\/web\/lists\/GetByTitle(&#8216;@{variables(&#8216;ListName&#8217;)}&#8217;)\/items(@{items(&#8216;Apply_to_each&#8217;)[&#8216;ID&#8217;]})<\/strong><br \/>\n&#8211; <strong>Syntax<\/strong>&nbsp;<strong>_api\/web\/lists\/GetByTitle(&#8216;ListName&#8217;)\/items(ID)<\/strong><br \/>\n&#8211; <strong>Accept header<\/strong>: <em>`application\/json;odata=verbose`<\/em><br \/>\n&#8211; <strong>Content Type header<\/strong>: <em>`application\/json;odata=verbose`<\/em><br \/>\n&#8211; <strong>Body:<\/strong><br \/>\n&nbsp;<em> &nbsp; &nbsp; &nbsp; { &#8216;__metadata&#8217;:<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; { &#8216;type&#8217;: &#8216;SP.Data.Site_x0020_Creation_x0020_RequestListItem&#8217;},<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; &#8216;SiteCreated&#8217;: true<br \/>\n&nbsp; &nbsp; &nbsp; &nbsp; }<\/em><\/p>\n<p><strong>Note<\/strong>: The highlighted value in <strong>Figure 9<\/strong>&nbsp;is the static name of the&nbsp;<strong>Site Creation&nbsp;<\/strong>list.<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26466-body-Picture9_1.png\" alt=\"m365 pic 9\" \/><\/p>\n<p><strong>Figure 9<\/strong>: Add the HTTP request to update an item&nbsp;<\/p>\n<p><strong>Step 8: Complete the Apply to each action<\/strong><\/p>\n<p>\nComplete the <strong>Apply to each<\/strong>&nbsp;action, as shown in <strong>Figure 10<\/strong>.<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26466-body-Picture10_1.png\" alt=\"m365 pic 10\" \/><\/p>\n<p><strong>Figure 10<\/strong>: <strong>Apply to each<\/strong> block&nbsp;<\/p>\n<p><strong>Step 9: Complete the scheduled workflow<\/strong><\/p>\n<p>Complete the scheduled workflow, as shown in <strong>Figure 11<\/strong>.<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2026\/blog_article_images\/26466-body-Picture11_1.png\" alt=\"m365 pic 11\" \/><\/p>\n<p><strong>Figure 11<\/strong>: Complete the workflow for site creation&nbsp;<\/p>\n<p><strong>Conclusion<\/strong><br \/>\nI hope this post helps you understand how MS Flow and the REST API work together&nbsp;with SharePoint sites and list-based operations. One of the most significant&nbsp;advantages of Flow is that it is incredibly easy to use, and even people with&nbsp;no technical background can create workflows without trouble.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Use Microsoft Flow to provision sites in Sharepoint Office 365<\/p>\n","protected":false},"author":2,"featured_media":7671,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","format":"standard","meta":{"content-type":"","nid":"26466","content_type":"blog","created_by":"10130","authored_on":"2024-01-08T09:54:22+00:00","field_article_industries":"","tag_category":"Technical","field_blog_author_text":"by Saurabh Agarwal, SharePoint Administrator, Rackspace Technology","seo_description":"Learn how to automate and simplify site creation in SharePoint Office 365 using MS Flow. Understand how to set up workflows for business process automation.\r\n","field_featured_image":"","insights_image":"\/wp-content\/uploads\/2026\/blog_technical_images\/26466-insights_image-microsoft-technical-blog-1-insights.jpg","field_partners":"","rxt_platforms":"Microsoft 365","product":"","publisheddate":"2020-07-15T08:54:23","rxt_solutions":"Email & Productivity","opengraph_tag":"","x_tag":"","teaser_flag":"Technical Blog","seo_titile":"SharePoint Office 365 Site Provisioning via MS Flow | Rackspace","field_topics":"","field_slug":"use-microsoft-flow-to-provision-sites-in-sharepoint-office-365","footnotes":""},"categories":[178],"tags":[204],"class_list":["post-7669","blogs","type-blogs","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-technical"],"_links":{"self":[{"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/blogs\/7669","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/blogs"}],"about":[{"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/types\/blogs"}],"author":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/comments?post=7669"}],"version-history":[{"count":3,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/blogs\/7669\/revisions"}],"predecessor-version":[{"id":9606,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/blogs\/7669\/revisions\/9606"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/media\/7671"}],"wp:attachment":[{"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/media?parent=7669"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/categories?post=7669"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rackspace.com\/de\/wp-json\/wp\/v2\/tags?post=7669"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}