Skip to main content

Send sales forecast charts and answer Q&A on WhatsApp with OpenAI

Workflow preview

Workflow preview
100%
Send sales forecast charts and answer Q&A on WhatsApp with OpenAI preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

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, Regre...

Best for

  • CRM automation workflows
  • AI Chatbot automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.scheduletrigger, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.set, n8n-nodes-base.code, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.whatsapp, n8n-nodes-base.googlesheets

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Lee Lin.

Original n8n.io source

1.1 Workflow description

Title
Send sales forecast charts and answer Q&A on WhatsApp with OpenAI
Workflow name
Send sales forecast charts and answer Q&A on WhatsApp with OpenAI

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 scientifically selects the winner with the lowest error rate.

2. The Data Analyst:

  • Interpret: The AI Agent takes the mathematical output and translates it into business insights, assigning confidence scores based on error margins.
  • Report: Generates a visual trend chart (PNG) and sends a complete briefing to your phone.

Bottom Branch Workflow

3. The Consultant: AI Agent 2 handles the follow-up questions. It pulls the latest analysis context and checks historical rate data to give an informed answer.

  • Recall: When you ask a question via WhatsApp, the bot retrieves the saved forecast state.
  • Answer: It acts as an on-demand analyst, comparing current forecasts against historical actuals to give you instant answers.

Setup Steps

  1. Google Sheet: Prepare columns: Year, Month, Sales. Map the Sheet ID in the "Workflow Configuration" node.
  2. Forecast Engine: No config needed. It automatically detects seasonality vs. linear trends.
  3. Database: Create a table latest_forecast to store the JSON output.
  4. Credentials: Connect Google Sheets, OpenAI, and WhatsApp

Use Cases & Benefits

For Business Owners: Gain enterprise-grade forecasting on autopilot. Always have a sophisticated financial outlook running in the background 24/7.

For Sales Leaders: Get immediate visibility into future revenue trends. Bypass the wait for end-of-month manual reports and get a strategic "pulse check" delivered instantly to your phone.

🤖Virtual Data Team: Instantly add the capabilities of a Data Scientist and Data Analyst to your business or division. It works alongside your existing team to handle the heavy lifting, or stands in as your dedicated automated department.

đź§ Precision & Trust: Combines the best of both worlds: rigorous, deterministic code for the math (no hallucinations) and advanced AI for the strategic explanation. You get numbers you can trust with context you can use.

⚡Decision-Ready Insights: Stop digging through dashboards. High-level intelligence is pushed directly to you on WhatsApp, allowing you to make faster, data-driven decisions from anywhere.

📬 Want to Customize This?

[email protected]

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Monthly Schedule

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.3

Block 2 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 3 - Workflow Configuration

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 4 - Forecast Engine

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 5 - Data Cleaning

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 6 - OpenAI Chat Model1

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 7 - OpenAI Chat Model2

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.3

Block 8 - Q&A AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3

Block 9 - Normalize Whatsapp Input

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 10 - Q&A Message

Type / Role
n8n-nodes-base.whatsApp - whatsApp
Config choices
Version 1.1

Block 11 - Get Sales Data

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 12 - QuickChart

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.3

Block 13 - Upsert Latest Forecast

Type / Role
n8n-nodes-base.dataTable - dataTable
Config choices
Version 1

Block 14 - Get Latest Forecast

Type / Role
n8n-nodes-base.dataTable - dataTable
Config choices
Version 1

Block 15 - Parsing Input

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 16 - WhatsApp Trigger

Type / Role
n8n-nodes-base.whatsAppTrigger - whatsAppTrigger
Config choices
Version 1

Block 17 - Sticky Note15

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 18 - Sticky Note17

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 19 - Sticky Note18

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 22 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Analyst AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 3

Block 24 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Showing the first 24 of 31 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Send sales forecast charts and answer Q&A on WhatsApp with OpenAI
Complexity advanced
Nodes 31
Categories CRM, AI Chatbot
Author Lee Lin
Published 30 Dec 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/12289/12289.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Send sales forecast charts and answer Q&A on WhatsApp with OpenAI do?

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, Regre...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your CRM, AI Chatbot use case.