Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Working with Binary Data | Datatyper i n8n
AI-Automatiseringsarbejdsgange med n8n

bookWorking with Binary Data

Note
Definition

Binary data in n8n is any file payload, including images, PDFs, CSVs, and documents. Its purpose is to let a workflow accept a file, extract useful content, reshape it, and pass it forward to the next steps.

Handling binary data in n8n follows a simple and repeatable process. Whether you're working with CSVs, images, or PDFs, the same logic applies, receive the file, inspect its details, extract what matters, and prepare it for the next step in your workflow.

  • Receive a file input (for example, a form submission with a file field).
  • Inspect the binary payload by checking the filename, MIME type, and size.
  • Extract the content, such as turning a CSV into rows or an image into base64.
  • Clean, filter, aggregate, or summarize the extracted data.
  • Optionally convert between file, text (base64), and file again, depending on what the next node or API expects.
Note
Note

Field names matter. When a node asks for an input binary field, it must match the exact field name that carried the file. A mismatch means you'll get an empty output.

Step-by-Step CSV Example

Start by setting up a form submission trigger with a file field. You can restrict uploads by extension, such as .csv or .png. For testing, upload a sample file and extract the CSV.

After the file arrives, inspect the node output and open the binary section. You will see the filename, MIME type, and file size.

Next, use a CSV Reader to extract the content. Set the Input Binary Field to the exact name of the uploaded file field. Each CSV row becomes its own item.

Once extracted, reshape the data. Filter out rows you do not need, convert columns to the correct types (for example, make release_year a number), and keep only important fields like title and release_year. If row-level data is not required, you can summarize it, such as grouping by type or counting totals.

Finally, structure the output. Use Aggregate to combine all items into one list for AI or reporting, or Split Out to process each item individually. This keeps your workflow clear, efficient, and predictable..

question mark

What's the first thing you should do when handling binary data in an n8n workflow?

Select the correct answer

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 3. Kapitel 5

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

Awesome!

Completion rate improved to 4.17

bookWorking with Binary Data

Stryg for at vise menuen

Note
Definition

Binary data in n8n is any file payload, including images, PDFs, CSVs, and documents. Its purpose is to let a workflow accept a file, extract useful content, reshape it, and pass it forward to the next steps.

Handling binary data in n8n follows a simple and repeatable process. Whether you're working with CSVs, images, or PDFs, the same logic applies, receive the file, inspect its details, extract what matters, and prepare it for the next step in your workflow.

  • Receive a file input (for example, a form submission with a file field).
  • Inspect the binary payload by checking the filename, MIME type, and size.
  • Extract the content, such as turning a CSV into rows or an image into base64.
  • Clean, filter, aggregate, or summarize the extracted data.
  • Optionally convert between file, text (base64), and file again, depending on what the next node or API expects.
Note
Note

Field names matter. When a node asks for an input binary field, it must match the exact field name that carried the file. A mismatch means you'll get an empty output.

Step-by-Step CSV Example

Start by setting up a form submission trigger with a file field. You can restrict uploads by extension, such as .csv or .png. For testing, upload a sample file and extract the CSV.

After the file arrives, inspect the node output and open the binary section. You will see the filename, MIME type, and file size.

Next, use a CSV Reader to extract the content. Set the Input Binary Field to the exact name of the uploaded file field. Each CSV row becomes its own item.

Once extracted, reshape the data. Filter out rows you do not need, convert columns to the correct types (for example, make release_year a number), and keep only important fields like title and release_year. If row-level data is not required, you can summarize it, such as grouping by type or counting totals.

Finally, structure the output. Use Aggregate to combine all items into one list for AI or reporting, or Split Out to process each item individually. This keeps your workflow clear, efficient, and predictable..

question mark

What's the first thing you should do when handling binary data in an n8n workflow?

Select the correct answer

Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 3. Kapitel 5
some-alt