web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / getting site pages whe...
Power Automate
Answered

getting site pages when in a folder in the root directory

(0) ShareShare
ReportReport
Posted on by 678

sasrsc_0-1604753988317.png

I am trying to loop through all the files in the site pages folder... and get files requires a library name but there isn't one... this is merely a folder in the root directory.

sasrsc_1-1604754079040.png

https://xxxxxxoffice365.sharepoint.com/sites/CorporateTravelUSPrivate/SitePages/Forms/AllPages.aspx
I have a hundred files in this folder and I want to review the contents looking for certain things....
I'm sorry if this is a simple question but the answer eludes me right now as the action requires a library and blank isn't valid.

Categories:
I have the same question (0)
  • Verified answer
    sasrsc Profile Picture
    678 on at

    OK, we got this working and it wasn't intuitive to me at least. I'm a true citizen developer and not a pro.

    I had to use the "enter custom value" for the Site Pages

    sasrsc_0-1605012599189.png

    Pretty easy...but then the fun began as we wanted to see if people were updating their site pages for content in a certain area. So we then did a "get file content using path action" and looped through all the site pages. We stored the file content in a new variable (that was a critical step we thought)


    On the original Get Files we also did a odata filter to tighten the array.

    sasrsc_1-1605012731103.png

    Then we used the expression indexOf to locate the "section header" in our document.
    We then did an indexOf for the following section and calculated the difference using the sub expression between the index of both sections and we determined that if the difference exceeded 2800 then there is content in between else the person hasn't updated the section. 
    Before, someone was looking at all 70 pages manually to see if the section had been updated. 
    Now, they are emailed the pages that haven't been updated.
    Pretty neat eh....



Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 304

#2
David_MA Profile Picture

David_MA 245 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 243 Most Valuable Professional

Last 30 days Overall leaderboard