Screenshot showing Flows in SharePoint
BLOG

Using Flows in SharePoint for Seamless Page Management

Discover the solution to a missing key feature in SharePoint Pages Library.
July 17, 2023
analog clock icon
Reading time:
8
min
OUR EXPERTISE
|
Business Process & Collaboration
Photo of Ali Gillberg
Ali Gillberg
Senior Web Developer, Consultant

For all the people out there using SharePoint to run your site, you may have noticed a key feature that is missing and may be causing you or members of your organization a lot of inconvenience – in the Pages Library section, there is no “Move To” button!

PnP Search component options

And no, “Copy To” is not an alternative option, because that button can lead to unwanted content duplication.

The question is, what is the solution here? How can you create a good experience for people when it is so difficult to perform this simple action? The answer lies in building Flows, which are automatic workflows, in order to create a seamless user experience for the people who will be using your SharePoint site.

The plan

The process will involve creating three flows and an additional SharePoint list called "PageFolders" with three fields: Title, FolderPath, and FolderID. The flows mentioned are: "Folder Management: Create/Modify," "Folder Management: Deletion," and "Site Pages: Move to Chosen Folder."

The following blog post will provide step-by-step instructions for setting up the flows and the PageFolders list. It covers the following:

  • Obtaining Site Pages library GUID
  • Checking folder creation or modification conditions
  • Managing PageFolders list based on folder IDs
  • Removing items from the list when folders are deleted
  • Enabling folder selection in PageFolders list for editing page details

1. Obtaining Site Pages library GUID

First, start with the folder management Flows to populate and manage your PageFolders list items according to folders created in the Site Pages library.

PnP filter web part

You’ll need to get your Site Pages library GUID from the library itself and add it in manually for this to work, and to do so, visit your Site Pages library and get to the library settings page which has the GUID in the URL:

PnP search results configuration screen

2. Checking folder creation or modification conditions

Next, we’ll add a condition to check if the item created/modified is a folder. You could also add this to your trigger properties as a filter.

PnP "selected properties" dropdown

If it is a folder being created or edited, we’ll move on with the Flow. First, we will check if a folder with the same ID is already represented in the “PageFolders” list.

Layout slots customization section

3. Managing PageFolders list based on folder IDs

We will then check if anything was returned. If there has been anything returned, there will be a folder represented with the same ID. If not, we’ll create the new item in the PageFolders list.

Layout slot naming customization full section

If no matching folder item, create one:

External template URL selection

If yes, update the item:

External template URL selection

That’s it for this workflow, the last one we need for Folder management is to clean items out of the list when folders are deleted.

4. Removing items from the list when folders are deleted

You’ll need to follow the same process to add the Site Pages library GUID to the trigger for this one as above.

HTML showing pulling text field.

Then, we’ll check if it’s a folder again (this could be something you set up in your trigger filters if you have high traffic and want to keep things ultra efficient).

HTML showing the dates being pulled through.

Then get any items with the matching IDs from the PageFolders list.

HTML showing conditional content visibility.

And delete them if they exist:

HTML showing conditional content visibility.

Now that we have the PageFolders list being populated and updated according to what folders are in the Site Pages library, we can build the Flow that will actually move pages around according to what users choose in the Page settings.

5. Enabling folder selection in PageFolders list for editing page details

First, we have to make sure that the PageFolders list shows a field for users to pick their folder from the page itself. To do this, we’ll go to the Site Pages library settings and add a new lookup column that pulls the Title from the PageFolders list.

HTML showing pulling text field.

Be sure to add this to all content types (set by default) and click ok.

SharePoint list customization view of columns

Now, when a user edits Page details, they will see PageFolder as a field they can update with a dropdown of the PageFolders to choose from.

HTML showing conditional content visibility.

Next, we’ll set up the Flow that will move the pages according to the PageFolder field choice once pages have been published!

The trigger will be when a file is created or modified in the Site Pages library again as before we’ll need that GUID to make this connection.

Powerapp Pagfeolder settings

Then, we’ll create two variables that grab the current version and full path of the page.

Creating a variable in PowerApps

Before we move on with the Flow, we need to check if the page has been published yet, and if not, the flow will end.

Creating a conditional statement in Powerapps

If the page has been published though, we’ll keep moving along with the flow by getting the information about where the page should be moved.

Updating a conditional statement in Powerapps

Then check if the page is in the right folder or not yet.

concat(outputs('Get_item_-_Page_Folder_item')?['body/FolderPath'],'/')
Powerapps conditional statement

If it needs to move, move the file:

Powerapps updated conditional statement

And that’s it! Now your users can just pick the folder from the dropdown and their pages can be organized into folders to allow for folder-based security and just general organization. Thanks everyone for tuning in.

Latest Blogs

Resend logo displayed in white text on a black background.
OUR EXPERTISE
|
CMS & Custom Development

Migrating From SendGrid to Resend: A Developer's Guide

A practical overview of how to switch from SendGrid to Resend, including domain verification, API configuration, and code refactoring.
December 2, 2025
analog clock icon
Reading time:
8
min
Photo of Aaron Kronberger
Aaron Kronberger
Senior Web Developer, Consultant
Image of code on a computer screen in a dark room.
OUR EXPERTISE
|
CMS & Custom Development

Using AJAX and MVC for Filtering and Paging a Directory

Learn how to build a dynamic resource directory with AJAX and MVC, featuring filtering and paging for a seamless user experience.
June 5, 2025
analog clock icon
Reading time:
8
min
Photo of Chad Heinle
Chad Heinle
VP of Consulting, Solutions Architect
Colorful graphic of several people on digital devices gathered around a globe
NEWS & EVENTS
|
Inclusive Design

Why Accessibility Isn’t Optional: Celebrating GAAD at High Monkey

Recognizing Global Accessibility Awareness Day with resources, insights, and episodes from our podcast that promote inclusive digital experiences.
May 15, 2025
analog clock icon
Reading time:
3
min
High Monkey Icon
High Monkey
The original source

Your success story starts here

Contact us for a free consultation, and let’s work together to build a strategic plan that tackles your challenges and lifts your organization to a new level.