All guides

n8n CSV inputs to JSON: binary fields and rows

Locate the actual file field before extracting CSV and preserve row identity for AI input.

AINavWritten / Updated Sources checked
On this page

At a glance

This guide explains an AI workflow data task from official node documentation and checks public synthetic inputs locally. It does not run n8n, sign in or call a model API. Documented steps and local inspection are separate.

Input, conversion and checks

  1. Prepare input

    Inspect actual data, fields and prerequisites.

  2. Select conversion

    Choose the task mode and destination field.

  3. Inspect output

    Account for missing items and errors before continuing.

Establish input and receiver contracts before downstream work.

Establish that input contains file bytes

Files may arrive through HTTP Request, Webhook or a local source. Extract From File converts binary file data into JSON. A path or filename in JSON does not establish node possession of the bytes. The fixture has id and text columns with two synthetic rows and no account data.

Select format and Input Binary Field

Select Extract From CSV and set Input Binary Field to the upstream file field; its default is data. The documented Webhook example enables Raw body under Add Options to produce the expected binary input. Destination Output Field is available only for the documented JSON, ICS, Text File and Base64 operations, rather than every format.

Inspect rows and fields before AI calls

The documented CSV example produces a series of JSON row objects. A standard CSV parser checked the two-row fixture and unique IDs locally; n8n was not executed and no file uploaded. In a product run, inspect item count, types and empty values. Stop model requests on a missing binary field, parse failure or lost row identity.

Article sources

Original editorial content; official descriptions and checking suggestions are distinguished.

  1. n8n · Official sources
    View details