Actions20
- Assistant Actions
- Embedding Actions
- File Actions
- Report Actions
- Text Actions
- Thread Actions
Overview
The node "OpenAI Analytics" with the resource "Report" and operation "Generate HTML Report" generates an HTML report by analyzing and visualizing input text data using OpenAI language models. It leverages AI to create a modern, clean, and visually appealing report, optionally including default UI libraries like Bootstrap and ChartJS for styling and charts.
This node is beneficial when you want to automatically transform raw textual data into a structured, styled HTML report without manual coding. For example, it can be used to generate business intelligence reports, data analysis summaries, or any textual data visualization in a ready-to-use HTML format.
Properties
Name | Meaning |
---|---|
Authentication | Choose between using dedicated OpenAI Analytics API credentials or existing OpenAI API credentials. |
Prompt | The instruction prompt sent to the AI to guide how the report should be generated. Default suggests creating a one-page A4-sized report with a modern and clean UI library design analyzing and visualizing the input data. |
Input Text | The raw text data that will be analyzed and converted into the HTML report. |
OpenAI Model | The OpenAI model used to generate the report (e.g., GPT-4.1). Models are loaded dynamically from available completion models. |
Include Default Libraries | Whether to include default UI libraries such as Bootstrap and ChartJS in the generated report. |
Advanced Settings | Enable detailed adjustment of generation parameters like temperature, max tokens, and top P. |
Temperature | Controls randomness/creativity of the output (0 = deterministic, 2 = very creative). Only shown if Advanced Settings is enabled. |
Max Tokens | Maximum number of tokens to generate in the report. Typically, one token corresponds roughly to 3/4 English words or 1-2 Korean characters. Only shown if Advanced Settings is enabled. |
Top P | Nucleus sampling threshold controlling diversity. Lower values consider only the top probability tokens. Not recommended to change simultaneously with temperature. Only shown if Advanced Settings is enabled. |
Additional CSS Libraries | URLs (CDN links) of extra CSS libraries to include in the report beyond the defaults. |
Additional JS Libraries | URLs (CDN links) of extra JavaScript libraries to include in the report beyond the defaults. |
Binary Property | The name of the binary property where the generated HTML content will be stored. Default is "data". |
Output
The node outputs the generated HTML report as binary data under the specified binary property name (default "data"). This binary data contains the full HTML document including styles and scripts as per the selected options. The JSON output typically includes metadata about the operation result or error messages if any occur.
Dependencies
- Requires valid OpenAI API credentials (either dedicated OpenAI Analytics API credentials or standard OpenAI API credentials).
- Uses OpenAI language models (e.g., GPT-4.1) to generate the report.
- Optionally includes external UI libraries such as Bootstrap and ChartJS via CDN links.
- n8n environment must have internet access to load external libraries and communicate with OpenAI APIs.
Troubleshooting
- Invalid Credentials: If API keys are missing or invalid, the node will fail to authenticate. Ensure correct API key credentials are configured in n8n.
- Model Unavailability: If the selected OpenAI model is not available or unsupported, the node may throw errors. Select from the dynamically loaded list of supported models.
- Token Limits: Setting
maxTokens
too high may cause request failures due to API limits. Adjust according to your OpenAI plan and input size. - Network Issues: Connectivity problems to OpenAI endpoints or CDN resources for libraries can cause incomplete report generation.
- Malformed Input Text: Empty or invalid input text will lead to meaningless or failed report generation. Provide meaningful textual data.
- Simultaneous Use of Temperature and Top P: Changing both at the same time is discouraged and may produce unpredictable results.