mirror of
https://github.com/n8n-io/n8n-docs.git
synced 2026-03-28 01:48:44 +07:00
60 lines
2.9 KiB
Markdown
60 lines
2.9 KiB
Markdown
---
|
|
title: Binary data
|
|
description: Understand and use binary data in n8n.
|
|
contentType: overview
|
|
tags:
|
|
- binary data
|
|
hide:
|
|
- tags
|
|
---
|
|
|
|
# Binary data
|
|
|
|
Binary data is any file-type data, such as image files or documents.
|
|
|
|
This page collects resources relating to binary data in n8n.
|
|
|
|
## Working with binary data in your workflows
|
|
|
|
You can process binary data in n8n workflows. n8n provides nodes to support many tasks. You can also use code to work with binary data.
|
|
|
|
### Nodes
|
|
|
|
There are three key nodes dedicated to handling binary data:
|
|
|
|
* [Read Binary Files](/integrations/builtin/core-nodes/n8n-nodes-base.readbinaryfiles/): load a file from the host machine running n8n.
|
|
* [Write Binary File](/integrations/builtin/core-nodes/n8n-nodes-base.writebinaryfile/): write a file to the host machine running n8n.
|
|
* [Move Binary Data](/integrations/builtin/core-nodes/n8n-nodes-base.movebinarydata/): transform data between JSON and binary formats.
|
|
|
|
There are nodes for working with specific file types:
|
|
|
|
* [iCalendar](/integrations/builtin/core-nodes/n8n-nodes-base.ical/)
|
|
* [Read PDF](/integrations/builtin/core-nodes/n8n-nodes-base.readpdf/)
|
|
* [Spreadsheet File](/integrations/builtin/core-nodes/n8n-nodes-base.spreadsheetfile/)
|
|
* [XML](/integrations/builtin/core-nodes/n8n-nodes-base.xml/)
|
|
|
|
And nodes for performing common tasks:
|
|
|
|
* [Compression](/integrations/builtin/core-nodes/n8n-nodes-base.compression/)
|
|
* [Edit Image](/integrations/builtin/core-nodes/n8n-nodes-base.editimage/)
|
|
* [FTP](/integrations/builtin/core-nodes/n8n-nodes-base.ftp/)
|
|
|
|
You can trigger a workflow based on changes to a local file using the [Local File trigger](/integrations/builtin/core-nodes/n8n-nodes-base.localfiletrigger/).
|
|
|
|
### Code
|
|
|
|
You can use the [Code node](/code-examples/javascript-functions/code-node/) to manipulate binary data in your workflows.
|
|
|
|
Some examples:
|
|
|
|
* [Get the binary data buffer](/code-examples/javascript-functions/get-binary-data-buffer/): get the binary data available in your workflow.
|
|
* [Split binary data into individual items](/code-examples/javascript-functions/split-binary-file-data/): if you receive more than one binary file from a node, you can split the binary data into individual items.
|
|
|
|
## Configure binary data mode when self-hosting
|
|
|
|
You can configure how your self-hosted n8n instance handles binary data using the [Binary data environment variables](/hosting/environment-variables/environment-variables/#binary-data). This includes tasks such as setting the storage path and choosing how to store binary data.
|
|
|
|
Your configuration affects how well n8n scales: [Scaling | Binary data filesystem mode](/hosting/scaling/binary-data/).
|
|
|
|
Reading and writing binary files can have security implications. If you want to disable reading and writing binary data, use the `NODES_EXCLUDE` environment variable. Refer to [Environment variables | Nodes](https://docs.n8n.io/hosting/environment-variables/environment-variables/#nodes) for more information.
|