cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RobJinx
New Member

Flow to merge PDFs in every sub folder of a root folder

I am a new to automate and trying to create a flow that merges two PDFs into one from a sharepoint folder. The flow would run quarterly on its own and merge the pdfs (the PDFs will be updated quarterly but name will remain the same)

 

Now I have already figured out how to do this within a single targetted sharepoint directory using a third party connector. But now I want it to go through every folder within a root directory one by one and merge the two PDFs within every folder. The two PDFs have the exact same name in every folder. Like a loop, once it hits the last folder it stops and completes the action.

 

For example lets say I have the path Documents > Communities. The communites folder is filled with the location sub folders, e.g, Oregon, Florida, Maine, Virginia. Inside each location sub folder there is a /maps/ folder. Inside /maps/ are the two PDFs to be merged.

 

So the flow goes to Oregon folder, into /maps, merges the pdfs, then it goes to Florida, into /maps/ merges the pdfs inside, then maine, then Virginia and just keeps going till there are no folders left and stops.

5 REPLIES 5
eric-cheng
Solution Sage
Solution Sage

Hi @RobJinx ,

 

1. Use the SharePoint list folder action to get your subfolders e.g Oregon, Maine etc

2. Use another SharePoint list folder action to iterate through and get the next folder down i.e. Maps.  You should add in a condition here for 'name equals Maps'

3. Use a 3rd party connector to merge the PDFs.  Plumsail has a connector here.

 

Below is an example.

 

Screenshot_20210717-154518_Chrome.jpg

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Help1.PNGHelp2.pngHelp3.png

Any idea what I am doing wrong here? It can't seem to insert the community name into the path. Just keeps placing /maps/ in the spot where community name would go.

Can you check the List Folder step before amd that you are iterating the right subfolder

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Hmm, my screenshot above shows every step, including both list folders. It's set to /shared documents/communities. The folders I want to run the action on are in /shared documents/communities/<location>/maps

Hi @RobJinx ,

 

I created the same folder structure.  Try the below.

 

Screenshot_20210718-141304_Chrome.jpg

 

Screenshot_20210718-141315_Chrome.jpg

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,332)