Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Template
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

Order files returned by the ‘Get files’ action in Power Automate

Posted on November 4, 2020April 14, 2021 by Tom

“I want to order the output of the Power Automate ‘Get files’ action to build an HTML table. Order by the Sub Folder Name that houses the file, ascending order.”


If you want to order files in Power Automate, the only option you have is to sort them directly in the ‘Get files’ action. Currently it’s not possible to sort them later (but you can vote for the sorting functionality).

In the ‘Get files (properties only)’ there’s a field ‘Order By’. The only question remains: what value it expects? It’s a similar situations as when filtering by file ‘Name’. In this case, when we want to order by a folder, you have to use the internal name for URL path.

FileRef asc
or
FileRef desc
Power Automate Get files order

Using the filter above, the output of the ‘Get files’ action will return all files sorted by:

  1. Folder level
  2. Alphabetically

You can see an example of the result below. Left column is sorted by FileRef ascending, right column is not sorted = default sorting by file ID.


πŸš€ Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

πŸš€ Master Power Automate

Join 2,000+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Working on an Approval process?

Use the Approval Process Template and the Task Delegation App to skip the hard part and deploy a fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview ✨ Learn more ✨

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundleβ€”everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview ✨ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes