cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Brian13
Level: Powered On

'apply to each' only processing one file in OneDrive

Hello

I'm writing a flow to copy all files from a OneDrive folder to a Sharepoint Library and set the file's metadata.

The flow is initiated by a button (or manually) as I want it to process all the files not just new files.

It works fine but only for one of the four files in the OneDrive folder. I'm new to Flow and while I've searched and experimented I cannot get it to process the other files (they are all the same file but with slightly different names).

Here is the flow:

ApplyToEachProblem.JPG

 

does anyone have any suggestions? 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: 'apply to each' only processing one file in OneDrive

Hi @Brian13,

 

Do you want to copy all the files from a OneDrive folder to a SharePoint library?

Without using variables in the flow, please take the following configuration for a reference.

The flow is also triggered by Button, then List files in folder, under the Apply to each, add the actions Get file metadata and Get file content, by using these two actions, all the metadata of the files can be copied. Then use the action SharePoint Create file.

The flow just works fine and all the files can be saved from OneDrive to SharePoint library properly.

1.PNG2.PNG 

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: 'apply to each' only processing one file in OneDrive

Hi @Brian13,

 

Do you want to copy all the files from a OneDrive folder to a SharePoint library?

Without using variables in the flow, please take the following configuration for a reference.

The flow is also triggered by Button, then List files in folder, under the Apply to each, add the actions Get file metadata and Get file content, by using these two actions, all the metadata of the files can be copied. Then use the action SharePoint Create file.

The flow just works fine and all the files can be saved from OneDrive to SharePoint library properly.

1.PNG2.PNG 

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Brian13
Level: Powered On

Re: 'apply to each' only processing one file in OneDrive

Thank you

I also found why i was only seeing one file being copied to the document library - I was not changing the name of the file for each of the files in the flow. I was expecting the document library to accept multiple files with the same name (as it does when you upload files 'manually') so what was happening is that I was writing over the top of each file with the same name.

All fixed, thank you.

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 312 members 4,729 guests
Please welcome our newest community members: