Codelab — Build a Notification Flow
In this codelab, you will build a workflow that triggers on high engagement or strong positive sentiment.
Prerequisites
- Access to the Notifications editor
- Basic familiarity with nodes and connections
What you’ll build
Trigger when (upvotes > 100 AND comments > 50) OR sentiment > 0.8.
Steps
- Create a new workflow: “Engagement or Sentiment”.
- Add inputs:
Post Upvotes,Post Comment Count,AI Sentiment Score. - Add primitives: two
Integernodes (100, 50) and oneFloatnode (0.8). - Add logic: two
Greater Than, oneAND, oneOR, andTrigger Notificationoutput. - Wire connections:
- Upvotes → GreaterThan1.A; Integer(100) → GreaterThan1.B
- Comments → GreaterThan2.A; Integer(50) → GreaterThan2.B
- GreaterThan1.Result AND GreaterThan2.Result → AND.A/B
- Sentiment → GreaterThan3.A; Float(0.8) → GreaterThan3.B
- AND.Result and GreaterThan3.Result → OR.A/B
- OR.Result → Trigger.Condition
- Save and test with sample payloads.
Test scenarios
=== High sentiment
```json
{"upvotes": 50, "comment_count": 5, "ai_sentiment": 0.9}
=== Neither (no trigger)
{"upvotes": 20, "comment_count": 3, "ai_sentiment": 0.1}
> [!WARNING]
> Ensure no cycles are introduced; the engine rejects cyclic graphs.
## Next steps
- Add deltas/rates for early growth detection
- Use Node Focus to analyze thresholds over time
- Explore the advanced samples