Resources · n8n integration

n8n Compression nodeConfigure Compression in n8n.

The n8n Compression node turns binary files into archives, and archives back into files. It carries 2 operations, Compress and Decompress, nothing to authenticate, and it reads the archive format from the file extension. Useful as soon as attachments travel through a workflow.

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the n8n Compression node do in a workflow?

The n8n Compression node compresses files into a zip or gzip archive, and decompresses zip and gzip files back into separate items. It works on the binary data attached to the items that reach it, so a trigger always runs first: a Schedule Trigger, a Webhook, or the trigger of a tool. Nothing to connect, no credential, no account.

First scenario: a report that arrives in pieces. A workflow pulls five files during the night, and the recipient wants one attachment, not five. Compress collects the binary fields listed in Input Binary Field(s) and writes a single archive under the name set in File Name. The Gmail node then sends that one file, and the mailbox stays readable.

Second scenario: an archive that lands in the workflow and has to be opened. A supplier drops a zip on an endpoint, the HTTP Request node downloads it, and Decompress splits it into one item per member file. From there each file follows the normal path, one row at a time into Google Sheets, or straight into a storage node.

Third scenario: a heavy export that travels badly. A daily database dump goes out as a single file, and gzip shrinks it before it crosses the network. The output lands in the binary field named in Put Output File in Field, which keeps the original data untouched if the next node still needs it. A short message to Slack closes the run.

When to reach for something else: this node handles files, not records. Turning a list of items into a csv, renaming fields, or filtering rows belongs upstream, and an archive that never needs to exist as a file is usually a sign the compression step is not the right tool. Compression also does not fetch anything by itself, so the download stays the job of the node before it.

The known limits are worth reading before building on top. Decompress detects the format from the extension and supports 5 of them, zip, gzip, tar, tar.gz and tgz. Anything else throws an error rather than producing an empty output, which is the friendlier behavior but still stops the execution. A .tar.gz or .tgz archive is unpacked in a single step, so there is no gzip layer to peel first. The node ships with n8n on Cloud and on a self-hosted instance alike, at version 1, and our n8n review covers how the rest of the builder holds up.

Actions

Which parameters does the Compression node expose?

The Compression node exposes 2 operations. For each one: the node as you configure it in n8n, the required fields, and our field notes.

01

Compress file(s)

compress

What you see in n8n

Notes & use cases

Compress reads the binary files carried by the incoming item and writes an archive back onto it, in zip or gzip format.

Key parameters

  • Input Binary Field(s): the binary field holding the file. For several files, a comma separated list such as data,data2,data3.
  • Output Format: zip gathers the files into one archive, gzip compresses the stream.
  • File Name: the name of the archive created, for example data.zip.
  • Output File Prefix: the prefix added to the gzip file.
  • Put Output File in Field: the output binary field the archive lands in.
Use cases
bundling the invoices of a month into one attachment before it leaves the workflow.
02

Decompress file(s)

decompress

What you see in n8n

Notes & use cases

Decompress opens an archive already attached to the item and gives back its member files, format recognized from the extension.

Key parameters

  • Input Binary Field(s): the field carrying the archive, or a comma separated list to open several in the same run.
  • Output Prefix: the prefix the node puts in front of each extracted file, followed by an incrementing index.
Use cases
opening the nightly zip a partner publishes, then reading every file it contains without touching a terminal.
Need help

Need help automating Compression with n8n?

A person reads every message.

FAQ

Compression and n8n, the questions that come up

01Is the Compression node free in n8n, on Cloud and self-hosted?
Yes. Compression is a core node, shipped with n8n itself, so there is nothing to install and nothing extra to pay on the n8n side. It behaves the same on n8n Cloud, the hosted offer run by n8n, and on an instance you host yourself with Docker or npm under the Community Edition and its Sustainable Use license. A workflow built on one runs on the other without a change to this node. The only cost that ever enters the picture comes from whatever service sends or stores the files around it, never from the compression step, which happens inside the execution.
02What credentials does the Compression node need?
None. There is no credential to create, no Authentication selector in the panel, and no account to link anywhere. That is unusual for an n8n node and it is a real advantage: nothing expires, nothing has to be rotated, and a workflow copied to another instance keeps working on this step. All the node needs is binary data on the incoming item, which means the node placed before it has to attach a file. The parameters ask for field names and an output name, nothing else. If a file is missing from the field named in Input Binary Field(s), the node stops, because that field is required.
03What are the limits of the n8n Compression node?
It works on files, not on data structures. Decompress recognizes the format from the file extension and supports zip, gzip, tar, tar.gz and tgz. A file with any other extension raises an error instead of quietly producing an empty output, so the execution stops and the problem is visible. A tar.gz or tgz archive is extracted in one step, with no separate gzip pass. The node runs on each incoming item, so a batch of items means a batch of archives, and it never downloads or uploads anything by itself. The node is at version 1, and an older workflow may show fewer options.
04When should you use Compression rather than another node?
Take Compression when a real file has to become an archive, or when an archive has to become files again. Everything that happens before or after belongs elsewhere: fetching the archive is the job of HTTP Request, reshaping fields is the job of Edit Fields (Set), routing items on a condition is the job of If or Switch. A useful check is whether the artifact needs to exist as a file at all. If the next step only reads values, compressing adds a round trip for nothing. If the next step is an email, an upload, or a transfer, the archive earns its place.
05n8n or Make for compressing files?
It depends on how much control you want over where the files sit while they are processed. n8n can be self-hosted with Docker or npm, so archives are built on infrastructure you own, and the same workflow also runs on n8n Cloud. Make is a hosted automation platform with no self-hosting option, billed per operation, which changes the cost model when a workflow handles many files in a run. Both build visually, so the choice rarely comes down to the editor. Data ownership and the way volume turns into a bill are the questions worth answering first.
Hack'celeration Lab

Get our weekly integration tips.

No spam. Unsubscribe anytime.