Search all guides

Reference · Tools

Convert to File node

Convert JSON data into binary files. Supports spreadsheets (CSV, HTML, ODS, RTF, XLS, XLSX), JSON files, text files, ICS calendar events, and base64-to-binary conversion.

Action (binary) Core Nodes v1 Binary data

Convert to File takes structured JSON data from earlier workflow steps and writes it out as a real binary file — a spreadsheet, a calendar invite, a JSON export, or plain text. You could, for example, pull records from a database node, pass them here, and land a ready-to-download XLSX file without writing any code. No credentials or external API calls are needed.

Works as
Action (binary)
Tool name
convert_to_file
Parameters
19
Outputs
Output, Error
Credentials
None required

What you can build with Convert to File

  • Convert JSON data to an Excel XLSX file.
  • Export workflow data to a CSV file with custom delimiter.
  • Create a JSON file from all input items.
  • Convert a text string to a .txt binary file.
  • Generate an ICS calendar event from event data.
  • Convert a base64-encoded string back to its original binary file.

Overview

The Convert to File tool transforms structured JSON data or text strings into binary file formats. For spreadsheet formats (CSV, HTML, RTF, ODS, XLS, XLSX), it aggregates ALL input items into a single output file (many-to-one pattern). For JSON output, it supports two modes: all items into one file (once) or each item as a separate file (each). For text and base64-to-binary operations, each input item produces its own output file (one-to-one). For ICS calendar events, each input item generates a separate .ics file. No external API calls or credentials required.

Node Type

Action (Binary) — handles file/binary data operations

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool does not require any credentials.

Operations

OperationValueDescription
Convert to CSVcsvTransform input data into a CSV file
Convert to HTMLhtmlTransform input data into a table in an HTML file
Convert to ICSiCalConverts each input item to an ICS event file
Convert to JSONtoJsonTransform input data into a single or multiple JSON files
Convert to ODSodsTransform input data into an ODS file
Convert to RTFrtfTransform input data into a table in an RTF file
Convert to Text FiletoTextTransform input data string into a file
Convert to XLSxlsTransform input data into an Excel file
Convert to XLSXxlsxTransform input data into an Excel file
Move Base64 String to FiletoBinaryConvert a base64-encoded string into its original file format

Parameters

Convert to CSV

ParameterTypeRequiredDefaultDescription
Put Output File in FieldstringYesdata
Options (options)collectionNo{}
Options: armscii8
— CompressionbooleanNofalseWhether to reduce the output file size. (shown when /operation is xlsx, ods)
— DelimiterstringNo,The character to use to separate fields. (shown when /operation is csv)
— File NamestringNo—Name of the output file.
— Header RowbooleanNotrueWhether the first row of the file contains the header names.
— Sheet NamestringNoSheetName of the sheet to create in the spreadsheet. (shown when /operation is ods, xls, xlsx)

Convert to HTML

ParameterTypeRequiredDefaultDescription
Put Output File in FieldstringYesdata
Options (options)collectionNo{}
Options: armscii8
— CompressionbooleanNofalseWhether to reduce the output file size. (shown when /operation is xlsx, ods)
— DelimiterstringNo,The character to use to separate fields. (shown when /operation is csv)
— File NamestringNo—Name of the output file.
— Header RowbooleanNotrueWhether the first row of the file contains the header names.
— Sheet NamestringNoSheetName of the sheet to create in the spreadsheet. (shown when /operation is ods, xls, xlsx)

Convert to ICS

ParameterTypeRequiredDefaultDescription
Event TitlestringNo—
StartstringYes—Date and time at which the event begins (ISO 8601). For all-day events, the time will be ignored.
EndstringYes—Date and time at which the event ends (ISO 8601). For all-day events, the time will be ignored. If not set, will be equal to the start date.
All DaybooleanNofalseWhether the event lasts all day or not.
Put Output File in FieldstringYesdataThe field that your iCalendar file will be available under in the output. Names are case-sensitive — see the upstream node’s Binary Data panel for the exact names to use.
Options (additionalFields)collectionNo{}
Options: BUSY, CONFIRMED
— AttendeesfixedCollectionNo{}
— — NamestringYes—
— — EmailstringYes—
— — RSVPbooleanNofalseWhether the attendee has to confirm attendance or not.
— Busy StatusoptionsNo—Used to specify busy status for Microsoft applications, like Outlook.
Options: BUSY, TENTATIVE
— Calendar NamestringNo—Specifies the calendar (not event) name. Used by Apple iCal and Microsoft Outlook.
— DescriptionstringNo—
— File NamestringNo—The name of the file to be generated. Default name is event.ics.
— GeolocationfixedCollectionNo{}
— — LatitudestringNo—
— — LongitudestringNo—
— LocationstringNo—The intended venue.
— Recurrence RulestringNo—A rule to define the repeat pattern of the event (RRULE).
— OrganizerfixedCollectionNo{}
— — NamestringYes—
— — EmailstringYes—
— SequencenumberNo0When sending an update for an event (with the same uid), defines the revision sequence number.
— StatusoptionsNoCONFIRMED
Options: CONFIRMED, CANCELLED, TENTATIVE
— UIDstringNo—Universally unique ID for the event (will be auto-generated if not specified). Should be globally unique.
— URLstringNo—URL associated with event.

