Data Converter icon

Data Converter

Convert between various data formats - Base64, Binary, JSON, XML, YAML, CSV, HTML, and more

Overview

This node operation converts CSV data into an HTML table format. It is useful when you have tabular data in CSV format and want to display it as a styled HTML table for web pages, emails, or reports. For example, you can convert exported CSV sales data into an HTML table to embed in an email newsletter or generate dynamic HTML content from CSV files.

Properties

Name Meaning
Input Data The CSV data string that you want to convert into an HTML table.
Table Options Collection of options to customize the output HTML table:
- Table Class CSS class name(s) to apply to the <table> element for styling purposes.
- Include Index Boolean flag to include row numbers as the first column in the generated HTML table.
Binary Property Name (Optional) Name of the binary property if outputting the result as binary data.

Output

The node outputs a JSON object with the converted HTML table as a string in the result field. If configured to output binary data, the HTML table will be provided as a binary file under the specified binary property name.

Example JSON output:

{
  "result": "<table class=\"my-class\"><thead>...</thead><tbody>...</tbody></table>"
}

If binary output is enabled, the HTML content is stored as a binary file (e.g., .html) accessible via the named binary property.

Dependencies

  • No external API keys or services are required.
  • The node relies on internal utility functions for CSV parsing and HTML generation.
  • No special environment variables or n8n credentials are needed.

Troubleshooting

  • Invalid CSV input: If the CSV data is malformed, the conversion may fail or produce incorrect HTML. Ensure the CSV input is properly formatted.
  • Empty output: Check that the "Input Data" property contains valid CSV text.
  • CSS classes not applied: Verify that the "Table Class" option is correctly set and that your consuming environment supports the CSS styles.
  • Binary output issues: When enabling binary output, ensure the "Binary Property Name" is unique and does not conflict with existing properties.

Common error messages relate to invalid input data or missing required parameters. To resolve, validate the CSV input and confirm all required fields are filled.

Links and References

Discussion