Error Trigger Node
Start a separate error-handling workflow automatically when any node in your main workflow throws a non-retriable error. Use it to alert your team, log the failure, and recover gracefully.
How It Works
- Add an Error Trigger node as the first node in a dedicated error-handling workflow
- When any node in any other workflow throws a
NonRetriableError, Nodebase automatically fires this trigger - The error details (node name, error message, workflow ID) are injected into context
- Downstream nodes in the error workflow can alert your team, create a support ticket, or send a notification
The Error Trigger fires for non-retriable errors only. Transient errors (network timeouts, rate limits) are automatically retried by Inngest before the Error Trigger fires.
Output Variables
| Variable | Type | Description | Example |
|---|---|---|---|
{{errorTrigger.message}} | string | The error message from the failed node | "Invalid API key" |
{{errorTrigger.failedNodeName}} | string | Human-readable name of the node that failed | "Shiprocket - Create Order" |
{{errorTrigger.failedNodeId}} | string | Internal node ID | "node_abc123" |
{{errorTrigger.failedNodeType}} | string | Node type identifier | "SHIPROCKET" |
{{errorTrigger.failedAt}} | string | ISO timestamp of the failure | "2026-04-01T10:30:00.000Z" |
{{errorTrigger.workflowId}} | string | ID of the workflow that failed | "wf_xyz789" |
{{errorTrigger.executionId}} | string | ID of the specific execution that failed | "exec_def456" |
Complete Workflow Examples
Slack Error Alert
Use case: Alert the engineering team on Slack whenever any workflow node fails.
textWorkflow
Error Trigger
→ Slack — Send Message
channel: #alerts
text: "🚨 *Workflow Error*
*Node:* {{errorTrigger.failedNodeName}} ({{errorTrigger.failedNodeType}})
*Error:* {{errorTrigger.message}}
*Workflow:* {{errorTrigger.workflowId}}
*Execution:* {{errorTrigger.executionId}}
*Time:* {{errorTrigger.failedAt}}"Multi-Channel Error Notification
Use case: For critical payment workflow failures, alert both Slack and email.
textWorkflow
Error Trigger
→ If / Else
Condition: {{errorTrigger.failedNodeType}} equals "RAZORPAY"
TRUE → Gmail — Send Email
to: tech@yourcompany.com
subject: "CRITICAL: Razorpay node failed"
body: "Error: {{errorTrigger.message}}
Execution: {{errorTrigger.executionId}}"
→ Slack — Send Message
channel: #critical-alerts
text: "🔴 CRITICAL: Razorpay failure! {{errorTrigger.message}}"
FALSE → Slack — Send Message
channel: #alerts
text: "⚠️ {{errorTrigger.failedNodeName}} failed: {{errorTrigger.message}}"Log Errors to Google Sheets
Use case: Maintain a full error log for compliance and debugging.
textWorkflow
Error Trigger
→ Google Sheets — Append Row
spreadsheetId: {{env.ERROR_LOG_SHEET_ID}}
values:
- timestamp: {{errorTrigger.failedAt}}
- workflowId: {{errorTrigger.workflowId}}
- executionId: {{errorTrigger.executionId}}
- nodeName: {{errorTrigger.failedNodeName}}
- nodeType: {{errorTrigger.failedNodeType}}
- errorMessage: {{errorTrigger.message}}Common Issues & Solutions
| Issue | Cause | Solution |
|---|---|---|
| Error Trigger not firing | Error is retriable — Inngest is still retrying | Error Trigger only fires for NonRetriableError after all retries are exhausted |
| Error Trigger workflow itself fails | Misconfigured Slack/Gmail in the error workflow | Test your error workflow manually before relying on it in production |
| Too many Slack messages | High-traffic workflow with frequent errors | Add If/Else to only alert for specific node types, or add a Wait node to debounce |
Related Nodes
- Slack — send error alerts to your team channel
- Gmail — email critical error details to the dev team
- If / Else — route on
{{errorTrigger.failedNodeType}}for different alert levels - Google Sheets — log errors for long-term audit trail