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

  1. Create a new workflow: “Engagement or Sentiment”.
  2. Add inputs: Post Upvotes, Post Comment Count, AI Sentiment Score.
  3. Add primitives: two Integer nodes (100, 50) and one Float node (0.8).
  4. Add logic: two Greater Than, one AND, one OR, and Trigger Notification output.
  5. 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
  6. 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