{
  "name": "Monitor del sector con Claude (FluIA)",
  "nodes": [
    {
      "parameters": {
        "content": "## Monitor del sector\n1. En 'Fuentes RSS', cambia las direcciones por las de los medios o blogs de tu sector (5–10).\n2. En el nodo Claude, describe tu negocio en el mensaje del sistema para que filtre bien.\n3. Pon tu correo en 'Enviar resumen'.\n\nPlantilla de fluia.es",
        "height": 190,
        "width": 460
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "id": "a1f55bb1-025e-401c-9686-d768c5837f26",
      "name": "Nota 5d16"
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "30 7 * * *"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        300
      ],
      "id": "e23995c9-0d76-4193-8264-cd9223100119",
      "name": "Cada día a las 7:30"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "3ebac987-4566-45a3-8b85-5b7842d910d8",
              "name": "feeds",
              "type": "array",
              "value": "={{ ['https://www.xataka.com/tag/inteligencia-artificial/feed', 'https://blog.n8n.io/rss/', 'https://www.anthropic.com/news/rss.xml'] }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        220,
        300
      ],
      "id": "081e4ef4-f17d-482a-95b5-796f1cbb825e",
      "name": "Fuentes RSS"
    },
    {
      "parameters": {
        "fieldToSplitOut": "feeds",
        "options": {}
      },
      "type": "n8n-nodes-base.splitOut",
      "typeVersion": 1,
      "position": [
        440,
        300
      ],
      "id": "92bed82a-3344-48d1-902a-423f20b88b97",
      "name": "Una fuente por item"
    },
    {
      "parameters": {
        "url": "={{ $json.feeds }}",
        "options": {}
      },
      "type": "n8n-nodes-base.rssFeedRead",
      "typeVersion": 1.2,
      "position": [
        660,
        300
      ],
      "id": "acab2d2a-048d-4708-9f48-f515f09ed10a",
      "name": "Leer noticias",
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "maxItems": 40
      },
      "type": "n8n-nodes-base.limit",
      "typeVersion": 1,
      "position": [
        880,
        300
      ],
      "id": "d6fd9308-e40c-4e0a-9bac-032654aa226b",
      "name": "Máximo 40 noticias"
    },
    {
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "options": {}
      },
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        1100,
        300
      ],
      "id": "92a6b706-e931-45cd-92b4-e62246a8efb3",
      "name": "Juntar noticias"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.data.map(n => '- ' + (n.title || '') + ' | ' + (n.link || '') + ' | ' + ((n.contentSnippet || n.content || '') + '').slice(0, 300)).join('\\n') }}",
        "messages": {
          "messageValues": [
            {
              "type": "SystemMessagePromptTemplate",
              "message": "Trabajo en [DESCRIBE AQUÍ TU NEGOCIO: por ejemplo, una agencia de marketing para clínicas dentales]. Te paso las noticias de hoy de varias fuentes (título, enlace y un fragmento). Selecciona solo las que puedan afectar a mi negocio o darme una oportunidad (máximo 6). Para cada una escribe: el título, una frase con por qué me importa, y el enlace. Al final, una línea con la tendencia general del día. Español, texto plano sin Markdown. Si ninguna es relevante, dilo en una frase."
            }
          ]
        },
        "batching": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.9,
      "position": [
        1320,
        300
      ],
      "id": "04817a61-73d8-4a9f-acdd-6d2b04e5752b",
      "name": "Claude filtra y resume"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "id",
          "value": "claude-sonnet-5"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.6,
      "position": [
        1360,
        520
      ],
      "id": "1b00d8b0-b63d-4906-8606-3f9ce553bdd3",
      "name": "Claude",
      "credentials": {
        "anthropicApi": {
          "id": "REEMPLAZAR",
          "name": "Anthropic (tu clave de API)"
        }
      }
    },
    {
      "parameters": {
        "sendTo": "TU_CORREO@ejemplo.com",
        "subject": "=Resumen del sector · {{ $now.toFormat('dd/MM') }}",
        "emailType": "text",
        "message": "={{ $json.text }}",
        "options": {}
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.2,
      "position": [
        1700,
        300
      ],
      "id": "6734e190-c6c8-490b-a808-d2922d8d3bf3",
      "name": "Enviar resumen",
      "credentials": {
        "gmailOAuth2": {
          "id": "REEMPLAZAR",
          "name": "Gmail (tu cuenta)"
        }
      }
    }
  ],
  "connections": {
    "Cada día a las 7:30": {
      "main": [
        [
          {
            "node": "Fuentes RSS",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fuentes RSS": {
      "main": [
        [
          {
            "node": "Una fuente por item",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Una fuente por item": {
      "main": [
        [
          {
            "node": "Leer noticias",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Leer noticias": {
      "main": [
        [
          {
            "node": "Máximo 40 noticias",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Máximo 40 noticias": {
      "main": [
        [
          {
            "node": "Juntar noticias",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Juntar noticias": {
      "main": [
        [
          {
            "node": "Claude filtra y resume",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Claude": {
      "ai_languageModel": [
        [
          {
            "node": "Claude filtra y resume",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Claude filtra y resume": {
      "main": [
        [
          {
            "node": "Enviar resumen",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "instanceId": "fluia-plantilla"
  }
}