132 lines
4.1 KiB
Markdown
132 lines
4.1 KiB
Markdown
# 🧠 Automated E-Commerce Performance & Sentiment Analysis Dashboard
|
||
|
||
## 🎯 Project Overview
|
||
This project automates the process of analyzing **sales performance** and **customer sentiment** by combining:
|
||
- **Python** – for data cleaning, aggregation, and sentiment analysis.
|
||
- **n8n** – for workflow automation, integration, and notifications.
|
||
|
||
The goal is to deliver **real-time, actionable insights** to business stakeholders.
|
||
|
||
---
|
||
|
||
## 💼 Business Goal
|
||
To automatically track:
|
||
- Which products are performing well.
|
||
- What customers feel about them.
|
||
- When there’s a sudden drop in sales or rise in negative reviews.
|
||
|
||
This enables teams to respond quickly to business or customer issues.
|
||
|
||
---
|
||
|
||
## 🧰 Tools Used
|
||
|
||
| Tool | Purpose |
|
||
|------|----------|
|
||
| **n8n** | Automates data fetching, scheduling, and notifications. |
|
||
| **Python** | Handles data processing and sentiment analysis using NLP. |
|
||
| **Google Sheets / Database** | Stores analyzed data for reporting or dashboards. |
|
||
| **Slack / Email** | Delivers automated summaries and alerts. |
|
||
|
||
---
|
||
|
||
## 🔄 Workflow Overview
|
||
|
||
[Start: Cron Node]
|
||
↓
|
||
[Fetch Sales Data: HTTP/DB Node]
|
||
↓
|
||
[Fetch Reviews: HTTP Node]
|
||
↓
|
||
[Execute Python Script]
|
||
↓
|
||
[Store Data: Google Sheets/DB Node]
|
||
↓
|
||
[Send Report: Slack/Email Node]
|
||
↳ [If Node: Alert on Issues]
|
||
|
||
|
||
|
||
---
|
||
|
||
## ⚙️ Step-by-Step Process
|
||
|
||
### **1. Data Ingestion**
|
||
- **Cron Node**: Triggers workflow daily (e.g., every morning at 3 AM).
|
||
- **HTTP/DB Node**: Pulls sales data (e.g., order ID, product, quantity, price).
|
||
- **HTTP Node**: Fetches customer reviews (e.g., rating, review text).
|
||
- **Merge Node**: Combines both datasets.
|
||
|
||
**Example:**
|
||
Sales data → 500 daily transactions
|
||
Reviews data → 120 new reviews fetched via API.
|
||
|
||
---
|
||
|
||
### **2. Data Processing & Sentiment Analysis**
|
||
- **Python Node** cleans, aggregates, and analyzes the merged data:
|
||
- Cleans missing or duplicate records.
|
||
- Calculates total revenue, units sold, and average sentiment per product.
|
||
- Uses **VADER** sentiment analysis to categorize reviews as *Positive*, *Neutral*, or *Negative*.
|
||
|
||
**Example Output:**
|
||
|
||
| Product | Revenue | Units Sold | Avg Sentiment | Negative Reviews |
|
||
|----------|----------|-------------|----------------|------------------|
|
||
| SmartWatch X2 | $15,000 | 120 | 0.78 | 2 |
|
||
| Wireless Charger Mini | $8,500 | 70 | -0.32 | 8 |
|
||
|
||
---
|
||
|
||
### **3. Data Storage & Reporting**
|
||
- **Google Sheets / Database Node**: Saves processed data for dashboarding (e.g., in Looker Studio or Tableau).
|
||
- **Slack / Email Node**: Sends a daily report.
|
||
|
||
**Example Slack Message:**
|
||
> 📊 *Daily E-commerce Report (Oct 6, 2025)*
|
||
> Top Product: **SmartWatch X2** – $15,000 in revenue
|
||
> Most Negative Reviews: **Wireless Charger Mini** (8 negative reviews)
|
||
|
||
---
|
||
|
||
### **4. Automated Alerts**
|
||
- **If Node** checks conditions:
|
||
- Sentiment score < -0.5
|
||
- >10 negative reviews
|
||
- >50% drop in revenue compared to yesterday
|
||
|
||
If triggered, a **Slack/Twilio alert** is sent.
|
||
|
||
**Example Alert:**
|
||
> ⚠️ *Alert:* Product **Wireless Charger Mini** sentiment dropped to -0.65 with 12 new negative reviews.
|
||
|
||
---
|
||
|
||
## 📂 Data Sources
|
||
|
||
| Data Type | Example Source | Connection Method |
|
||
|------------|----------------|------------------|
|
||
| **Sales Data** | Shopify / WooCommerce | API or SQL |
|
||
| **Product Reviews** | Store API / Trustpilot | HTTP Request |
|
||
| **Storage** | Google Sheets / PostgreSQL | API or DB connection |
|
||
| **Notifications** | Slack / Email | n8n integration |
|
||
|
||
---
|
||
|
||
## ✅ Summary
|
||
|
||
| Role | Tool | Description |
|
||
|------|------|--------------|
|
||
| **Workflow Automation** | n8n | Handles scheduling, API calls, and alerts. |
|
||
| **Data Analysis** | Python | Cleans and processes data; performs sentiment analysis. |
|
||
| **Storage & Dashboards** | Google Sheets / DB | Maintains daily summary records. |
|
||
| **Reporting** | Slack / Email | Shares reports and alerts with stakeholders. |
|
||
|
||
---
|
||
|
||
## 🚀 Outcome
|
||
A fully automated system that:
|
||
- Fetches and analyzes e-commerce data daily.
|
||
- Tracks both **sales trends** and **customer sentiment**.
|
||
- Sends **visualized reports** and **alerts** automatically — saving time and improving response to performance issues.
|