- Home
- Resources
- Integrations
- Convert to File
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
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.
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.
Operations index
Convert to CSV
csvWhat 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.
Convert to HTML
htmlWhat 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.
Convert to ICS
iCalWhat 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.
Convert to JSON
toJsonWhat 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:
oncesends all input items to a single file,eachcreates 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,
utf8being the default.
Convert to ODS
odsWhat 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.
Convert to RTF
rtfWhat 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.
Convert to text file
toTextWhat 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.
.txt attachment.Convert to XLS
xlsWhat 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.
Convert to XLSX
xlsxWhat 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.
Move base64 string to file
toBinaryWhat 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.
Need help automating Convert to File with n8n?
A person reads every message.
Convert to File in n8n, the questions that come up
01Is the Convert to File node included in n8n?
02What do you need to set up before using it?
03What are the limits of the n8n Convert to File node?
04Convert to File or Extract from File, which one?
05n8n or Make for building this kind of file export?
Get our weekly integration tips.
No spam. Unsubscribe anytime.

