question

LalitJoshi-0149 avatar image
0 Votes"
LalitJoshi-0149 asked PramodValavala-MSFT answered

LogicApp to loop through folder and Subfolders in Box

Trying to build a logic app to recursively loop through Folders and Subfolders and files in Box and migrate to Google drive. I saw approaches using 2 logic apps (Parent, Child) but majority doesnt provide enough details.

Please share your thoughts

Thanks

azure-logic-apps
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @LalitJoshi-0149 - We are actively investigating and will answer with our findings soon.

0 Votes 0 ·

1 Answer

PramodValavala-MSFT avatar image
0 Votes"
PramodValavala-MSFT answered

This is indeed possible but do note the limits for the Box and Google Drive connectors.

Here is an overview of how you can achieve it

1. Logic App 1 - Main
This would be the simplest one which does the following
1. Trigger based on your requirement
2. Calls Logic App 2 to get a list of the files to move
3. Calls Logic App 3 to move all files returned in the previous step from Box to Google Drive

2. Logic App 2 - Get List of Files/Folders Recursively from Box
This logic app would fetch a list of files and folders starting from the root and then recursively get a similar list from all folders at each level. A recursive logic app would be the best approach here but is not allowed by design.

This blog highlights how you can achieve recursive logic apps. The HTTP Action approach is the better approach.

3. Logic App 3 - Move files from Box to Google Drive (This is optional. You could directly call the action in a loop in Logic App 1 itself)
This logic app would simply loop over the list of files and move them from Box to Google Drive. This is achieved by first fetching the file content from Box and then create the file in Google Drive.

After you run this for the first move, you could have a different logic app that triggers when a file is created/modified on Box and move the file in a more reactive way. This would be more efficient than running the above logic app every time from scratch.




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.