Español

Lee este artículo en español.

How to zip multiple files together automatically

You usually need to bundle several files into a .zip for one of these reasons:

Doing it by hand once is fine: select the files, right-click, compress. The problem shows up when it repeats many times a day, every time someone fills in a form or an order closes, and there's no one who can keep doing it by hand without it turning into a bottleneck.

Automating it in a single step

With Create a .zip file you send the files, each one with its name and its content, and get back the finished .zip, ready to attach, save, or pass on to the next step in your workflow. You can put up to 50 files in the same package, of any type: they don't all need to be PDFs or the same format, you can mix images, spreadsheets and documents in the same zip.

The only requirement for each file is its name: it can't start with / or contain .. as part of the path. That's a security measure so the resulting .zip can't "escape" the folder it gets extracted into, which matters especially when the file names come from a form anyone can fill in.

What you get back

Unlike most other Cofferdock tools, you don't need to ask for anything special here: by default you get the .zip file itself, ready to use. If your workflow prefers to keep working with base64 inside a JSON (say, to pass it on to another step without saving an intermediate file), just request it with "output": "json" and it comes back that way instead.

The price doesn't depend on how many files you pack in: 1 zip generated = 1 credit, whether it holds 2 files or 50.

When automating it actually pays off

If it's a one-off, occasional file, compressing it by hand is faster. Where this makes a real difference is in processes that repeat: every form submission, every order that closes, every daily report, every batch of photos a client uploads. Once "compress it and send it" stops being occasional and starts happening every hour, automating it stops being a nice-to-have and starts saving real time.

Keep the package organized

Use descriptive names for each file inside the zip (with a date, order number, or whatever identifies the case), instead of leaving generic names like file1.pdf. That way whoever receives the zip knows what's inside just by glancing at the list, without opening every file one by one. And watch out for reusing the same name twice in the same package: one would overwrite the other.

FAQ

Can I mix different file types in the same zip? Yes. Up to 50 files of any type in the same package: PDFs, images, spreadsheets, whatever you need.

How much does it cost to zip a lot of files at once? The same as zipping a few: 1 credit per zip generated, no matter how many files it holds.

What format does the result come back in? By default, the .zip file itself, ready to save or attach. If you'd rather get it as base64 inside a JSON, just ask for that instead.

Why does it require a specific format for each file name? For security: the name can't start with / or contain .. as part of the path, so the zip can't break out of the folder it's extracted into. With normal names like invoice.pdf you won't have to think about this at all.

Try these tools

You'll find the full instructions for Create a .zip file, with examples for n8n, Make and your own code. And if you don't have an account yet, you can create one for free.