Convert to JSON

ParameterTypeRequiredDefaultDescription
ModeoptionsNoonce
Options: once, each
Put Output File in FieldstringYesdata
Options (options)collectionNo{}
Options: armscii8
— Add Byte Order Mark (BOM)booleanNofalseWhether to add special marker at the start of your text file. This marker helps some programs understand how to read the file correctly. (shown when Encoding is utf8, cesu8, ucs2)
— FormatbooleanNofalseWhether to format the JSON data for easier reading.
— EncodingoptionsNoutf8Choose the character set to use to encode the data.
Options: armscii8, ascii, base64, big5hkscs, binary, cesu8, cp1046, cp1124, cp1125, cp1129, cp1133, cp1161, cp1162, cp1163, cp437, cp720, cp737, cp775, cp808, cp850, latin1, ucs2, utf8
— File NamestringNo—Name of the output file.

Convert to ODS

ParameterTypeRequiredDefaultDescription
Put Output File in FieldstringYesdata
Options (options)collectionNo{}
Options: armscii8
— CompressionbooleanNofalseWhether to reduce the output file size. (shown when /operation is xlsx, ods)
— DelimiterstringNo,The character to use to separate fields. (shown when /operation is csv)
— File NamestringNo—Name of the output file.
— Header RowbooleanNotrueWhether the first row of the file contains the header names.
— Sheet NamestringNoSheetName of the sheet to create in the spreadsheet. (shown when /operation is ods, xls, xlsx)

Convert to RTF

ParameterTypeRequiredDefaultDescription
Put Output File in FieldstringYesdata
Options (options)collectionNo{}
Options: armscii8
— CompressionbooleanNofalseWhether to reduce the output file size. (shown when /operation is xlsx, ods)
— DelimiterstringNo,The character to use to separate fields. (shown when /operation is csv)
— File NamestringNo—Name of the output file.
— Header RowbooleanNotrueWhether the first row of the file contains the header names.
— Sheet NamestringNoSheetName of the sheet to create in the spreadsheet. (shown when /operation is ods, xls, xlsx)

Convert to Text File

ParameterTypeRequiredDefaultDescription
Text Input FieldstringYes—The name of the input field that contains a string to convert to a file. Use dot-notation for deep fields (e.g. ‘level1.level2.currentKey’). Names are case-sensitive — see the upstream node’s Binary Data panel for the exact names to use.
Put Output File in FieldstringYesdata
Options (options)collectionNo{}
Options: armscii8
— Add Byte Order Mark (BOM)booleanNofalseWhether to add special marker at the start of your text file. This marker helps some programs understand how to read the file correctly. (shown when Encoding is utf8, cesu8, ucs2)
— EncodingoptionsNoutf8Choose the character set to use to encode the data.
Options: armscii8, ascii, base64, big5hkscs, binary, cesu8, cp1046, cp1124, cp1125, cp1129, cp1133, cp1161, cp1162, cp1163, cp437, cp720, cp737, cp775, cp808, cp850, latin1, ucs2, utf8
— File NamestringNo—Name of the output file.

Convert to XLS

ParameterTypeRequiredDefaultDescription
Put Output File in FieldstringYesdata
Options (options)collectionNo{}
Options: armscii8
— CompressionbooleanNofalseWhether to reduce the output file size. (shown when /operation is xlsx, ods)
— DelimiterstringNo,The character to use to separate fields. (shown when /operation is csv)
— File NamestringNo—Name of the output file.
— Header RowbooleanNotrueWhether the first row of the file contains the header names.
— Sheet NamestringNoSheetName of the sheet to create in the spreadsheet. (shown when /operation is ods, xls, xlsx)

