Day 4 — Implementing Intelligent Alerts_Updated
Day 4 — Implementing Intelligent Alerts_Updated
This commit is contained in:
@@ -1,30 +1,28 @@
|
|||||||
# 📅 Day 4 — Implementing Intelligent Alerts
|
# 📅 Day 4 — Implementing Intelligent Alerts
|
||||||
|
|
||||||
## 🎯 Goal
|
## 🎯 Goal
|
||||||
Make the workflow proactive — detect issues automatically and notify the right people.
|
Make the workflow proactive — detect critical issues and send immediate alerts.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🧩 Tasks
|
## 🧩 Tasks
|
||||||
|
|
||||||
### 1. Branch the Workflow
|
### 1. Branch the Workflow
|
||||||
- After the Python node, create two branches:
|
- After Python node, split into two paths:
|
||||||
- One for **reporting/storage**.
|
- **Reporting/Storage**
|
||||||
- One for **alerts**.
|
- **Alerts**
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### 2. Define Alerting Logic
|
### 2. Define Alerting Logic
|
||||||
- Add an **If Node**.
|
- Add **If Node** with conditions:
|
||||||
- Configure the following conditions:
|
|
||||||
- `avg_sentiment_score < -0.4`
|
- `avg_sentiment_score < -0.4`
|
||||||
- `num_negative_reviews > 5`
|
- `num_negative_reviews > 5`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### 3. Craft Alert Message
|
### 3. Craft Alert Message
|
||||||
- Add a **Set Node** on the “True” branch.
|
- Add a **Set Node** on the True branch:
|
||||||
- Example:
|
|
||||||
🚨 URGENT: Negative Sentiment Spike!
|
🚨 URGENT: Negative Sentiment Spike!
|
||||||
Product: {{ $json.product_name }}
|
Product: {{ $json.product_name }}
|
||||||
Avg Sentiment: {{ $json.avg_sentiment_score }}
|
Avg Sentiment: {{ $json.avg_sentiment_score }}
|
||||||
@@ -36,13 +34,17 @@ Copy code
|
|||||||
---
|
---
|
||||||
|
|
||||||
### 4. Configure Alert Notification
|
### 4. Configure Alert Notification
|
||||||
- Add a **Slack Node** connected to the alert.
|
- Add **Slack Node** connected to alert message.
|
||||||
- Send the alert to a **high-priority channel** like `#ecommerce-alerts`.
|
- Send to **high-priority channel** (`#ecommerce-alerts`) with `@channel` mentions.
|
||||||
- Optionally, tag users (`@channel`) for instant visibility.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## ✅ Deliverable
|
## ✅ Deliverable
|
||||||
A proactive alerting system that:
|
- Workflow detects predefined issues.
|
||||||
- Detects negative sentiment or unusual review spikes.
|
- Sends urgent alerts separately from daily summary.
|
||||||
- Sends urgent alerts directly to Slack.
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 💡 Solution
|
||||||
|
- Proactive monitoring is in place.
|
||||||
|
- Stakeholders receive alerts for anomalies immediately.
|
||||||
Reference in New Issue
Block a user