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 / FIltering out only xls...
Power Automate
Answered

FIltering out only xls and .xlsm files from dynamic site url

(0) ShareShare
ReportReport
Posted on by 45

For a certain business case, we created a flow that needs to get latest file from folders in 20 different SharePoint sites. We achieved this using dynamic url. However, still facing the below 2 challenges -

1. The Send HTTP request is not brining data of a few custom columns like approval status

2. The latest file is currently of any file type. We want to filter it out only to be .xls or .xlsm. Tried Filter array but it did not work. 

 

Any guidance would be of great help!

 

 

Nivedhana_2-1707116106333.png

 

Categories:
  • SanmeshG Profile Picture
    1,956 Moderator on at

    Hi @Nivedhana  ,

     

    Can you share what is the output of Compose 1 or Compose , does it return an array ?
    Also , could you please share the expression you tried in the 'Filter Array' action?

  • Nivedhana Profile Picture
    45 on at

    The output of select is an array.

     

    Compose gets the latest file from select output. Compose 1 is just to get the file url. The filter is on the select output. Pictures attached. 

     
     

    Nivedhana_2-1707124506942.pngNivedhana_3-1707124534579.png

    Nivedhana_4-1707124866449.png

     

     

  • Verified answer
    SanmeshG Profile Picture
    1,956 Moderator on at

    change the name on the left to the expression item()?['name'] and you should be good.

     

    Also you can try the below expression by switching to the advanced mode in filter array.

    @Anonymous(Contains(item()?['name'],'.xlsx'),Contains(item()?['name'],'.xls'))

    If this helps , please give this a thumbs up and mark this as a solution to close this thread.

     

    Thanks,

  • Nivedhana Profile Picture
    45 on at

    @SanmeshG That worked!! Thanks! 

     

    Could you also help with the first query? With send an http request, it is not brining data from custom columns. 

  • Verified answer
    SanmeshG Profile Picture
    1,956 Moderator on at

    Hi @Nivedhana  ,

     

    Please update the Uri property in the Send HTTP Request to SharePoint action to the following,

    Here Status is my column Name

    _api/web/getFolderByServerRelativeUrl('Shared Documents')/Files?$select=Name,ListItemAllFields/Status&$expand=ListItemAllFields
    

     Do give this  a thumbs up if this works!

     

    Thanks,

  • Nivedhana Profile Picture
    45 on at

    Thanks again! That worked too! 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 289

#2
11manish Profile Picture

11manish 282 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 119

Last 30 days Overall leaderboard