Convert to XLSX

ParameterTypeRequiredDefaultDescription
Put Output File in FieldstringYesdata
Options (options)collectionNo{}
Options: armscii8
— CompressionbooleanNofalseWhether to reduce the output file size. (shown when /operation is xlsx, ods)
— DelimiterstringNo,The character to use to separate fields. (shown when /operation is csv)
— File NamestringNo—Name of the output file.
— Header RowbooleanNotrueWhether the first row of the file contains the header names.
— Sheet NamestringNoSheetName of the sheet to create in the spreadsheet. (shown when /operation is ods, xls, xlsx)

Move Base64 String to File

ParameterTypeRequiredDefaultDescription
Base64 Input FieldstringYes—The name of the input field that contains the base64 string to convert to a file. Use dot-notation for deep fields (e.g. ‘level1.level2.currentKey’). Names are case-sensitive — see the upstream node’s Binary Data panel for the exact names to use.
Put Output File in FieldstringYesdata
Options (options)collectionNo{}
Options: armscii8
— Add Byte Order Mark (BOM)booleanNofalseWhether to add special marker at the start of your text file. (shown when Encoding is utf8, cesu8, ucs2)
— EncodingoptionsNoutf8Choose the character set to use to encode the data.
Options: armscii8, ascii, base64, big5hkscs, binary, cesu8, cp1046, cp1124, cp1125, cp1129, cp1133, cp1161, cp1162, cp1163, cp437, cp720, cp737, cp775, cp808, cp850, latin1, ucs2, utf8
— File NamestringNo—Name of the output file.
— MIME TypestringNo—The MIME type of the output file.

All Operations

ParameterTypeRequiredDefaultDescription
Max ConcurrencynumberNo10Maximum number of items to process concurrently (used for per-item operations like toJson each, toText, toBinary, iCal).

Output Data

This node produces files, not fields. The output item’s json is empty — nothing from the input item’s JSON is carried forward, so read any values you still need before this node, or pass them down a parallel branch. The generated file lands on the binary property named by Put Output File in Field.

How many items come out depends on the operation:

OperationItems out
csv, html, rtf, ods, xls, xlsxOne item for the whole node run — every input item becomes a row in a single file.
toJson with Mode onceOne item for the whole node run, holding one file containing an array of every input item’s JSON.
toJson with Mode eachOne item per input item.
toText, toBinary, iCalOne item per input item.

The per-item operations (toJson with Mode each, toText, toBinary, iCal) keep the binary properties that arrived on the item and add the new file alongside them. The aggregating operations emit a fresh item that carries only the generated file.

When no File Name is set, each operation falls back to a default, and the MIME type is fixed by the format:

OperationDefault file nameMIME type
csvFile.csvtext/csv
htmlFile.htmltext/html
rtfFile.rtfapplication/rtf
odsFile.odsapplication/vnd.oasis.opendocument.spreadsheet
xlsFile.xlsapplication/vnd.ms-excel
xlsxFile.xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet
toJsonfile.jsonapplication/json
toTextfile.txttext/plain
toBinaryfileMIME Type if set, otherwise detected from the file name, otherwise application/octet-stream
iCalevent.icstext/calendar

For the spreadsheet operations, nested objects are flattened into dot-notation columns — { "address": { "city": "NYC" } } becomes a column headed address.city. Turning Header Row off writes the values with no header line.

Example Configuration

Export every input item to one CSV file:

{
  "type": "convert_to_file",
  "parameters": {
    "operation": "csv",
    "binaryPropertyName": "csvFile",
    "options": {
      "delimiter": ",",
      "headerRow": true,
      "fileName": "data_export.csv"
    }
  }
}

Build a compressed Excel workbook with a named sheet:

{
  "type": "convert_to_file",
  "parameters": {
    "operation": "xlsx",
    "binaryPropertyName": "excelFile",
    "options": {
      "compression": true,
      "headerRow": true,
      "sheetName": "DataSheet",
      "fileName": "report.xlsx"
    }
  }
}

Write all items into a single, pretty-printed JSON file:

{
  "type": "convert_to_file",
  "parameters": {
    "operation": "toJson",
    "mode": "once",
    "binaryPropertyName": "jsonFile",
    "options": {
      "format": true,
      "encoding": "utf8",
      "fileName": "combined_data.json"
    }
  }
}

Give each item its own JSON file, numbered by position:

