Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Applying filter to For each flow

(0) ShareShare
ReportReport
Posted on by 2,245

Here is my flow

 

1)when a file is created(properties only)

2)Get files (properties only)

3) For each

    i)get file content // identifier from get files(properties only)

    ii)Compose //name from get files(properties only)

iii)create file //In destination document library

 

 

I am able to copy documents from source document library to target document library but im unaware how to filter specific files from source document library as per above flow steps

 

Source document library

Title

Location.txt

Locations001.txt

supply.txt

 

Expected Output :

Target document library

Title

Location.txt

Locations001.txt

 

 

  • Veblitz Profile Picture
    2,245 on at
    Re: Applying filter to For each flow

    Hi,

     

    I am not getting same error also i used same dynamic content as you share,still not working

  • v-mengmli-msft Profile Picture
    on at
    Re: Applying filter to For each flow

    Hi @Veblitz ,

     

    'outputs('Get_files_(properties_only)')' returns an object. This is why filter array shows 'From property value in the query action inputs is of type object .The value must be an array'.

     

    You should keep the previous dynamic content.

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

     

    Did the below error appear when you use same dynamic content as my? If so, could you please show some screenshots about it and details of actions?

    vmengmlimsft_0-1709014380378.png

     

    Best regards,

    Rimmon

  • Veblitz Profile Picture
    2,245 on at
    Re: Applying filter to For each flow

    I tried using your screenshot for dynamic content in filter array

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

     

    Also ,now im using below one in my flow for filter array

    outputs('Get_files_(properties_only)')

  • v-mengmli-msft Profile Picture
    on at
    Re: Applying filter to For each flow

    Hi @Veblitz ,

     

    Are you using same dynamic content as my screenshot?

    If no, what is the value in the From field of Filter array?

     

    Best regards,

    Rimmon

  • Veblitz Profile Picture
    2,245 on at
    Re: Applying filter to For each flow

    im getting error in filter array steps.

  • Veblitz Profile Picture
    2,245 on at
    Re: Applying filter to For each flow

    Further im getting below error after updating your recent inputs.

    Error details:

    From property value in the query action inputs is of type object .The value must be an array.

  • v-mengmli-msft Profile Picture
    on at
    Re: Applying filter to For each flow

    Hi @Veblitz ,

     

    Do you want to create files according to filtered out files?

    If so, you should use body of Filter array in apply to each and use expression to get file identifier.

    vmengmlimsft_0-1708962775849.png

     

    In addition, could you please show some screenshots about your failed steps?

     

     

    Best regards,

    Rimmon

     

  • Veblitz Profile Picture
    2,245 on at
    Re: Applying filter to For each flow

    Flow is getting failed.No dependents actions succeded

  • Veblitz Profile Picture
    2,245 on at
    Re: Applying filter to For each flow

    Thanks for your help.

     

    should we need to add the filter array step inside for loop and remove compose step as per below steps:

     

    1)when a file is created(properties only)

    2)Get files (properties only)

    3) For each

        i)get file content // identifier from get files(properties only)

        ii)Compose //name from get files(properties only) ? do we need to remove this and add filter array as you shared ?

    iii)create file //In destination document library

  • v-mengmli-msft Profile Picture
    on at
    Re: Applying filter to For each flow

    Hi @Veblitz ,

     

    I recommend you use filter array to get expected files.

    Take your assumption as an example, I just want to get:

    Location.txt

    Locations001.txt

    vmengmlimsft_0-1708959224437.png

     

     

    Best regards,

    Rimmon

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow