All guides

n8n AI results to JSON files: combined or item-wise

Convert existing JSON items into files and inspect count, encoding and downstream use.

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.

Keep structured results first

The fixture contains two existing results: id=a with label=keep, and id=b with label=review. Check both fields first. File conversion neither calls AI again nor verifies the labels. The deliverable preserves existing structure; a filename is not file bytes.

Select the Convert to JSON mode

Select Convert to JSON in Convert to File. All Items to One File sends all input items to one file; Each Item to Separate File creates a file per item. Options include File Name, Format and Encoding, with utf8 as the default. Select according to the receiver contract; formatting does not validate fields.

Parse the file before delivery

The synthetic array was serialized as UTF-8 JSON and parsed locally, preserving both IDs. This checks fixture data only. After actual execution, inspect binary output, file count and decoded record count, and establish the receiver file field. Stop downstream upload on empty output, encoding errors or lost items.

Article sources

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

  1. n8n · Official sources
    View details