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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Automate flow to creat...
Power Automate
Unanswered

Automate flow to create a file only recreates the same file with same name

(0) ShareShare
ReportReport
Posted on by 32

I've got a automate flow which works 80%.

The flow goes like this;

a file gets uploaded to a sharepoint folder, the flow starts and reads the file name.

The first part of the filename is a number which the flow compares to a table in a spreadsheet and creates copies of the said file with names based on columns from the table.

Not I have multiple rows in the table, so it needs to create the same file with different names, however - it seems to only take the first result from the table and recreate it over again.

 

Here's my flow;

BkkBound_2-1691123434201.png

 

BkkBound_1-1691123414372.png

 

 

Appreciate all help I can get!

 

Categories:
I have the same question (0)
  • creativeopinion Profile Picture
    10,502 Super User 2025 Season 2 on at

    I'm a bit confused with how your flow is set up. In your List Rows present in a table action, you are already using a Filter Query where the Itemnumber eq Outputs('compose').

     

    Then you have a Filter Query filtering out the List Rows present in a table action values with the same filter. 

    In your Apply to Each action, you are using the value output from the List rows present in a table action. You aren't looping through the filtered items.

     

    Add a Compose action after your List rows present in a table action and add an expression to check the number of items being returned. Use the length() function.

     

    length([value dynamic content from List Rows action])

     

     

    How many items are being returned? Can you also upload a screenshot of the Excel table? It would be helpful.

  • CU26090802-0 Profile Picture
    32 on at

    As you probably notice, i'm new with power automate.

    The reason I'm using a filter array is that I'm always getting a error when trying the output from the listrows.

    "The execution of template action 'Apply_to_each_2' failed: the result of the evaluation of 'foreach' expression '@items('Apply_to_each_3')' is of type 'Object'. The result must be a valid array."

    So the only way I can think to fix this is to create a filter array..

     

    Here's a printout of the Table;

    BkkBound_0-1691165449791.png

    And here's the compose function, it comes back with 10 results as the file uploaded started with 13990845, this is double the items in the table

    BkkBound_1-1691165535015.png

     

    However, on the Apply to each function below, its identifying 5 which is correct:

    BkkBound_2-1691166237522.png

    However, it's only creating the file and renaming it 5 times.

     

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard