Resources · n8n integration

n8n Convert to File nodeConfigure Convert to File in n8n.

Convert to File takes the JSON moving through a workflow and writes it out as a real file. The n8n Convert to File node ships 10 operations, from spreadsheets to calendar invites, and has nothing to authenticate. Reach for it whenever the next node expects an attachment instead of fields.

Verified Trustpilot reviews · AI, automation & growth agency

Why automate

What does the n8n Convert to File node actually do?

It converts JSON data into binary data. In practice that means the items flowing through your workflow stop being fields on a screen and become a file: a spreadsheet, a calendar event, a plain text document. The file lands in a binary field whose name you choose, and every node after it can attach, upload or send that field.

Three scenarios cover most of what gets built with it. The first is the weekly report. A Schedule Trigger pulls rows from Google Sheets, Convert to CSV writes them into the binary field named in Put Output File in Field, and Gmail sends that same field as an attachment. Nothing touches a disk in between.

The second is archiving. Convert to JSON with Mode on each produces one file per incoming item, which is what you want when every record has to be stored under its own name. Switch Mode to once and the whole batch becomes a single file instead, easier to reopen later.

The third is a file that arrives disguised as text. An API called through HTTP Request often hands back a document as a base64 string sitting inside JSON. Move Base64 String to File turns that string back into the original file, ready to post into Slack.

When to reach for something else: this node only travels one way, from JSON to binary. To read a file and get JSON back, the Extract from File node does the opposite job, and the two are often chained. If the format you need is not in the list below, no option here will produce it.

Worth knowing before you build. The node is at version 1, so an older workflow shows the same parameters. Its 10 operations cover CSV, HTML, ICS, JSON, ODS, RTF, text, XLS, XLSX and base64, and that is the whole list: no PDF, no DOCX. It also runs on each incoming item rather than starting a workflow, so something has to fire first, a Schedule Trigger, a Webhook, or the trigger of a tool. Still weighing platforms? The n8n review goes through the hosting and cost questions in detail.

Actions

Which operation writes the file you need?

The Convert to File node exposes 10 operations. For each one: the node as you configure it in n8n, the required fields, and our field notes.

01

Convert to CSV

csv

What you see in n8n

Notes & use cases

Turns the incoming items into a CSV file, one row per item, columns taken from the fields. This is the export format almost every other tool accepts.

Key parameters

  • Put Output File in Field: the name of the output binary field that will hold the file. Whatever you type here is what the next node has to point at.
  • File Name: the name of the generated file, worth setting because it is what the recipient sees.
  • Header Row: turn it on when the first row of the file contains the header names.
Use cases
a nightly export of new signups mailed to the sales team, or a supplier list dropped into cloud storage.
02

Convert to HTML

html

What you see in n8n

Notes & use cases

Lays the input data out as a table inside an HTML file. Useful when the file is meant to be looked at rather than reimported, since any browser opens it without a spreadsheet app.

Key parameters

  • Put Output File in Field: the output binary field that carries the HTML file downstream.
  • File Name: the file name for the generated output.
  • Header Row: switch it on if the first row of the file contains the header names, so the table reads as a table.
Use cases
a daily summary sent to a manager who opens it on a phone and never wants to download a spreadsheet.
03

Convert to ICS

iCal

What you see in n8n

Notes & use cases

Each input item becomes one ICS event file, the format calendar apps import. The richest operation here, with 14 options behind Options.

Key parameters

  • Start: the date and time the event begins. All-day events ignore the time.
  • End: the date and time it ends. Left unset, it equals the start date.
  • Put Output File in Field: the field your iCalendar file will be available under in the output.
  • Attendees: adds attendees to the event, each with a name, an email and an RSVP flag.
  • Use Workflow Timezone: on, the event follows the workflow timezone from the node settings rather than UTC.
Use cases
a booking confirmed in a form gets an invite attached to the confirmation email.
04

Convert to JSON

toJson

What you see in n8n

Notes & use cases

Writes the input data back out as one or several JSON files. The only operation with a real fork in it, because Mode decides how many files come out.

Key parameters

  • Mode: once sends all input items to a single file, each creates a file for every input item.
  • Put Output File in Field: the output binary field holding the result, one entry per file produced.
  • Format: on, the JSON is formatted for easier reading. Leave it off for a machine that only parses it.
  • Encoding: the character set used to encode the data, utf8 being the default.
Use cases
a nightly snapshot of an API response kept as an audit trail.
05

Convert to ODS

ods

What you see in n8n

Notes & use cases

Produces an ODS spreadsheet, the open format read by LibreOffice and by most office suites. Pick it when the recipient is not on Microsoft tooling.

Key parameters

  • Put Output File in Field: the output binary field to put the file in.
  • Compression: on, the output file size is reduced, which matters once the export runs into thousands of rows.
  • Header Row: on when the first row of the file contains the header names.
  • Sheet Name: the name of the sheet created inside the spreadsheet, for example mySheet.
Use cases
a monthly accounting extract for a bookkeeper working in LibreOffice.
06

Convert to RTF

rtf

What you see in n8n

Notes & use cases

Builds a table in an RTF file, the rich text format that word processors open without complaint. Handy when a document has to be edited by hand after the workflow drops it.

Key parameters

  • Put Output File in Field: the output binary field containing the RTF file.
  • File Name: the file name for the generated output file.
  • Header Row: turn it on if the first row of the file contains the header names.
Use cases
a list of items handed to someone who will annotate it in a word processor before sending it on.
07

Convert to text file

toText

What you see in n8n

Notes & use cases

Takes one string from the item and writes it as a file. Unlike the table operations, this one does not care about your other fields: it reads a single field and nothing else.

Key parameters

  • Text Input Field: the name of the input field that contains the string to convert. Dot-notation reaches deep fields, as in level1.level2.currentKey.
  • Put Output File in Field: the output binary field to put the file in.
  • Encoding: the character set used to encode the data, default utf8.
  • Add Byte Order Mark (BOM): adds a marker at the start of the text file that helps some programs read it correctly.
Use cases
saving a model answer or a generated log line as a .txt attachment.
08

Convert to XLS

xls

What you see in n8n

Notes & use cases

Outputs an Excel file in the older XLS format. Still the right choice when the receiving system was written years ago and refuses anything newer.

Key parameters

  • Put Output File in Field: the name of the output binary field to put the file in.
  • File Name: the file name for the generated output file.
  • Header Row: on if the first row of the file contains the header names.
  • Sheet Name: the sheet name to create in the spreadsheet.
Use cases
feeding an internal import tool that only accepts legacy Excel uploads.
09

Convert to XLSX

xlsx

What you see in n8n

Notes & use cases

The modern Excel format, and the default answer when someone asks for a spreadsheet. Same inputs as the other table operations, with size control on top.

Key parameters

  • Put Output File in Field: the output binary field that carries the workbook.
  • Compression: choose whether to compress and reduce the output file size.
  • Header Row: on if the first row of the file contains the header names.
  • Sheet Name: the sheet name to create in the spreadsheet, so the tab is not called Sheet1.
Use cases
a finance export shared in a channel every Monday morning.
10

Move base64 string to file

toBinary

What you see in n8n

Notes & use cases

Converts a base64-encoded string back into its original file format. The odd one out: nothing is being tabulated here, a file that was already a file is simply restored.

Key parameters

  • Base64 Input Field: the input field holding the base64 string, dot-notation allowed for deep fields such as level1.level2.currentKey.
  • Put Output File in Field: the output binary field to put the restored file in.
  • MIME Type: the MIME type of the output file, for example text/plain. Skip it and the receiving app may guess wrong.
  • Data Is Base64: says whether the data is already base64 encoded.
Use cases
rebuilding an invoice returned inside an API payload.
Need help

Need help automating Convert to File with n8n?

A person reads every message.

FAQ

Convert to File in n8n, the questions that come up

01Is the Convert to File node included in n8n?
Yes. It is a core node, shipped with n8n, so there is nothing to install and nothing extra to pay on the n8n side. It behaves the same on n8n Cloud, the hosted offering, and on a self-hosted instance running under the Community Edition and its Sustainable Use licence. A workflow built in one runs in the other without changes. The only cost question left is the one attached to whatever you do with the file afterwards, sending it, storing it, uploading it somewhere, and that belongs to those services rather than to this node.
02What do you need to set up before using it?
Nothing on the account side. This node has no credential and no Authentication selector, so there is no key to paste, no scope to approve and no connection screen to go through. Drop it on the canvas, pick an operation, fill the required fields and it runs. What it does need is data: it works on each incoming item, so a node has to sit in front of it, and a trigger has to open the workflow, a Schedule Trigger, a Webhook or the trigger of a tool. Empty required fields stop the node before it writes anything.
03What are the limits of the n8n Convert to File node?
It goes one direction only, from JSON to binary. Reading a file and turning it into JSON is the job of the Extract from File node instead. The formats are fixed at 10 operations, CSV, HTML, ICS, JSON, ODS, RTF, text, XLS, XLSX and base64 restoration, and no option adds another one. The node sits at version 1, so there is no newer variant hiding extra parameters. Options that are not added through Add option keep their default value, which is a common source of surprise when an export comes out unnamed or uncompressed.
04Convert to File or Extract from File, which one?
It depends which way the data is moving. Convert to File takes the JSON already in your workflow and outputs it as a file, so it belongs at the end of a branch, just before an email, an upload or a chat message. Extract from File does the reverse: it reads a file and gives you JSON to work with, so it belongs right after whatever brought the file in. Plenty of workflows use both, one to read an incoming attachment, the other to write the cleaned result back out in a different format.
05n8n or Make for building this kind of file export?
Both will produce the file. The difference is structural. Make is a hosted automation platform with no self-hosting option and billing per operation, so a workflow that converts thousands of items has a cost that follows volume. n8n runs on n8n Cloud or on your own server through Docker or npm, which keeps the data on infrastructure you control and changes how the bill is shaped. Visual logic differs too, and that is mostly a matter of habit. Pick on hosting, data control and cost model rather than on feature lists.
Hack'celeration Lab

Get our weekly integration tips.

No spam. Unsubscribe anytime.