Having a very frustrating day of Flow building. I am using the List Folder action in an Apply to Each loop, but when I assign a dynamic value to the Site Address parameter, it doesn’t change. Each loop it keeps the original value.
If it only needs a site collection address, I can’t figure out how to enter the subsite. Including it in the Folder Identifier doesn’t work.
So no idea how to take a list of URLs and get the contents of those folders…
Can you capture a screenshot of your whole flow so that I can understand you issue better and will try to reproduce your issue?
Basically I am grabbing a SharePoint list with a URLs for both the site and the folders I am interseted in. The site URLs are a number of subsites. When I call List Folder I want to pass in a new subsite and folder identifer, but while the Flow successfuly runs, it only takes the first value for the Site Address and just repeats itself, it doesn't get a new value for Site Address in the loop.
About compose concept in flow, you usually use it when you have a single value that you want to re-use many different times throughout your flow (for example, a single message that you want to reuse in several emails you send out). So the outputs from compose should always the same. And I think that is why it will repeats the same site address in List folder.
How often does the list of URL's change?
You could add this to an external datasource easily (e.g SQL/Cosmo/Excel), then loop through each one using an "Apply to each" step.
Then pass that variable into the rest of your Flow.
@DionGoile that is what is not working. I am taking a list of URLs from a SharePoint list and then doing an Apply to Each, but it never takes a different URL. I just repeats over and over with the first URL. It don't see why looping over a SharePoint list would be different from an Excel sheet.
I am also unclear how to pass the variable from the Apply to Each to the rest of the flow as I keep seeing contradictory statements about if that's even possible.
@v-monli-msft that does not change the outcome. Compose was put in there because I thought maybe the issue was it wasn't taking a string value, but removing Compose produces the same behavior. It never goes through the list it just loops over and over on the first value passed to List Folder.
@DionGoile Some of the outputs have some info from our tenant I don't want to share, but I can tell you it successfully pulls the data from the SharePoint list. On the output of the List Foder you can see it below minus a few ID tags:
So while the Flow successfuly completes it's only reaching out to the first value, then completing without error.
The fact you are getting one result is the reason this is not working, when I run it on a generic list I get multiple results. It should work fine.
You may have encountered a bug, I would suggest (if you haven't already) create a new flow entirely and delete and reconnect your sharepoint connection in Flow. Also test with a different list.
Otherwise one of the Microsoft team will be able to help you lodge a support case.
Sorry I haven't been able to help more!
@DionGoile I believe it's a single object containing an array of the items from Get Items. The List Folders action at first does not appear to take dynamic values, but after waiting a second or two it will show items from the Get Items input.
I can see the different items from the list in Get Items, I am guessing List Folder can't take a dynamic value, or just needs the Site collection URL for the site address, but if it just needs the site collection URL I don't know how to form the Folder URL to ID a subsite...
I am incresingly thinking this is broke/bug.
Join us for the first ever Power Platform Online Conference!
Keep your eyes open for our upcoming T-shirt design contest!
Look out for new contribution recognition badges coming SOON!
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!
Find out where you can attend!