I seem to be missing something on how to iterate through the files in a Onedrive business folder and do something based on each file. I tried and gave up in the past but am trying again.
1) Can anyone show me ALL the steps that gets and loops through all the files in a folder, i.e. show me a working apply to each file example, or point me two one? (Later I can add copying, renaming and other changes to the files using functionality I already know how to use.)
2) Also, when I add a Create share link inside the 1st apply to each and then follow with add a row into a table the cloud interface insists on nesting it in another apply to each control. You can see in the image included. Can anyone explain this to me or point me at documentation?
Solved! Go to Solution.
Hi @JohnDickinson ,
Actually the variable is not relevant at all, I have nothing in Value when initializing, but use it for the loop and store the URL to check results.
The expanded flow for your reference:
Hope this helps.
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
Hi @JohnDickinson ,
For the first question, I can use both "create share link by path" and "create share link" to create the URL:
11 files are in the folder:
For the second question, I used the same action but no apply to each was added:
Please check the field values you selected from dynamic contents if they are from the list files action.
Hope this helps.
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
Thanks for reaching out. Can you show what variable you are initializing in the second step and expand the dialog for the Apply to each as that is where I cannot seem to get it to have a list to work through. What precisely are you giving the Apply to Each to loop through that was returned from the "List Files in Folder" call.
Hi @JohnDickinson ,
Actually the variable is not relevant at all, I have nothing in Value when initializing, but use it for the loop and store the URL to check results.
The expanded flow for your reference:
Hope this helps.
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
Thanks for this! I haven't fully tested it but now I can see the structure I expect for iterating through the files in a folder as I build the workflow AND a simple test got it to work!
Much appreciated!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
72 | |
27 | |
22 | |
15 | |
13 |
User | Count |
---|---|
141 | |
43 | |
42 | |
34 | |
30 |