How to Create SharePoint List Views using Power Automate [4 Different View Examples]

In this Power Automate tutorial, we will see how to create SharePoint list views using Power Automate.

In SharePoint, a list view is a way to display and organize information in a list or library. It lets you choose which columns to display, create sorting and filtering options, and customize data formatting and grouping.

Here we will cover three SharePoint list view examples:

  • Using Choice column
  • Using Person column
  • Using the Date time column
  • Using multiple conditions

To apply these 4 views we will create the SharePoint list ‘Project task’ List, which contains the below columns:

  • Title: Single line of text
  • Description: Multiple lines of text
  • Due date: Select the date time from the dynamic content
  • Assigned to: Person
  • Start date- Date and time
  • Completion date -date and time
  • Status-choice
create SharePoint list view using MS flow
create SharePoint list view using MS flow

Power automate create a list view (Using the Choice column)

Here we will create a view in the SharePoint list, Status = In progress using Power Automate Rest API call.

Basically, we will use the above SharePoint list and we will create a view that will only show those tasks whose status is in progress. For this we will create an instant cloud flow, then we will do a rest API call to SharePoint to create the view.

Before start creating the flow, just set up the SharePoint list with the above columns.

Step 1: Log in to Power Automate -> click on the +Create icon -> select Instant Cloud flow.

Power automate create list view

Then provide the flow name, and select the Manual trigger a flow action. then click on Create.

MS Power automate create list view

Now you can see Manually trigger a flow is created in the flow page.

MS Power automate create SharePoint list view

Step 2: Next click on the +New step -> select Send an HTTP request to SharePoint’ action. Then provide the below information:

  • Site address: Select or Provide the SharePoint site address.
  • Method: Provide the method as Post, as we are creating the view in the SharePoint list.
  • Uri: Provide the URI as below, required to do the rest API call
/_api/web/lists/getbytitle('<List name>')/Views
  • Headers: Provide the headers like below, as it is required to do the rest API call.
{
  "Content-Type": "application/json;odata=verbose",
  "Accept": "application/json;odata=verbose"
}
  • Body: Provide the below json code, which contains information related to View.
{
  "__metadata": { "type": "SP.View" },
  "Title": "New View",
  "ViewQuery": "<Where><Eq><FieldRef Name='Status'/><Value Type='Text'>In progress</Value></Eq></Where>",
  "RowLimit": 100
}
Power automate create SharePoint list view

Step 3: To test the flow, click on the Test icon -> select Manually -> click on the Test button -> Configure the connections, click on Run flow -> click on Done.

You can see flow ran successfully. Also, select the view in the SharePoint list, you can see tasks whose status is in progress.

How to create SharePoint list view using MS flow

Power automate create a list view (Using the Person column)

Here we will see how to create a SharePoint list view using Power Automate. The view will create an Assigned to column(Person), to check which task is assigned to whom.

Moreover, we will create a flow, where we will pass the email of the person, and we will get the display name. By using the name we will create a view dynamically in the SharePoint list using Power Automate.

For this also we will use the same SharePoint list. Also, create the same instant cloud flow as the above flow, which will Manually trigger.

Step 1: Expand the Manual trigger a flow action -> click on Add an input -> select Text. Provide the Input field name as the Principal name.

create SharePoint list view using Microsoft  flow

Step 2: Click on the +New step and select the Get user profile(v2) action. Then provide the below information:

  • UPN: Select the above Principal name from dynamic content.
create SharePoint list view using flow

Step 3: Next, we will create a view, so, click on the +New step, and select the ‘Send an HTTP request to SharePoint‘ action. Then provide the below information:

  • Site address: Select or Provide the SharePoint site address.
  • Method: Provide the method as Post, as we are creating the view in the SharePoint list.
  • Uri: Provide the URI as below, required to do the rest API call
/_api/web/lists/getbytitle('<List name>')/Views
  • Headers: Provide the headers like below, as it is required to do the rest API call.
{
  "Content-Type": "application/json;odata=verbose",
  "Accept": "application/json;odata=verbose"
}
  • Body: Provide the below json code, which contains information related to View.
{
   "__metadata": {
      "type": "SP.View"
   },
   "Title": "Assigned To @{outputs('Get_user_profile_(V2)')?['body/displayName']}",
   "PersonalView": false,
   "ViewQuery": "<Where><Eq><FieldRef Name='Assignedto' LookupId='TRUE' /><Value Type='User'>@{outputs('Get_user_profile_(V2)')?['body/displayName']}</Value></Eq></Where>"
   
}

Using power Automate create SharePoint list view

Step 4: To test the flow, and run the flow manually. Then provide the email, which will filter the Assigned to column, and you can see the task related to that person.

Using Microsoft Power Automate create SharePoint list view

Power Automate create a list view (Date and time column)

Here we will see create a SharePoint list view based on DateTime column using Power Automate.

