Using Microsoft Flow's Powerful SharePoint HTTP Action to Create Modern Libraries

Introduction

We have a client who has requirements for an automation that includes the creation of Modern Document Libraries in SharePoint.

The first place we looked for automation was Microsoft Flow. In this quick post we’ll cover a few of the details about how we made this happen.

A Quick Word on the Significance of Modern SharePoint Libraries

Many IT departments are working through the transition in SharePoint from “Classic“ to “Modern” experiences. In some cases, tenant level settings may default that all newly created libraries show the Classic experience. The call we are making below creates a new library and sets the experience to Modern.

The Versatile and Extremely Useful “Send an HTTP request to SharePoint” Action

In situations where you are building automations with SharePoint using Microsoft Flow, the HTTP Action can be very helpful in meeting deeper requirements that may not be met by the standard set of SharePoint Actions.

  • What makes this action so powerful is that you can leverage the vast REST API for SharePoint from MS Flow

  • If you hit a wall with the stock SharePoint Actions in MS Flow, look into the how the SharePoint REST API and the HTTP Action for SharePoint can help meet your requirements

  • Best of all is that this powerful Action comes with your basic licensing and doesn’t require a P1 license to use.

Getting Started is easy, use the Action Selector and type in SharePoint HTTP and you’ll find the Send an HTTP request to SharePoint action.

 
Use the Action selector in MS Flow to find and use the  Send an HTTP request to SharePoint  action.

Use the Action selector in MS Flow to find and use the Send an HTTP request to SharePoint action.

 

Posting a Request to SharePoint

In this case, our requirement is to create a new library in SharePoint that uses the Modern library in SharePoint. The SharePoint HTTP Action makes this easy.

When the call below is made to the REST API in SharePoint, a new library will be created with the Modern Experience activated.

A nice way to advance your SharePoint integration from Microsoft Flow.

A nice way to advance your SharePoint integration from Microsoft Flow.

Here is the JSON we used in the above POST request:

{

"__metadata": {

"type": "SP.List"

},

"BaseTemplate": 101,

"Description": "",

"Title": "Sean Modern Test",

"ListExperienceOptions":1

}

Conclusion

Don’t be afraid to try out this highly useful Action in your next Flow! We have found the SharePoint HTTP action to be extremely useful for meeting requirements in our SharePoint integrations.

If you find yourself working with SharePoint a lot, becoming familiar with Microsoft Flow will be useful for you going forward. Microsoft has stated that further investments in SharePoint Designer will not be made. With that said, you may want to look at tools like MS Flow as an alternative to SharePoint Designer Workflows.