{
  "name": "YAG ejemplo educativo - error workflow seguro",
  "nodes": [
    {
      "parameters": {},
      "id": "e310d3bd-d753-4974-8875-f6ea6a8f0993",
      "name": "Error Trigger",
      "type": "n8n-nodes-base.errorTrigger",
      "typeVersion": 1,
      "position": [-320, 0]
    },
    {
      "parameters": {
        "jsCode": "const execution = $json.execution ?? {};\nconst workflow = $json.workflow ?? {};\nreturn [{ json: {\n  workflowName: String(workflow.name ?? 'workflow sin nombre'),\n  executionId: String(execution.id ?? 'sin id'),\n  lastNode: String(execution.lastNodeExecuted ?? 'desconocido'),\n  errorType: String(execution.error?.name ?? 'Error'),\n  errorMessage: String(execution.error?.message ?? 'Error sin mensaje').slice(0, 500),\n  occurredAt: new Date().toISOString(),\n  actionRequired: true\n} }];"
      },
      "id": "cbfb858f-b31e-47f9-b23e-7030895584c2",
      "name": "Preparar aviso sin secretos",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [-60, 0]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "38eb8a13-b5a7-480d-81cf-f288c1ec567b",
              "name": "instruccion",
              "value": "Conecta aquí tu canal de alertas y revisa permisos, destinatarios y datos antes de activar.",
              "type": "string"
            }
          ]
        },
        "includeOtherFields": true,
        "options": {}
      },
      "id": "be2ed36b-0ce1-48c2-908f-a0a6503f0bb0",
      "name": "Punto de conexión del aviso",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [200, 0]
    }
  ],
  "pinData": {},
  "connections": {
    "Error Trigger": {
      "main": [[{"node": "Preparar aviso sin secretos", "type": "main", "index": 0}]]
    },
    "Preparar aviso sin secretos": {
      "main": [[{"node": "Punto de conexión del aviso", "type": "main", "index": 0}]]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "fb834c62-84f2-4dfb-80a8-44d73b6134b7",
  "meta": {
    "templateCredsSetupCompleted": false,
    "instanceId": "educational-yag"
  },
  "tags": []
}
