LogicApp to loop through folder and Subfolders in Box

Lalit Joshi 1 Reputation point
2020-06-04T15:17:09.057+00:00

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
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,857 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Pramod Valavala 20,591 Reputation points Microsoft Employee
    2020-07-02T13:26:35.617+00:00

    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.

    0 comments No comments