{
  "name": "Actas de reunión con Claude (FluIA)",
  "nodes": [
    {
      "parameters": {
        "content": "## Actas de reunión\n1. Crea una carpeta en Drive donde guardes las transcripciones (.txt) de Zoom, Meet o Teams, y pon su ID en el disparador y en 'Descargar transcripción'.\n2. Conecta Drive, Anthropic, Gmail y Google Sheets.\n3. La hoja necesita las columnas: fecha, reunion, acta.\n\nPlantilla de fluia.es",
        "height": 200,
        "width": 520
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "id": "ab670b7b-4272-4ba9-ba27-9399ae5757a9",
      "name": "Nota c61b"
    },
    {
      "parameters": {
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "mode": "id",
          "value": "ID_DE_LA_CARPETA"
        },
        "event": "fileCreated",
        "options": {}
      },
      "type": "n8n-nodes-base.googleDriveTrigger",
      "typeVersion": 1,
      "position": [
        0,
        320
      ],
      "id": "e073fcaa-920d-4150-b60d-fb006e764b98",
      "name": "Nueva transcripción",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "REEMPLAZAR",
          "name": "Google Drive (tu cuenta)"
        }
      }
    },
    {
      "parameters": {
        "operation": "download",
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.id }}"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 3,
      "position": [
        240,
        320
      ],
      "id": "15511a06-8a36-41e8-b150-ec880cc60d7d",
      "name": "Descargar transcripción",
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "REEMPLAZAR",
          "name": "Google Drive (tu cuenta)"
        }
      }
    },
    {
      "parameters": {
        "operation": "text",
        "binaryPropertyName": "data",
        "destinationKey": "transcripcion",
        "options": {}
      },
      "type": "n8n-nodes-base.extractFromFile",
      "typeVersion": 1.1,
      "position": [
        480,
        320
      ],
      "id": "b8fe9951-1905-4c45-83c0-acd082de0d58",
      "name": "Leer el texto"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Reunión: {{ $('Nueva transcripción').item.json.name }}\n\nTranscripción:\n{{ $json.transcripcion }}",
        "messages": {
          "messageValues": [
            {
              "type": "SystemMessagePromptTemplate",
              "message": "Eres un asistente que redacta actas de reunión a partir de transcripciones automáticas (pueden tener errores de transcripción; interprétalas con sentido común). Escribe el acta en español, en texto plano sin Markdown, con esta estructura:\n\nRESUMEN (3–5 frases)\n\nDECISIONES TOMADAS\n- una por línea\n\nTAREAS\n- tarea | responsable | fecha límite (si se dijo; si no, 'sin fecha')\n\nTEMAS PENDIENTES\n- una por línea\n\nPRÓXIMA REUNIÓN (si se mencionó)\n\nNo inventes decisiones ni responsables que no aparezcan. Si algo es ambiguo, márcalo con '(por confirmar)'."
            }
          ]
        },
        "batching": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.9,
      "position": [
        720,
        320
      ],
      "id": "1ed2f75e-1ca0-404e-97ec-3d51f4c64d72",
      "name": "Claude redacta el acta"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "id",
          "value": "claude-sonnet-5"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "typeVersion": 1.6,
      "position": [
        760,
        540
      ],
      "id": "e376cb32-2ae6-495c-a793-af4ad4ce9503",
      "name": "Claude",
      "credentials": {
        "anthropicApi": {
          "id": "REEMPLAZAR",
          "name": "Anthropic (tu clave de API)"
        }
      }
    },
    {
      "parameters": {
        "sendTo": "TU_CORREO@ejemplo.com",
        "subject": "=Acta: {{ $('Nueva transcripción').item.json.name }}",
        "emailType": "text",
        "message": "={{ $json.text }}",
        "options": {}
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.2,
      "position": [
        1100,
        200
      ],
      "id": "9b1428b6-04d4-4f46-b634-70ca64ae52cd",
      "name": "Enviar acta por correo",
      "credentials": {
        "gmailOAuth2": {
          "id": "REEMPLAZAR",
          "name": "Gmail (tu cuenta)"
        }
      }
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "ID_DE_TU_HOJA"
        },
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "Actas"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "fecha": "={{ $now.toFormat('yyyy-MM-dd') }}",
            "reunion": "={{ $('Nueva transcripción').item.json.name }}",
            "acta": "={{ $json.text }}"
          },
          "schema": [
            {
              "id": "fecha",
              "displayName": "fecha",
              "type": "string",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true
            },
            {
              "id": "reunion",
              "displayName": "reunion",
              "type": "string",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true
            },
            {
              "id": "acta",
              "displayName": "acta",
              "type": "string",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "canBeUsedToMatch": true
            }
          ],
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        1100,
        440
      ],
      "id": "1d06a1ae-a8e8-40b5-91a3-adda0d057739",
      "name": "Guardar en Google Sheets",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "REEMPLAZAR",
          "name": "Google Sheets (tu cuenta)"
        }
      }
    }
  ],
  "connections": {
    "Nueva transcripción": {
      "main": [
        [
          {
            "node": "Descargar transcripción",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Descargar transcripción": {
      "main": [
        [
          {
            "node": "Leer el texto",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Leer el texto": {
      "main": [
        [
          {
            "node": "Claude redacta el acta",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Claude": {
      "ai_languageModel": [
        [
          {
            "node": "Claude redacta el acta",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Claude redacta el acta": {
      "main": [
        [
          {
            "node": "Enviar acta por correo",
            "type": "main",
            "index": 0
          },
          {
            "node": "Guardar en Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "instanceId": "fluia-plantilla"
  }
}