Convert to Items icon

Convert to Items

Converts a Table to a JSON Items

Overview

This node converts a table provided as a string into JSON items that can be further processed in an n8n workflow. It supports tables formatted either as Markdown tables or CSV strings. Users can filter the rows by searching for specific values in a chosen column, select which fields to include in the output, and apply options such as including rows with empty fields or converting the result into key-value dictionary pairs.

Common scenarios where this node is useful include:

  • Parsing tabular data copied from documents or spreadsheets (in Markdown or CSV format) into structured JSON for automation.
  • Filtering and extracting specific rows or columns from raw table data before passing it to other nodes.
  • Transforming table data into a dictionary format for easier lookup or mapping operations.

Practical example:

  • You have a Markdown table exported from a report and want to extract only rows where the "Status" column equals "Active", including only the "Name" and "Email" fields, then pass these filtered records downstream.

Properties

Name Meaning
Table The input table as a string. Can be a Markdown-formatted table or a CSV string.
Search Value to search for in the specified search column. If empty, all rows are returned.
Search by Column The name of the column to perform the search on. If empty, no filtering by column is applied.
Fields to Include Comma-separated list of field names to include in the output. If empty, all fields are included.
Options Collection of additional options:
- Include Rows with Empty Fields Whether to include rows that contain empty fields in the results (true/false).
- Convert Result to Dictionary Whether to convert each row into multiple key-value pair objects instead of one object per row.

Output

The node outputs an array of JSON objects representing the rows extracted from the input table after applying any filters and transformations.

  • Each item’s json property contains the fields and their values from the table row.
  • If the "Convert Result to Dictionary" option is enabled, each original row is converted into multiple items, each containing a key and value pair corresponding to the original row's fields.
  • Binary data is not produced by this node.

Example output item without dictionary conversion:

{
  "json": {
    "Name": "John Doe",
    "Email": "john@example.com",
    "Status": "Active"
  }
}

Example output item with dictionary conversion:

{
  "json": {
    "key": "Name",
    "value": "John Doe"
  }
}

Dependencies

  • No external services or API keys are required.
  • The node operates purely on the input string data.
  • No special environment variables or credentials are needed.

Troubleshooting

  • Empty output: Ensure the input table string is correctly formatted as either Markdown or CSV. Leading/trailing empty lines are trimmed automatically.
  • No rows returned when using search: Verify that the "Search by Column" matches exactly a column header in the table, and the "Search" value matches the content exactly (case-sensitive).
  • Fields missing in output: Check the "Fields to Include" property for correct comma-separated field names matching the table headers.
  • Rows excluded unexpectedly: If "Include Rows with Empty Fields" is false (default), rows with any empty field will be omitted. Enable this option if you want to keep such rows.
  • Malformed table parsing: The node expects well-formed Markdown or CSV tables. Irregular formatting may cause incorrect parsing.

Links and References

Discussion