Vars Pro Viewer
Vars Pro - Generate HTML page to view local JSON file data (Supports polling refresh). Use with Webhook node, return $json.html in HTTP Response node
Overview
This node generates an HTML page to view local JSON file data related to workflow executions and workflow-level data. It supports automatic polling refresh to keep the displayed data up-to-date. It is useful for monitoring and inspecting execution data and workflow variables in real-time, especially when used with a Webhook node and HTTP Response node to serve the HTML content dynamically.
Use Case Examples
- Use case: Monitor execution-level JSON files to track workflow runs and their variables.
- Use case: Display workflow-level JSON data to inspect global workflow variables.
- Use case: Combine both execution and workflow data views for comprehensive monitoring.
Properties
| Name | Meaning |
|---|---|
| Data Type | Selects the type of data to view: execution-level data, workflow-level data, or all data. |
| Poll Interval (Seconds) | Interval in seconds for the frontend page to automatically refresh. |
| Allow View | Whether to allow viewing data (enables or disables the view function). |
Output
JSON
html- The generated HTML page content for viewing the data.body- Same as html, the HTML content for the frontend.data- The raw JSON data object containing workflow and execution data._contentType- Content type header set to 'text/html' for the HTTP response.
Dependencies
- Requires access to local JSON files stored in the n8n data directory or a custom directory specified by environment variables.
- Uses Node.js 'fs' and 'path' modules to read JSON files.
Troubleshooting
- If 'Allow View' is set to false, the node returns an error message indicating the view function is disabled.
- If JSON files are missing or unreadable, the node returns an error message with details.
- Ensure the environment variable N8N_DATA_DIR or default data directory is correctly set and accessible.
- Errors during file reading or JSON parsing will be caught and returned as error messages in the output.
Links
- n8n Documentation - General documentation for n8n workflows and nodes.