Overview
This node reads binary data from an input field and attempts to parse it as JSON. It is useful when you have binary data (e.g., a file or raw payload) that contains JSON content, and you want to convert it into structured JSON objects for further processing in your workflow.
Common scenarios include:
- Receiving a JSON file as binary input and extracting its contents.
- Processing API responses or files stored as binary data that contain JSON.
- Converting binary JSON payloads into usable JSON objects within n8n.
Example: If you receive a binary file named "data" containing JSON text, this node will parse that text and output the corresponding JSON object(s).
Properties
| Name | Meaning |
|---|---|
| Input Binary Field | The name of the binary property on the input item that contains the JSON data to parse. |
Output
The node outputs JSON data parsed from the specified binary input field. The output structure is:
json: An object containing the parsed JSON data extracted from the binary input.- No binary output is produced by this node.
If the binary data contains a JSON array, the node extracts the first element's content under the key "data" and parses it into JSON.
Dependencies
- Requires the input item to have a binary property with JSON content.
- No external API keys or services are needed.
- Uses standard JSON parsing available in JavaScript.
Troubleshooting
Issue: The node throws a JSON parsing error.
- Cause: The binary data is not valid JSON or is corrupted.
- Solution: Verify that the binary input field contains valid JSON text. You can inspect the binary data before this node or use a different node to convert binary to string if necessary.
Issue: The node outputs empty or unexpected results.
- Cause: The specified binary field name does not exist or is incorrect.
- Solution: Ensure the "Input Binary Field" property matches the exact name of the binary property containing the JSON data.
Issue: Node fails because input items do not have binary data.
- Solution: Confirm that previous nodes provide binary data under the expected field.