n8n
Add a NotiLens HTTP Request node to any n8n workflow to fire notifications when automations run, fail, or complete.
What This Integration Does
Add a HTTP Request node to any n8n workflow and point it at your NotiLens webhook URL. Every time the workflow runs — or fails — NotiLens receives the event and notifies you instantly.
Works with any n8n trigger: schedule, webhook, app event, or manual execution. No credentials to manage beyond your NotiLens webhook URL.
Why Use NotiLens with n8n?
n8n's built-in error emails are delayed and easy to miss. NotiLens fires within 60 seconds of a workflow failure, detects trigger silence, and tracks execution volume — so you know immediately when your automations break.
How to Connect n8n to NotiLens
1. Get your NotiLens webhook URL
- Open the NotiLens dashboard and select or create a Custom Topic.
- Copy the webhook URL:
https://hook.notilens.com/webhook/<topic_id>/send
2. Add an HTTP Request node in n8n
- Open your workflow in n8n.
- Add a new HTTP Request node after the step you want to monitor.
- Set the following options:
Method: POST URL: https://hook.notilens.com/webhook/<topic_id>/send Body Type: JSON Content-Type: application/json
3. Map your notification fields
In the Body Parameters section, add the fields you want to send. At minimum, title and message are required. You can map n8n expression values directly:
{
"title": "Workflow: {{ $workflow.name }} completed",
"message": "Executed at {{ $now }} — items processed: {{ $items.length }}",
"type": "success",
"event": "workflow.completed",
"meta": {
"workflow_id": "{{ $workflow.id }}",
"execution_id": "{{ $execution.id }}"
}
}
4. (Optional) Add an error handler node
To catch workflow failures, use n8n's Error Trigger node as a separate workflow:
- Create a new workflow with the Error Trigger as the start node.
- Add an HTTP Request node pointing to NotiLens.
- Map
{{ $json.execution.error.message }}to the message field. - Set
typetourgent.
{
"title": "n8n workflow failed: {{ $json.workflow.name }}",
"message": "{{ $json.execution.error.message }}",
"type": "urgent",
"event": "workflow.failed",
"meta": {
"workflow_id": "{{ $json.workflow.id }}",
"execution_id": "{{ $json.execution.id }}"
},
"force_send": true
}
5. Test and activate
- Click Execute Workflow to test.
- Confirm the notification appears in the NotiLens app.
- Activate the workflow.
That's it — n8n will now send notifications to NotiLens on every execution or failure.
Webhook Payload Format
Send a POST request with a JSON body.
Only title and message are required.
All requests must use Content-Type: application/json.
| Field | Required | Type | Description |
|---|---|---|---|
title | Yes | string | Short notification heading |
message | Yes | string | Main notification content |
type | No | string | info success warning urgent |
event | No | string | Logical event identifier, e.g. workflow.failed |
image_url | No | URL | Image to display in the notification |
open_url | No | URL | URL to open when notification is tapped |
download_url | No | URL | Download file link |
tags | No | string | Comma-separated tags, e.g. n8n,production |
meta | No | JSON | Structured data — workflow ID, execution ID, node name, etc. |
is_actionable | No | boolean | If true, repeated notifications until acknowledged |
force_send | No | boolean | Bypass ML filtering and deliver immediately. Default true for failures. |
Common n8n Events
| Event | Type | When to use |
|---|---|---|
workflow.completed | success | Workflow executed successfully |
workflow.failed | urgent | Workflow error — use with Error Trigger node |
workflow.started | info | Long-running workflow began |
node.error | urgent | Specific node failed (HTTP, DB, API) |
data.processed | info | Batch processing completed — include item count in meta |
schedule.missed | warning | Scheduled workflow didn't fire on time |
Tracking Metrics for Anomaly Detection
Pass numeric values in the meta field alongside your event.
NotiLens learns your baseline over time and alerts when values deviate — spikes, drops,
or unusual patterns — without you needing to set manual thresholds.
Common metrics to track
| Metric | What it detects | Example value |
|---|---|---|
duration_ms | Workflows suddenly taking much longer — API slowdowns, DB timeouts | 4823 |
amount | Revenue spikes or drops — payment anomalies, refund surges | 149.99 |
record_count | Batch size deviations — unusually small or large data sets | 1542 |
error_count | Error rate spikes in a workflow run | 7 |
retry_count | Elevated retries signal upstream API instability | 3 |
items_skipped | Unexpected data gaps — filters dropping more records than normal | 84 |
api_latency_ms | Third-party API degradation affecting your workflow | 2100 |
queue_depth | Backlog buildup — workflow not keeping up with incoming volume | 312 |
Example — payment workflow with metrics
{
"title": "Payment workflow completed",
"message": "{{ $items.length }} payments processed",
"type": "success",
"event": "payments.processed",
"meta": {
"duration_ms": "{{ $execution.duration }}",
"record_count": "{{ $items.length }}",
"amount": "{{ $json.total_amount }}",
"error_count": "{{ $json.failed_count }}",
"items_skipped": "{{ $json.skipped_count }}"
}
}
Example — data sync with latency tracking
{
"title": "CRM sync completed",
"message": "{{ $items.length }} contacts synced in {{ $execution.duration }}ms",
"type": "success",
"event": "crm.sync",
"meta": {
"duration_ms": "{{ $execution.duration }}",
"record_count": "{{ $items.length }}",
"api_latency_ms": "{{ $json.hubspot_response_time }}",
"retry_count": "{{ $json.retries }}"
}
}