Write Binary File#
The Write Binary File node is used to write a file to the host machine that runs n8n.
Keep in mind
- If you are running n8n in Docker, your command will run on the n8n container and not the Docker host.
- This node will look for files relative to the n8n install path. It is recommended to use absolute file paths to prevent any errors.
Node Reference#
- File Name field: This field specifies the path to which the file should be written, along with the file name.
- Property Name field: Name of the binary property to which to write the data of the read file.
Example Usage#
This workflow allows you to write a file to the host machine using the Write Binary File node. You can also find the workflow on the website. This example usage workflow would use the following three nodes. - Start - HTTP Request - Write Binary File
The final workflow should look like the following image.
1. Start node#
The start node exists by default when you create a new workflow.
2. HTTP Request node#
- Enter
https://docs.n8n.io/assets/img/n8n-logo.png
in the URL field. - Select the 'File' option from the Response Format dropdown list.
- Click on Execute Node to run the node.
3. Write Binary File node#
- Enter the path to which the file should be written along with the file name in the File Name field.
- Click on Execute Node to run the node.