🦀 ClawHub
NotiLens
by @notilens
Send real-time alerts to NotiLens from any script, app, or AI agent — task lifecycle events, errors, completions, metric tracking, and custom alerts.
💡 Examples
Full task lifecycle (queue → start → complete with metrics)
# 1. Queued
curl -s -X POST "https://hook.notilens.com/webhook/$NOTILENS_TOKEN/send" \
-H "Content-Type: application/json" \
-H "X-NOTILENS-KEY: $NOTILENS_SECRET" \
-d '{
"event": "task.queued",
"title": "my-app | data-pipeline | task.queued",
"message": "Data pipeline job queued.",
"type": "info",
"agent": "my-app",
"task_id": "data-pipeline",
"run_id": "run_1714000000000_a3f2"
}'2. Started
curl -s -X POST "https://hook.notilens.com/webhook/$NOTILENS_TOKEN/send" \
-H "Content-Type: application/json" \
-H "X-NOTILENS-KEY: $NOTILENS_SECRET" \
-d '{
"event": "task.started",
"title": "my-app | data-pipeline | task.started",
"message": "Starting nightly data pipeline run.",
"type": "info",
"agent": "my-app",
"task_id": "data-pipeline",
"run_id": "run_1714000000000_a3f2",
"meta": { "queue_ms": 1240 }
}'3. Completed with metrics
curl -s -X POST "https://hook.notilens.com/webhook/$NOTILENS_TOKEN/send" \
-H "Content-Type: application/json" \
-H "X-NOTILENS-KEY: $NOTILENS_SECRET" \
-d '{
"event": "task.completed",
"title": "my-app | data-pipeline | task.completed",
"message": "Pipeline finished. Processed 4,218 records in 47s.",
"type": "success",
"agent": "my-app",
"task_id": "data-pipeline",
"run_id": "run_1714000000000_a3f2",
"meta": {
"total_duration_ms": 47200,
"active_ms": 45800,
"rows_processed": 4218,
"rows_failed": 0,
"env": "production"
}
}'
Task failed with counters
curl -s -X POST "https://hook.notilens.com/webhook/$NOTILENS_TOKEN/send" \
-H "Content-Type: application/json" \
-H "X-NOTILENS-KEY: $NOTILENS_SECRET" \
-d '{
"event": "task.failed",
"title": "my-app | data-pipeline | task.failed",
"message": "Database connection timed out after 3 retries.",
"type": "urgent",
"agent": "my-app",
"task_id": "data-pipeline",
"run_id": "run_1714000000000_a3f2",
"is_actionable": true,
"meta": {
"total_duration_ms": 92000,
"active_ms": 88000,
"retry_count": 3,
"error_count": 3,
"last_error": "connect ETIMEDOUT 10.0.0.5:5432"
}
}'
Pause and resume with timing
# Pausing (e.g. hit rate limit)
curl -s -X POST "https://hook.notilens.com/webhook/$NOTILENS_TOKEN/send" \
-H "Content-Type: application/json" \
-H "X-NOTILENS-KEY: $NOTILENS_SECRET" \
-d '{
"event": "task.paused",
"title": "my-app | api-sync | task.paused",
"message": "Rate limit hit — waiting 30s before resuming.",
"type": "warning",
"agent": "my-app",
"task_id": "api-sync",
"run_id": "run_1714000000000_b7c1",
"meta": { "pause_count": 1, "wait_reason": "rate_limit" }
}'Resuming
curl -s -X POST "https://hook.notilens.com/webhook/$NOTILENS_TOKEN/send" \
-H "Content-Type: application/json" \
-H "X-NOTILENS-KEY: $NOTILENS_SECRET" \
-d '{
"event": "task.resumed",
"title": "my-app | api-sync | task.resumed",
"message": "Resuming after rate limit window.",
"type": "info",
"agent": "my-app",
"task_id": "api-sync",
"run_id": "run_1714000000000_b7c1",
"meta": { "pause_ms": 31200, "pause_count": 1 }
}'
Human input required
curl -s -X POST "https://hook.notilens.com/webhook/$NOTILENS_TOKEN/send" \
-H "Content-Type: application/json" \
-H "X-NOTILENS-KEY: $NOTILENS_SECRET" \
-d '{
"event": "input.required",
"title": "my-app | approval needed",
"message": "About to delete 83 records. Please confirm.",
"type": "warning",
"agent": "my-app",
"is_actionable": true,
"open_url": "https://dashboard.example.com/approve/123"
}'
Output generated (with download link)
curl -s -X POST "https://hook.notilens.com/webhook/$NOTILENS_TOKEN/send" \
-H "Content-Type: application/json" \
-H "X-NOTILENS-KEY: $NOTILENS_SECRET" \
-d '{
"event": "output.generated",
"title": "my-app | report-gen | output.generated",
"message": "Monthly report ready. 24 pages, 3 charts.",
"type": "success",
"agent": "my-app",
"task_id": "report-gen",
"download_url": "https://storage.example.com/reports/2026-04.pdf",
"meta": {
"pages": 24,
"charts": 3,
"total_duration_ms": 18400
}
}'
⚙️ Configuration
Set these environment variables before running:
export NOTILENS_TOKEN=your_topic_token
export NOTILENS_SECRET=your_topic_secret
Both are found in your topic settings at https://www.notilens.com.
TERMINAL
clawhub install notilens