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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / File not being found w...
Power Automate
Unanswered

File not being found with 'Get files (properties only) + Filter Query on FileLeafRef

(0) ShareShare
ReportReport
Posted on by 41

I have a manually triggered (button) Power Automate flow set up in a SharePoint Document library.

 

When the flow is triggered, the user is prompted to attach a file in the run flow window (this new file will replace/override the selected file).

 

The first step of the flow is to do a check to make sure the new uploaded file does not already exist in the library.

I am using ‘Get files (properties only)’ with a Filter Query:

lorinda_abey_0-1710899873436.png

 

I am then using a ‘Condition’ step to confirm if a file was found of this name or not.

lorinda_abey_1-1710899873438.png

 

Expression being used as follows:

length(outputs('Get_files_(properties_only)_2')?['body/value'])

 

If a file of the same name and extension exists, an email notification is sent to the user who triggered the flow and the flow is terminated (cancelled).

 

This has been working fine (I have an example flow from 2 days ago that worked).

 

Today I have a scenario where a file of the same name and extension existed but it was not picked up by this condition / check and caused an issue further down in the approval flow.

 

I am trying to diagnose why the ‘Get files (properties only)’ did not return a value for the file that existed.

Below is a screenshot of the outputs and another showing that the file exists and can easily be found with a search.

lorinda_abey_2-1710899873443.png

 

lorinda_abey_3-1710899873445.png

 

Any ideas why the file was not picked up in this instance?

Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    on at
    Re: File not being found with 'Get files (properties only) + Filter Query on FileLeafRef

    Hi @lorinda_abey ,

     

    This may be caused by the number of document library files.

    Could you tell me how many files are in the document library?

    If the count is less than 5000, please try this

    vxiaochenmsft_0-1710900956203.png

     

    Best Regards,

    Wearsky

  • lorinda_abey Profile Picture
    41 on at
    Re: File not being found with 'Get files (properties only) + Filter Query on FileLeafRef

    We have over 9000 files in this document library.

  • Verified answer
    v-xiaochen-msft Profile Picture
    on at
    Re: File not being found with 'Get files (properties only) + Filter Query on FileLeafRef

    Hi @lorinda_abey ,

     

    Please turn on the pagination setting and try again.

    vxiaochenmsft_0-1710912873422.png

     

     

    Best Regards,

    Wearsky

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard