{ "nodes": [ { "name": "Error Trigger", "type": "n8n-nodes-base.errorTrigger", "position": [ 450, 300 ], "parameters": {}, "typeVersion": 1, "id": "notify-workflow-errors-by-mattermost-and-sms-0" }, { "name": "Mattermost", "type": "n8n-nodes-base.mattermost", "position": [ 650, 300 ], "parameters": { "resource": "message", "operation": "post", "channelId": "YOUR_MATTERMOST_CHANNEL_ID", "message": "={{ `The workflow named '${$json.workflow.name}' with the ID ${$json.workflow.id} has encountered an error. The last executed node was ${$json.execution?.lastNodeExecuted || 'not available'}.` }}", "attachments": [], "otherOptions": {} }, "typeVersion": 1, "id": "notify-workflow-errors-by-mattermost-and-sms-1" }, { "name": "Twilio", "type": "n8n-nodes-base.twilio", "position": [ 900, 300 ], "parameters": { "from": "YOUR_TWILIO_NUMBER", "to": "YOUR_RECIPIENT_NUMBER", "message": "={{ `The workflow named '${$('Error Trigger').first().json.workflow.name}' with the ID ${$('Error Trigger').first().json.workflow.id} has encountered an error.` }}" }, "typeVersion": 1, "id": "notify-workflow-errors-by-mattermost-and-sms-2" } ], "connections": { "Error Trigger": { "main": [ [ { "node": "Mattermost", "type": "main", "index": 0 } ] ] }, "Mattermost": { "main": [ [ { "node": "Twilio", "type": "main", "index": 0 } ] ] } }, "name": "Notify Workflow Errors by Mattermost and SMS", "active": false, "pinData": {} }