Send sales forecast charts and answer Q&A on WhatsApp with OpenAI
Ready for 3.0What this workflow does
This AI workflow has 23 nodes and runs on a schedule (every month at 09:00) (plus 1 other trigger). Along the way it connects OpenAI Chat Model, WhatsApp Business Cloud and Google Sheets. It also calls quickchart.io over HTTP.
How it runs
Trigger: On a schedule (every month at 09:00) (plus 1 other trigger).
- Workflow Configuration (Edit Fields (Set)): sets 2 fields: spreadsheetId, sheetName
- Filter Text Messages (If): checks a condition and branches into true / false
- Get Sales Data (Google Sheets): uses Google Sheets
- Normalize Whatsapp Input (Edit Fields (Set)): sets 1 field: chatInput
- Data Cleaning (Code): runs custom JavaScript code
- Get Latest Forecast (Data table): get
- Combine Data for Chart (Merge): merges the data from its input branches
- Forecast Engine (Code): runs custom JavaScript code
- Parsing Input (Code): runs custom JavaScript code
- Prepare Chart Config (Code): runs custom JavaScript code
…plus 7 more steps. See the full node list below.
Services it uses
HTTP calls to: quickchart.io
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (14)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - AI Agent
@n8n/n8n-nodes-langchain.agent - WhatsApp Business Cloud
n8n-nodes-base.whatsApp - Google Sheets
n8n-nodes-base.googleSheets - HTTP Request
n8n-nodes-base.httpRequest - Data table
n8n-nodes-base.dataTable - WhatsApp Trigger
n8n-nodes-base.whatsAppTrigger - If
n8n-nodes-base.if - Merge
n8n-nodes-base.merge - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow
From the author
How It Works Top Branch Workflow 1. The Data Scientist: - Ingest: Pulls historical sales data from Google Sheets. - Math Engine: Runs 7 statistical algorithms (e.g., Seasonal Naive, Linear Trend, Regression). It backtests them against your history and…