We will create an Instant cloud flow, that will create a Sharepoint list view, using the Due date column from the above Project Task list. So based on the current date it will filter the column, to check the Project’s due date is today.

Like above create an Instant clod flow, that will manually trigger. Then click on the +New step -> select the Send an HTTP request to SharePoint action, to create the list view based on Due date column. Then provide the below information

  • Site address: Select or Provide the SharePoint site address.
  • Method: Provide the method as Post, as we are creating the view in the Sharepoint list.
  • Uri: Provide the URI as below, required to do the rest API call.
/_api/web/lists/getbytitle('Project%20Task')/Views
  • Headers: Provide the headers like below, as it is required to do the rest API call.
{
  "Content-Type": "application/json;odata=verbose",
  "Accept": "application/json;odata=verbose"
}
  • Body: Provide the below json code, which contains information related to View.
{
   "__metadata": {
      "type": "SP.View"
   },
   "Title": "Due Date Filter",
   "PersonalView": false,
   "ViewType": "HTML",
   "ViewQuery": "<Where><Eq><FieldRef Name='Duedate' /><Value Type='DateTime' IncludeTimeValue='FALSE'>@{formatDateTime(utcNow(),'yyyy-MM-dd')}</Value></Eq></Where>"
}
How to create SharePoint list view using Power automate

Now run the flow manually, you can see the flow run successfully. Also, go to the Share Point list, and add a view ‘Due Date Filer’, you can see the task whose due date is today.

How to create SharePoint list view using Microsoft flow
How to create SharePoint list view using Microsoft flow

Power Automate creates a list view (Using multiple conditions)

Here we will see how to create a SharePoint list view based on multiple conditions using Power Automate.

We will cover two methods to create a list view based on Multiple conditions using Power Automate.

  • AND: Here we will create a view that will show whose task status is In Progress and whose Due date is Today.
  • OR: Here we will create a view that will show whose task status is In Progress or Due date is Today.

For AND

Now create an Instant cloud flow, that will trigger manually. After that click on the +New step -> select Send an HTTP request to SharePoint action. Then provide the below information:

  • Site address: Select or Provide the SharePoint site address.
  • Method: Provide the method as Post, as we are creating the view in the SharePoint list.
  • Uri: Provide the URI as below, required to do the rest API call.
/_api/web/lists/getbytitle('Project%20Task')/Views
  • Headers: Provide the headers like below, as it is required to do the rest API call.
{
  "Content-Type": "application/json;odata=verbose"
}
  • Body: Provide the below json code, which contains information related to View.
{
   "__metadata": {
      "type": "SP.View"
   },
   "Title": "In Progress & Due date today",
   "PersonalView": false,
   "ViewType": "HTML",
   "ViewQuery": "<Where><And><Eq><FieldRef Name='Status' /><Value Type='Text'>In progress</Value></Eq><Eq><FieldRef Name='Duedate' /><Value Type='DateTime' IncludeTimeValue='FALSE'>@{formatDateTime(utcNow(),'yyyy-MM-dd')}</Value></Eq></And></Where>"
}
How to create SharePoint list view using Microsoft Power automate

Now run the flow, and apply the view in the SharePoint list, you can see the below result.

create SharePoint list view using Microsoft Power automate

For Or

To get the view that will show whose task status is In Progress or Due date is Today using Power Automate. For this provide the below information in Send an HTTP request to SharePoint action.

  • Site address: Select or Provide the SharePoint site address.
  • Method: Provide the method as Post, as we are creating the view in the SharePoint list.
  • Uri: Provide the URI as below, required to do the rest API call.
/_api/web/lists/getbytitle('Project%20Task')/Views
  • Headers: Provide the headers like below, as it is required to do the rest API call.
{
  "Content-Type": "application/json;odata=verbose"
}
  • Body: Provide the below json code, which contains information related to View.
{
   "__metadata": {
      "type": "SP.View"
   },
   "Title": "In Progress or Due date today",
   "PersonalView": false,
   "ViewType": "HTML",
   "ViewQuery": "<Where><Or><Eq><FieldRef Name='Status' /><Value Type='Text'>In progress</Value></Eq><Eq><FieldRef Name='Duedate' /><Value Type='DateTime' IncludeTimeValue='FALSE'>@{formatDateTime(utcNow(),'yyyy-MM-dd')}</Value></Eq></Or></Where>"
}
How to create SharePoint list view usingPower automate

Now run the flow, and apply the view in the SharePoint list, you can see the below result.

How to create SharePoint list view using MS Power automate

Conclusion

In this Power Automate tutorial, we saw how to create a list view in SharePoint list using Power Automate. Also, we covered different methods to create a view in the SharePoint list using Power Automate. These are:

  • Using Choice column
  • Using Person column
  • Using the Date time column
  • Using multiple conditions(And/OR)

You may also like:

>