{
  "type": "convert_to_file",
  "parameters": {
    "operation": "toJson",
    "mode": "each",
    "binaryPropertyName": "jsonFiles",
    "options": {
      "format": false,
      "encoding": "utf8",
      "fileName": "item_{{ $index }}.json"
    },
    "maxConcurrency": 5
  }
}

Turn a nested string field into a .txt file:

{
  "type": "convert_to_file",
  "parameters": {
    "operation": "toText",
    "sourceProperty": "content.message",
    "binaryPropertyName": "textFile",
    "options": {
      "encoding": "utf8",
      "fileName": "message.txt"
    }
  }
}

Decode a base64 string back into a PDF:

{
  "type": "convert_to_file",
  "parameters": {
    "operation": "toBinary",
    "sourceProperty": "attachments.base64Data",
    "binaryPropertyName": "decodedFile",
    "options": {
      "fileName": "document.pdf",
      "mimeType": "application/pdf"
    }
  }
}

Generate a calendar invite with an organizer and one attendee:

{
  "type": "convert_to_file",
  "parameters": {
    "operation": "iCal",
    "title": "Team Meeting",
    "start": "2024-01-15T10:00:00Z",
    "end": "2024-01-15T11:00:00Z",
    "allDay": false,
    "binaryPropertyName": "calendarFile",
    "additionalFields": {
      "description": "Weekly team sync meeting",
      "location": "Conference Room A",
      "fileName": "team_meeting.ics",
      "organizerUi": {
        "organizerValues": [
          {
            "name": "John Doe",
            "email": "john@company.com"
          }
        ]
      },
      "attendeesUi": {
        "attendeeValues": [
          {
            "name": "Jane Smith",
            "email": "jane@company.com",
            "rsvp": true
          }
        ]
      }
    }
  }
}

Generate an all-day event on a named calendar:

{
  "type": "convert_to_file",
  "parameters": {
    "operation": "iCal",
    "title": "Company Holiday",
    "start": "2024-12-25T00:00:00Z",
    "allDay": true,
    "binaryPropertyName": "holidayEvent",
    "additionalFields": {
      "description": "Christmas Day - Office Closed",
      "calName": "Company Calendar",
      "fileName": "holiday.ics",
      "status": "CONFIRMED"
    }
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

This tool converts JSON data or text into binary files, supporting spreadsheets, JSON, text, ICS calendar events, and base64-to-binary. It is ideal when you need to transform structured data into a specific file format for storage or further processing, rather than just viewing or manipulating the data. The tool produces binary files in formats like CSV, XLSX, JSON, TXT, ICS, or the original file from base64 encoding.

Common Patterns

  • Data export pipeline — use the spreadsheet operations for structured data export with custom formatting and compression options.
  • Document generation — combine text operations with dynamic content from workflow data to generate reports or documents.
  • Calendar integration — create calendar events from workflow data, supporting both simple events and complex recurring patterns with attendees.
  • File format conversion — use toBinary for base64 data, or chain operations in sequence for multi-format output.
  • Batch processing — raise Max Concurrency for efficient processing of large datasets, especially with per-item operations like individual JSON files or calendar events.

Frequently asked questions

If I send 50 items into Convert to File to make a spreadsheet, do I get 50 files or one?

For all spreadsheet formats — CSV, HTML, RTF, ODS, XLS, and XLSX — the node aggregates every input item into a single output file. This many-to-one behavior is fixed for spreadsheet operations, so you don't need to merge items yourself before the node.

What's the difference between the two JSON output modes?

When outputting JSON you can choose 'once' mode, which collects all input items and writes them into one JSON file, or 'each' mode, which produces a separate JSON file per input item. Use 'once' when you want a single JSON array export; use 'each' when downstream steps need to handle files individually.

Does this node need any credentials or API keys?

No. Convert to File runs entirely within BusyBot — it does not call any external service, so there are no credentials to configure and no API rate limits to worry about.

I'm processing hundreds of calendar events or individual JSON files. Will the node slow down?

For per-item operations like ICS calendar events or JSON in 'each' mode, each input item produces its own output file. The Tips section specifically recommends raising Max Concurrency for these cases to keep large batches moving efficiently.

What do I connect to the Error output, and when does it fire?

The node has two outputs: Output and Error. Output carries successfully converted files downstream. Error carries any items that failed conversion, letting you route failures to a logger, retry logic, or an alert step without stopping the rest of the workflow.

Build with the Convert to File node

Drop it into a workflow, wire it to an agent, or call it on a schedule.

Open BusyBot

Last reviewed . Spotted something wrong? Tell us.