Data Converter
Actions49
- Base64 Actions
- Binary Actions
- Encoding Actions
- Format Actions
- HTML Actions
- String Actions
Overview
This node converts JSON data into an HTML table format. It is useful when you want to visually represent structured JSON data as a readable and styled HTML table, for example in emails, reports, or web pages. The node supports customization such as adding CSS classes to the table and optionally including row numbers.
Practical examples:
- Converting API response JSON arrays into HTML tables for display in dashboards.
- Transforming JSON data from databases into HTML tables for email summaries.
- Generating HTML tables dynamically from JSON input for web content generation.
Properties
| Name | Meaning |
|---|---|
| Input JSON | The JSON data to convert into an HTML table. Typically an array of objects or similar structure. |
| Table Options | Collection of options to customize the output table: |
| - Table Class | CSS class name(s) to apply to the <table> element for styling. |
| - Include Index | Boolean flag to include a column with row numbers (index) at the start of each row. |
Output
The node outputs a JSON object with a single field containing the generated HTML string representing the table. The HTML includes the table tags and rows corresponding to the JSON data.
If configured to output binary data (not typical for this operation), it would output the HTML as a binary file under a specified binary property name.
Dependencies
- No external services or API keys are required.
- Uses internal utility functions for JSON to HTML conversion.
- No special environment variables or n8n credentials needed.
Troubleshooting
- Invalid JSON input: If the "Input JSON" is not valid JSON or not in an expected array/object format, the node may throw parsing errors or produce incorrect HTML. Ensure the JSON is well-formed and represents tabular data.
- Empty or missing data: Providing empty JSON
{}or non-array structures might result in empty tables or no output. - CSS class not applied: If the "Table Class" option is set but styles do not appear, verify that the CSS class exists in your environment where the HTML is rendered.
- Include Index option: When enabled, ensure downstream consumers expect an additional index column.
Common error messages relate to JSON parsing failures or unexpected data types. To resolve, validate and sanitize input JSON before passing to the node.
Links and References
- HTML Tables on MDN
- JSON Data Format
- n8n Documentation (for general node usage and troubleshooting)