The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"updatedAt": "2026-07-14T21:06:43.270Z",
"createdAt": "2026-07-14T21:06:43.270Z",
"name": "Mala Direta - Tratamento de Erros (portfolio)",
"description": null,
"active": false,
"isArchived": false,
"nodes": [
{
"parameters": {},
"type": "n8n-nodes-base.errorTrigger",
"typeVersion": 1,
"position": [
-500,
0
],
"name": "Erro do Workflow"
},
{
"parameters": {
"jsCode": "\nconst e=$json||{},now=new Date().toISOString();\nconst exec=e.execution||{},wf=e.workflow||{},tr=e.trigger||{};\nconst err=exec.error||e.error||{};\nreturn [{json:{error_id:'err_'+Date.now().toString(36)+'_'+Math.random().toString(36).slice(2,7),workflow_name:String(wf.name||''),node_name:String(exec.lastNodeExecuted||err.node?.name||''),message:String(err.message||err.description||'Erro sem mensagem'),execution_id:String(exec.id||''),campaign_id:String(exec.data?.campaign_id||''),email:String(exec.data?.email||''),status:'pending',created_at:now,resolved_at:''}}];\n"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-250,
0
],
"name": "Preparar Registro de Erro"
},
{
"parameters": {
"operation": "insert",
"dataTableId": {
"__rl": true,
"mode": "name",
"value": "mdv_errors"
},
"columns": {
"mappingMode": "autoMapInputData",
"value": null
},
"options": {
"optimizeBulk": false
}
},
"type": "n8n-nodes-base.dataTable",
"typeVersion": 1.1,
"position": [
0,
0
],
"name": "Registrar Erro na Data Table"
},
{
"parameters": {
"content": "# Mala Direta \u2014 Tratamento de Erros\n\nEste workflow \u00e9 usado pelo workflow principal em **Settings \u2192 Error workflow**.\n\nEle recebe erros autom\u00e1ticos e grava:\n\n- workflow;\n- node;\n- mensagem;\n- execu\u00e7\u00e3o;\n- campanha/e-mail quando dispon\u00edveis;\n- data;\n- status pendente/resolvido.\n\nO Error Trigger n\u00e3o dispara em testes manuais. Ele funciona quando uma execu\u00e7\u00e3o autom\u00e1tica do workflow principal falha.",
"height": 240,
"width": 1050,
"color": 3
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-650,
-260
],
"name": "README \u2014 Tratamento de Erros"
}
],
"connections": {
"Erro do Workflow": {
"main": [
[
{
"node": "Preparar Registro de Erro",
"type": "main",
"index": 0
}
]
]
},
"Preparar Registro de Erro": {
"main": [
[
{
"node": "Registrar Erro na Data Table",
"type": "main",
"index": 0
}
]
]
}
},
"settings": {
"executionOrder": "v1",
"timezone": "America/Sao_Paulo"
},
"staticData": null,
"nodeGroups": [],
"versionCounter": 1,
"sourceWorkflowId": null,
"tags": [],
"versionMetadata": {
"name": "Version 87b5e6bd",
"description": ""
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Mala Direta - Tratamento de Erros (portfolio). Uses errorTrigger, dataTable. Event-driven trigger; 4 nodes.
Source: https://github.com/Mayconxzdev/MalaDireta/blob/main/workflow/mala-direta-erros.portfolio.json — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow provides a reusable error handling, audit logging, and observability pattern for n8n workflows using two n8n custom Data Tables: and .
Reagendamiento. Uses executeWorkflowTrigger, redis, n8n-nodes-evolution-api, dataTable. Event-driven trigger; 73 nodes.
Agendamiento. Uses n8n-nodes-evolution-api, redis, dataTable, executeWorkflowTrigger. Event-driven trigger; 60 nodes.
Cancelacion. Uses executeWorkflowTrigger, redis, n8n-nodes-evolution-api, dataTable. Event-driven trigger; 36 nodes.
This workflow automatically handles errors in your n8n workflows by: Detecting when an error occurs and capturing the error details Sending an email notification with the error message and affected no