{"id":125,"date":"2024-09-06T13:27:18","date_gmt":"2024-09-06T20:27:18","guid":{"rendered":"https:\/\/gilosoftblogcom.wordpress.com\/?p=125"},"modified":"2024-09-06T13:27:18","modified_gmt":"2024-09-06T20:27:18","slug":"adding-a-document-library-to-site-via-power-automate","status":"publish","type":"post","link":"https:\/\/blog.gilosoft.com\/index.php\/2024\/09\/06\/adding-a-document-library-to-site-via-power-automate\/","title":{"rendered":"Adding A Document Library to Site via Power Automate"},"content":{"rendered":"\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<p>In SharePoint Online, you can automate various tasks, including the creation of document libraries, using Power Automate and the SharePoint REST API. This guide will show you how to add a document library to a SharePoint site using Power Automate.<\/p>\n\n\n\n<p>We&#8217;ll use the &#8220;Send an HTTP Request to SharePoint&#8221; action and the SharePoint REST API to create a document library. Follow these steps to add a document library to your SharePoint Online site using Power Automate:<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Step 1: Create a Power Automate Flow<\/h5>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Navigate to Power Automate<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Go to your Power Automate portal and click on\u00a0<strong>Create<\/strong>\u00a0to start a new flow.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Choose a Trigger<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Select a trigger for your flow, such as &#8220;When an item is created&#8221; or &#8220;Manually trigger a flow.&#8221;<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h5 class=\"wp-block-heading\">Step 2: Send an HTTP Request to SharePoint<\/h5>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Add HTTP Request Action<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Click on\u00a0<strong>New Step<\/strong>\u00a0and select &#8220;Send an HTTP Request to SharePoint.&#8221;<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Configure the HTTP Request<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Set up the HTTP request with the following details:<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nSite Address: Choose SharePoint Site you want to add the document library to.\nMethod: POST\nURI: _api\/web\/lists\nHeaders:\n{\n      &quot;Accept&quot;: &quot;application\/json;odata=verbose&quot;,\n      &quot;Content-Type&quot;: &quot;application\/json;odata=verbose&quot;\n}\nBody:\n{\n     &quot;__metadata&quot;: {\n     &quot;type&quot;: &quot;SP.List&quot;\n  },\n    &quot;BaseTemplate&quot;: 101,\n    &quot;Title&quot;: &quot;Your Library Name&quot;\n}\n<\/pre><\/div>\n\n\n<h5 class=\"wp-block-heading\">Step 3: Save and Test the Flow<\/h5>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Save the Flow<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Click\u00a0<strong>Save<\/strong>\u00a0at the top right corner of the screen to save your flow.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Test the Flow<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Run your flow using the\u00a0<strong>Test &gt; Manually<\/strong>\u00a0options at the top right.<\/li>\n\n\n\n<li>Once the flow runs successfully, a new document library will be created in the specified SharePoint site.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p>This is how the flow should look in Power Automate:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/gilosoft.com\/wp-content\/uploads\/2024\/07\/Screenshot-2024-07-06-at-10.56.35%E2%80%AFAM-1019x1024.png\" alt=\"\" class=\"wp-image-2161\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Summary<\/h4>\n\n\n\n<p>By following these steps, you can automate the creation of document libraries in SharePoint Online using Power Automate. This method leverages the &#8220;Send an HTTP Request to SharePoint&#8221; action along with the SharePoint REST API to streamline the process, making it easier to manage your SharePoint environment.<\/p>\n\n\n\n<p>Automating tasks like this can save time and reduce the potential for errors, especially when dealing with repetitive actions. Power Automate provides a powerful and flexible way to enhance your SharePoint workflows and improve productivity.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In SharePoint Online, you can automate various tasks, including the creation of document libraries, using Power Automate and the SharePoint REST API. This guide will show you how to add a document library to a SharePoint site using Power Automate. We&#8217;ll use the &#8220;Send an HTTP Request to SharePoint&#8221; action and the SharePoint REST API [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":127,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-125","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-power-automate-text-functions"],"_links":{"self":[{"href":"https:\/\/blog.gilosoft.com\/index.php\/wp-json\/wp\/v2\/posts\/125","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.gilosoft.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.gilosoft.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.gilosoft.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.gilosoft.com\/index.php\/wp-json\/wp\/v2\/comments?post=125"}],"version-history":[{"count":0,"href":"https:\/\/blog.gilosoft.com\/index.php\/wp-json\/wp\/v2\/posts\/125\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.gilosoft.com\/index.php\/wp-json\/wp\/v2\/media\/127"}],"wp:attachment":[{"href":"https:\/\/blog.gilosoft.com\/index.php\/wp-json\/wp\/v2\/media?parent=125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.gilosoft.com\/index.php\/wp-json\/wp\/v2\/categories?post=125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.gilosoft.com\/index.php\/wp-json\/wp\/v2\/tags?post=125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}