{
  "name": "Logixb2b — Checklist migración n8n ↔ Make",
  "meta": {
    "templateCredsSetupCompleted": false,
    "description": "Lunes 09:00: inventario de migración n8n ↔ Make → append Google Sheets → Slack checklist Ops."
  },
  "settings": {
    "executionOrder": "v1",
    "timezone": "Europe/Madrid"
  },
  "active": false,
  "pinData": {},
  "tags": [
    {
      "name": "Logixb2b"
    },
    {
      "name": "recursos"
    },
    {
      "name": "migracion"
    }
  ],
  "nodes": [
    {
      "id": "sticky-instrucciones-logix",
      "name": "INSTRUCCIONES (conectar + VPS)",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -480,
        40
      ],
      "parameters": {
        "content": "## INSTRUCCIONES — Checklist migración n8n ↔ Make\n\n**Recurso:** `/recursos/n8n-make-migracion-checklist`\n**Guía:** /n8n-vs-make-integromat-comparativa-b2b\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 inventario migración** (`Set` Config): **no lleva credencial**. Aquí van URLs/placeholders (`REEMPLAZA_*`, `example.com`, `TU-CRM`). Sustituye todos antes de Active.\n- **Append fila Google Sheets** (`HTTP Request` Sheets): mejor migrar a nodo Google Sheets; si dejas HTTP, usa OAuth2 Bearer de Google.\n- **Resumen migración** (`Set`): sin credencial. Revisa expresiones `={{ }}` y campos de salida.\n- **Slack — checklist migración actualizado** (`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\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": "mig-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": "mig-set-config",
      "name": "Config inventario migración",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        300,
        300
      ],
      "parameters": {
        "mode": "manual",
        "duplicateItem": false,
        "assignments": {
          "assignments": [
            {
              "id": "mig-c1",
              "name": "sourcePlatform",
              "value": "Make",
              "type": "string"
            },
            {
              "id": "mig-c2",
              "name": "targetPlatform",
              "value": "n8n",
              "type": "string"
            },
            {
              "id": "mig-c3",
              "name": "flowsCount",
              "value": 12,
              "type": "number"
            },
            {
              "id": "mig-c4",
              "name": "credentialsList",
              "value": "HubSpot, Gmail, Slack Incoming Webhook, Google Sheets",
              "type": "string"
            },
            {
              "id": "mig-c5",
              "name": "webhooksList",
              "value": "formulario-web, stripe-eventos, crm-outbound",
              "type": "string"
            },
            {
              "id": "mig-c6",
              "name": "parityNotes",
              "value": "Pendiente: filtros de routers Make → IF n8n; reintentos; mapeo de errores a Slack Ops",
              "type": "string"
            },
            {
              "id": "mig-c7",
              "name": "migrationOwner",
              "value": "RevOps",
              "type": "string"
            },
            {
              "id": "mig-c8",
              "name": "sheetsAppendUrl",
              "value": "https://sheets.googleapis.com/v4/spreadsheets/TU_SHEET_ID/values/Migracion!A1:append?valueInputOption=USER_ENTERED",
              "type": "string"
            },
            {
              "id": "mig-c9",
              "name": "slackWebhookUrl",
              "value": "https://example.com/aviso-equipo-slack",
              "type": "string"
            },
            {
              "id": "mig-c10",
              "name": "checkedAt",
              "value": "={{ $now.setZone('Europe/Madrid').toFormat('yyyy-MM-dd HH:mm') }}",
              "type": "string"
            }
          ]
        }
      }
    },
    {
      "id": "mig-http-sheets",
      "name": "Append fila Google Sheets",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        600,
        300
      ],
      "parameters": {
        "method": "POST",
        "url": "={{ $json.sheetsAppendUrl }}",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ values: [[ $json.checkedAt, $json.sourcePlatform, $json.targetPlatform, $json.flowsCount, $json.credentialsList, $json.webhooksList, $json.parityNotes, $json.migrationOwner ]] }) }}",
        "options": {
          "timeout": 15000,
          "response": {
            "response": {
              "fullResponse": true,
              "neverError": true
            }
          }
        }
      }
    },
    {
      "id": "mig-set-summary",
      "name": "Resumen migración",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        900,
        300
      ],
      "parameters": {
        "mode": "manual",
        "duplicateItem": false,
        "assignments": {
          "assignments": [
            {
              "id": "mig-s1",
              "name": "sheetsStatusCode",
              "value": "={{ $json.statusCode }}",
              "type": "number"
            },
            {
              "id": "mig-s2",
              "name": "slackWebhookUrl",
              "value": "={{ $('Config inventario migración').item.json.slackWebhookUrl }}",
              "type": "string"
            },
            {
              "id": "mig-s3",
              "name": "slackText",
              "value": "={{ (() => { const c = $('Config inventario migración').item.json; return ':arrows_counterclockwise: *Checklist migración actualizado*\\n' + c.sourcePlatform + ' → ' + c.targetPlatform + '\\nFlujos: *' + c.flowsCount + '* | Owner: ' + c.migrationOwner + '\\nCredenciales: ' + c.credentialsList + '\\nWebhooks: ' + c.webhooksList + '\\nParidad: ' + c.parityNotes + '\\nSheets HTTP: ' + $json.statusCode + '\\nHora: ' + c.checkedAt + ' (Europe/Madrid)'; })() }}",
              "type": "string"
            }
          ]
        }
      }
    },
    {
      "id": "mig-slack",
      "name": "Slack — checklist migración actualizado",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1200,
        300
      ],
      "parameters": {
        "method": "POST",
        "url": "={{ $json.slackWebhookUrl }}",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ JSON.stringify({ text: $json.slackText || 'Actualización Logixb2b' }) }}",
        "options": {
          "timeout": 10000
        }
      }
    }
  ],
  "connections": {
    "Lunes 09:00": {
      "main": [
        [
          {
            "node": "Config inventario migración",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Config inventario migración": {
      "main": [
        [
          {
            "node": "Append fila Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append fila Google Sheets": {
      "main": [
        [
          {
            "node": "Resumen migración",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Resumen migración": {
      "main": [
        [
          {
            "node": "Slack — checklist migración actualizado",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
