Dropbox > Image Convert > back to Dropbox

I have a scenario where Dropbox copies a folder from one location to another.
I now need the image contents of that new duplicate folder, to run through the image resize and change format steps and be resaved. I can’t seem to figure out a way to do this - do I need to use an intermediately tool like a router??

dropbox

Welcome to the Make community!

1.

You can use the Dropbox module “List all files in a folder”

Do note that the maximum bundle limit is 3200, so if you have more files than that limit, you’ll need to think of a way to split them into subfolders or process them in batches.

2.

Then, you’ll need to download the file. You can map the file id from the first module

3.

Then, you can convert format/resize using the Image integration

4.

Finally, you can upload the file back into dropbox. Don’t forget to select the correct (latest) output data from the module just before it.

2 Likes

I’ve linked it up as you suggested but it stops at download a file. Please see screenshots…



As per my step (2), you’ll need to select the “Way of selecting the files” as “Select a file”. Currently you have it set as “Map a file path”.

This will allow you to use the File ID variable, otherwise it is expecting a folder path.

Also when using the File ID variable, you do not need a leading slash / in the front.

2 Likes

On your step 2 it said “you can map the file id from the first module”
Apologies I’m a newbie to this can you screenshot what I put in here for the “File ID variable”


Yes, this is correct!

2 Likes

That fails though. When I run a test it says " BundleValidationError"

This is how I’ve got mine set up, and it works:

Output:

2 Likes

Any ideas on where I’m going wrong or how to fix it, or where I’m going wrong?
?



Can you screengrab your settings for each step perhaps?

The Download a File module expects a valid File to be specified. I believe that the problem you are facing is a result of a file not being found at all by the previous List All Files module, and hence an empty string is being sent as the File/Folder ID. This is causing the Missing value of required parameter ‘path’ error message you are seeing.

To troubleshoot this, you can click on the little “1” bubble next to a module. On my end, I replicated your error by pulling from an empty Dropbox account.

The key thing to note here is that the output bundle has 0 total bundles in its result… which means the List All Files module did not find any results. It is a good idea here to make sure that the path you are setting in your configuration of this module is correct, and where you expect your files to be located.

Since I have no files in my Dropbox, I get the same error as you:

Once I uploaded some files in the expected location, my scenario is now working:

Tip: This is a good opportunity to use a filter within your Make scenario. For example:

Here, we are checking if the file File/Folder ID is empty. If the File/Folder ID is empty, then the scenario will stop there and the Download a File module will not be executed - preventing the error from occurring. If the File/Folder ID exists, then we move on to the next module and Download the file.

I hope this helps! If you have not done so already, take a look at our Make Academy to learn about filters and much more.

Have a great day!

3 Likes