Data Converter icon

Data Converter

Convert between various data formats - Base64, Binary, JSON, XML, YAML, CSV, HTML, and more

Overview

The node converts binary data to text format. It is useful when you have binary content (e.g., files, images, or other binary blobs) stored in a binary property of an incoming item and want to extract or transform that data into a readable text string. This operation is common when processing file contents, decoding encoded data, or preparing binary data for further textual analysis or manipulation.

For example, if you receive an image or document as binary data and need to convert it to a UTF-8 string for logging, display, or sending to another system that requires text input, this node operation will perform that conversion.

Properties

Name Meaning
Binary Property The name of the binary property on the input item that contains the binary data to convert. Default is "data".

Output

  • The output JSON object contains a field named result which holds the converted text string extracted from the specified binary property.
  • No binary output is produced by this operation; the binary data is transformed into a text string.
  • The output JSON may also include additional fields if the conversion produces structured data, but primarily the key result holds the textual representation.

Dependencies

  • No external services or API keys are required.
  • The node relies on internal helper functions to read binary data buffers and convert them to text.
  • No special environment variables or n8n credentials are needed.

Troubleshooting

  • Common issues:

    • Specifying a binary property name that does not exist on the input item will cause an error because the node cannot find the binary data to convert.
    • Input binary data that is not valid text encoding (e.g., non-UTF-8 or corrupted binary) may result in garbled or incorrect text output.
  • Error messages:

    • If the binary property is missing or invalid, the node throws an error indicating it could not assert or retrieve the binary data.
    • To resolve, ensure the binary property name matches exactly the property containing the binary data on the input item.
    • Validate that the binary data represents text encoded in a compatible format (usually UTF-8).

Links and References

Discussion