This n8n workflow automates the transformation of spreadsheet data into professional charts and graphs using AI-driven analysis. Triggered via Slack, it processes uploaded files (Excel, CSV, Google Sheets, or Drive links), interprets the data with an AI agent to determine the best visualization type (e.g., bar, line, pie, doughnut, or bubble charts), generates images via QuickChart, uploads them to Google Drive, and delivers the results back to the user in Slack with titles and shareable links. It maintains conversation context in Postgres for seamless multi-turn interactions and handles audio or text inputs for chart requests.
• Users upload spreadsheets or share links via Slack, along with a natural language request (e.g., "Create a bar chart of sales by month").
• The workflow detects file types, extracts and aggregates data, then uses an AI agent to parse the request and select an appropriate chart type.
• Data is formatted and sent to QuickChart's API to generate the visualization image.
• Images are uploaded to Google Drive, and a confirmation message with titles and links is sent back to Slack.
Setup takes about 15-30 minutes, mainly for credential configuration. Detailed node instructions are in the workflow's sticky notes—focus on pasting API keys and testing triggers. Once cloned, the workflow runs plug-and-play; only tweak credentials and optional prompts as needed.
Automate turning uploaded spreadsheets into AI-generated charts (bar, line, pie, etc.) via Slack, with results shared as Google Drive links.
Slack Bot Setup
chat:write
, files:read
, channels:read
.Slack Trigger
node's credentials in n8n.OpenAI API Key
OpenAI
(gpt-4o-mini) node's credentials.Postgres Database Connection
n8n_rodger_chat
for chat history.Postgres
nodes' credentials.Google Sheets & Drive Setup
Google Sheets
and implied Drive upload nodes.QuickChart Integration
HTTP Request
node.Clone the workflow JSON directly into n8n—all nodes (triggers, AI agents, extractors, switches) are pre-wired and ready. No re-setup needed beyond the steps above. Key editable fields (found in sticky notes):
AI Agent Node: System Prompt
Customize the chart interpretation (default: auto-selects bar/line/pie/etc. based on data). Example: Change to prioritize "scatter plots for correlations" if needed.
Switch Nodes (File Detection)
Add rules for new formats (e.g., .ods
for OpenDocument) in the conditions for XLS/XLSX/CSV/Sheets/Drive.
HTTP Request Node (QuickChart)
Tweak chart params like width=800&height=600
for size, or colors via ?chart=...
for branding.
Let User Know Upload Complete: Text
Adjust the confirmation message template for tone (e.g., add emojis or custom phrasing).
Test with a sample Slack message: "Make a line graph from this sales CSV over months." Results appear instantly with links.
This workflow streamlines data viz without coding, perfect for teams analyzing trends on the fly. Questions? Drop a Slack message in your bot channel!