Skip to main content

Convert to File

Wraps any value in an in-memory file, ready to be uploaded to storage or sent as a binary HTTP request body.

Properties

PropertyRequiredDescription
DataYesThe content to write into the file. Supports expressions
File nameYesThe name of the file including extension (e.g. report.json)
Content typeYesThe MIME type of the file (e.g. application/json, text/csv)

Behaviour

Input typeFile content
StringUTF-8 encoded bytes of the string
Object or arrayJSON-serialised bytes
Existing file (BinaryValue)File name and content type are updated; bytes are unchanged

The output is a binary file value. Pass it to:

  • A File Storage node to persist it to a storage provider
  • An HTTP Request node with Body → Binary to upload it directly to an API

Output

The node outputs a binary file. The file is not automatically accessible via expressions as a text field — it is passed as an opaque binary value to the next node. Use it wherever a file input is expected.

Example

Serialise an API response to JSON and upload it to storage:

  1. Add an HTTP Request node to fetch data from an API.
  2. Add a Convert to File node:
    • Data: {{ $nodes['HTTP Request'].responseBody }}
    • File name: response.json
    • Content type: application/json
  3. Connect a File Storage node to upload the result.

Notes

  • File name supports expressions, so you can include dynamic values: report-{{ $now }}.csv.
  • If Data is already a file (e.g. from a webhook file attachment or a previous File Storage download), the original bytes are kept and only the name and content type are replaced.