Create Graphs
Overview
The Create Graphs Node lets you turn your database queries into visual charts — such as line graphs, bar graphs, pie charts, scatter plots, and area graphs — directly inside a no-code workflow.
It’s designed for users who want to visualize data without writing code, for use in dashboards, reports, or automated email updates.
Description
Generate visual charts from your data.
This node connects to your database, runs a query (either a manual query or one written in plain language), and returns a visual chart representing your results. You can choose which table to query, what filters to apply, and what type of chart to generate.
Line Graph
Best for showing trends over time (e.g., sales growth).
Bar Graph
Best for comparing categories (e.g., users per region).
Pie Chart
Best for showing proportions (e.g., market share).
After execution, the node provides the queried data and a link to the generated chart image (chartUrl).
Input Parameters
The Create Graphs node accepts settings for querying data and configuring the chart.
selectQueryTypestringRequired"Query Data"tableNamestringRequired"production:sales"chartTypestringRequired"Bar Graph"xFieldstringRequired"month"yFieldstringRequired"total_sales"Query FieldsarrayOptional[{"field": "status", "operator": "=", "value": "completed"}]naturalLanguagestringOptional"Show total sales per month"aggregationstringOptional"sum"Output Parameters
The node returns a JSON object containing the chart URL and data.
tableNamestringOptional"production:sales"queryIdstringOptional"23c92010-..."chartUrlstringOptional"https://.../chart.png"imagestringOptional"https://.../chart.png"dataarrayOptional[{"month": "Jan", "sales": 100}, ...]messagestringOptional"Successfully fetched 12 records and generated chart"statusstringOptional"success"Use the chart image in subsequent nodes:
{{create-graphs.output.chartUrl}}
Output Type
Output Type: JSON
The output is a JSON object that includes both the query results and metadata about the generated chart. This JSON can be used by other workflow nodes to display, share, or store the chart.
Example Usage
Example 1: Line Graph from Query Data
Visualize user growth over time.
{ "selectQueryType": "Query Data", "tableName": "production:users", "chartType": "Line Graph", "xField": "created_at", "yField": "count", "aggregation": "count", "groupBy": "created_at"}
{ "tableName": "production:users", "queryId": "23c92010-...", "data": [ { "created_at": "2023-01", "count": 50 }, { "created_at": "2023-02", "count": 75 } ], "message": "Successfully fetched 2 records and generated chart", "status": "success", "chartUrl": "https://s3.amazonaws.com/.../chart.png", "image": "https://s3.amazonaws.com/.../chart.png"}
Example 2: Bar Graph from Natural Language
Show sales by region using plain English.
{ "selectQueryType": "Natural Language Query", "tableName": "production:sales", "naturalLanguage": "Show total sales per region for the last quarter", "chartType": "Bar Graph", "xField": "region", "yField": "sales"}
{ "tableName": "production:sales", "queryId": "xxxxxxxx-...", "data": [ { "region": "North", "sales": 12000 }, { "region": "South", "sales": 8500 } ], "message": "Successfully fetched 2 records and generated chart", "status": "success", "chartUrl": "https://.../sales-by-region.png", "image": "https://.../sales-by-region.png"}
How to Use in a No-Code Workflow
Add the Node
Add the Create Graphs node to your workflow.
Configure Query
Select Query Type and Table Name. Define filters or type your natural language query.
Configure Chart
Select Chart Type (e.g., Bar Graph). Set xField (category) and yField (value).
Run Workflow
Save and run. The node will generate the chart URL.
Use Chart
Pass the chartUrl to an Email node or Display node.
Best Practices
- Always apply a limit to avoid overly large datasets.
- For time-based charts, make sure the xField is a date or timestamp.
- Use numeric fields for yField so charts can render correctly.
Do / Don’t
- ✔️ Use Aggregation (sum, count) when grouping data.
- ✔️ Keep Pie Chart categories to a minimum (max 5-7) for readability.
- ✔️ Store the
chartUrlif you need to reference it later.
- ❌ Don’t use text fields for the Y-axis (values must be numbers).
- ❌ Don’t fetch thousands of records without aggregation; it will slow down generation.
- ❌ Don’t ignore empty chart results; check your query filters.
Common Errors
No data returnedWarningOptionalChart not generatedErrorOptionalEmpty chartWarningOptionalPermission deniedErrorOptionalExample Workflow Integration
Use Case 1: Weekly Sales Report
Email a sales chart to the team every Monday.
- Schedule Trigger: Every Monday at 9 AM.
- Create Graphs Node: Query
production:salesfor last week's data, group by day, sum amount. Generate Line Graph. - Email Node: Send email with
chartUrlembedded.
Workflow Data Flow:
{{schedule.last_week}} → {{createGraphs.filters.date}}
{{createGraphs.chartUrl}} → {{emailNode.body.image}}
Use Case 2: User Growth Dashboard
Display current user count by plan.
- Trigger: Dashboard load.
- Create Graphs Node: Query
production:users, group byplan, count IDs. Generate Pie Chart. - Display Node: Show the pie chart on the dashboard.
Workflow Data Flow:
{{createGraphs.chartUrl}} → {{displayNode.image}}
