{
  "name": "Logixb2b — Checklist seguridad n8n empresa",
  "meta": {
    "templateCredsSetupCompleted": false,
    "description": "Lunes 09:00 Europe/Madrid: envía a Ops el checklist semanal de seguridad self-hosted (HTTPS, encryption key, backups, users, firewall) por Slack."
  },
  "settings": {
    "executionOrder": "v1",
    "timezone": "Europe/Madrid"
  },
  "active": false,
  "pinData": {},
  "tags": [
    {
      "name": "Logixb2b"
    },
    {
      "name": "recursos"
    },
    {
      "name": "seguridad"
    },
    {
      "name": "ops"
    }
  ],
  "nodes": [
    {
      "id": "sticky-instrucciones-logix",
      "name": "INSTRUCCIONES (conectar + VPS)",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -480,
        40
      ],
      "parameters": {
        "content": "## INSTRUCCIONES — Checklist seguridad n8n empresa\n\n**Recurso:** `/recursos/seguridad-n8n-checklist-empresa`\n**Guía:** /seguridad-n8n-self-hosted-checklist-empresas\n**Zona:** Europe/Madrid · `active: false` al importar (tú lo activas).\n\n### 1) Importar\n1. n8n → ⋯ → **Import from File** → este JSON.\n2. El flujo llega **inactive**. No pegues secretos en el lienzo ni en el archivo.\n\n### 2) Credenciales y configuración por nodo\n- **Lunes 09:00** (`schedule`): sin credencial. Revisa expresión cron / intervalo y zona **Europe/Madrid** (settings del workflow). Solo dispara si n8n está **Active** 24/7.\n- **Config checklist seguridad** (`Set` Config): **no lleva credencial**. Aquí van URLs/placeholders (`REEMPLAZA_*`, `example.com`, `TU-CRM`). Sustituye todos antes de Active.\n- **Armar mensaje Ops** (`Set`): sin credencial. Revisa expresiones `={{ }}` y campos de salida.\n- **Slack — checklist Ops** (`HTTP Request` → Slack/Teams): crea Incoming Webhook en Slack (o Adaptive Card URL en Teams). Pega la URL en **Config** o en este nodo. Auth: none (la URL ya es secreta).\n- **Email/webhook Ops (opcional)** (`HTTP Request`): abre el nodo → Authentication → elige **Header Auth / OAuth2 / Generic** según el destino. Sustituye URL de ejemplo. Activa \"Continue on Fail\" solo si el diseño lo pide.\n\n### 3) Orden recomendado de puesta en marcha\n1. Rellena el nodo **Config** (URLs reales, umbrales, webhooks de Slack).\n2. Crea Credentials en n8n (candado de cada nodo HTTP / Sheets / OpenAI) y **enlázalas**.\n3. Ejecuta **una vez** (Manual / Test URL del Webhook / \"Execute workflow\").\n4. Verifica CRM + Slack/Sheets (y que la IA no escriba en producción sin HITL).\n5. Solo entonces: interruptor **Active**.\n\n### 4) Producción 24/7 en VPS (UE)\nImportar en localhost no basta: webhooks y cron necesitan n8n encendido.\n\n1. VPS en UE (Hetzner/OVH/IONOS…) + Docker Compose + **Postgres** + HTTPS (Caddy/Nginx).\n2. Variables mínimas: `GENERIC_TIMEZONE=Europe/Madrid`, `WEBHOOK_URL=https://n8n.tudominio.com/`, `N8N_ENCRYPTION_KEY`, `N8N_HOST` / `N8N_PROTOCOL=https`.\n3. Firewall: solo 80/443 (+ SSH). Backups del volumen Postgres + export de workflows.\n4. Importa este JSON en la instancia de producción, vuelve a crear Credentials (no se copian solas), actualiza URLs del Config al dominio real.\n5. Pon **Active**. Prueba el Webhook de producción o espera el próximo cron.\n6. Alternativa: **n8n Cloud** (mismo JSON; Credentials en la UI Cloud).\n\n### 5) RGPD + EU AI Act (resumen)\nSi hay nodos IA sois **deployers** (Reglamento UE 2024/1689). Art. 4 alfabetización. **HITL** antes de outreach, scores masivos o pausas de cuenta. Minimiza PII en Slack/logs. Informativo — no es asesoramiento legal. /uso-responsable-de-ia-y-transparencia\n",
        "height": 1500,
        "width": 580,
        "color": 4
      }
    },
    {
      "id": "sec-trigger-schedule",
      "name": "Lunes 09:00",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        300
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 9 * * 1"
            }
          ]
        }
      }
    },
    {
      "id": "sec-set-config",
      "name": "Config checklist seguridad",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        300,
        300
      ],
      "parameters": {
        "mode": "manual",
        "duplicateItem": false,
        "assignments": {
          "assignments": [
            {
              "id": "sec-c1",
              "name": "itemHttps",
              "value": "[ ] HTTPS / TLS válido en el dominio de n8n (certificado no caducado)",
              "type": "string"
            },
            {
              "id": "sec-c2",
              "name": "itemEncryptionKey",
              "value": "[ ] N8N_ENCRYPTION_KEY estable y respaldada (no regenerar en caliente)",
              "type": "string"
            },
            {
              "id": "sec-c3",
              "name": "itemBackups",
              "value": "[ ] Backup de volúmenes/DB verificado esta semana (restore test)",
              "type": "string"
            },
            {
              "id": "sec-c4",
              "name": "itemUsers",
              "value": "[ ] Usuarios y roles revisados (sin cuentas huérfanas / 2FA si aplica)",
              "type": "string"
            },
            {
              "id": "sec-c5",
              "name": "itemFirewall",
              "value": "[ ] Firewall / allowlist: solo puertos necesarios; webhooks y UI acotados",
              "type": "string"
            },
            {
              "id": "sec-c6",
              "name": "opsOwner",
              "value": "@ops-responsable",
              "type": "string"
            },
            {
              "id": "sec-c7",
              "name": "slackWebhookUrl",
              "value": "https://example.com/aviso-equipo-slack",
              "type": "string"
            },
            {
              "id": "sec-c8",
              "name": "emailWebhookUrl",
              "value": "https://example.com/hooks/email-ops-checklist",
              "type": "string"
            },
            {
              "id": "sec-c9",
              "name": "checkedAt",
              "value": "={{ $now.setZone('Europe/Madrid').toFormat('yyyy-MM-dd HH:mm') }}",
              "type": "string"
            }
          ]
        }
      }
    },
    {
      "id": "sec-set-message",
      "name": "Armar mensaje Ops",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        600,
        300
      ],
      "parameters": {
        "mode": "manual",
        "duplicateItem": false,
        "assignments": {
          "assignments": [
            {
              "id": "sec-m1",
              "name": "slackWebhookUrl",
              "value": "={{ $json.slackWebhookUrl }}",
              "type": "string"
            },
            {
              "id": "sec-m2",
              "name": "emailWebhookUrl",
              "value": "={{ $json.emailWebhookUrl }}",
              "type": "string"
            },
            {
              "id": "sec-m3",
              "name": "opsOwner",
              "value": "={{ $json.opsOwner }}",
              "type": "string"
            },
            {
              "id": "sec-m4",
              "name": "checkedAt",
              "value": "={{ $json.checkedAt }}",
              "type": "string"
            },
            {
              "id": "sec-m5",
              "name": "checklistMessage",
              "value": "={{ ':lock: *Checklist seguridad n8n (semanal)*\\nResponsable: ' + $json.opsOwner + '\\nConfirmar antes de fin de día:\\n' + $json.itemHttps + '\\n' + $json.itemEncryptionKey + '\\n' + $json.itemBackups + '\\n' + $json.itemUsers + '\\n' + $json.itemFirewall + '\\n\\nHora: ' + $json.checkedAt + ' (Europe/Madrid)\\n_No incluir claves ni datos personales en la respuesta._' }}",
              "type": "string"
            }
          ]
        }
      }
    },
    {
      "id": "sec-slack",
      "name": "Slack — checklist Ops",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        900,
        40
      ],
      "parameters": {
        "method": "POST",
        "url": "={{ $json.slackWebhookUrl }}",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ text: $json.slackText || 'Actualización Logixb2b' }) }}",
        "options": {
          "timeout": 10000
        }
      }
    },
    {
      "id": "sec-email",
      "name": "Email/webhook Ops (opcional)",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        900,
        560
      ],
      "parameters": {
        "method": "POST",
        "url": "={{ $('Armar mensaje Ops').item.json.emailWebhookUrl }}",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ subject: 'Checklist seguridad n8n semanal', text: $('Armar mensaje Ops').item.json.checklistMessage, to: $('Armar mensaje Ops').item.json.opsOwner }) }}",
        "options": {
          "timeout": 10000,
          "response": {
            "response": {
              "fullResponse": true,
              "neverError": true
            }
          }
        }
      }
    }
  ],
  "connections": {
    "Lunes 09:00": {
      "main": [
        [
          {
            "node": "Config checklist seguridad",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Config checklist seguridad": {
      "main": [
        [
          {
            "node": "Armar mensaje Ops",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Armar mensaje Ops": {
      "main": [
        [
          {
            "node": "Slack — checklist Ops",
            "type": "main",
            "index": 0
          },
          {
            "node": "Email/webhook Ops (opcional)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
