{
  "updatedAt": "2025-12-08T10:08:01.000Z",
  "createdAt": "2025-12-07T22:59:36.863Z",
  "id": "SzRGUZ56IaE7ufDM",
  "name": "Practica 7: Ejercicio 2",
  "description": null,
  "active": false,
  "isArchived": false,
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "5193666f-a213-4a0c-b560-584c02ea566f",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2.1,
      "position": [
        0,
        0
      ],
      "id": "7969e09e-bd65-42f9-8680-7a765c232f33",
      "name": "Webhook"
    },
    {
      "parameters": {
        "modelId": {
          "__rl": true,
          "value": "models/gemini-2.0-flash-lite",
          "mode": "list",
          "cachedResultName": "models/gemini-2.0-flash-lite"
        },
        "messages": {
          "values": [
            {
              "content": "=Extrae las siguientes entidades del texto. Responde \u00daNICAMENTE con un objeto JSON v\u00e1lido con las claves \"email_cliente\", \"tipo_problema\" (ej. \"error\", \"consulta\") y \"id_incidencia\". Si un valor no se encuentra, usa \"null\".\nTexto: \"{{ $json.body.texto }}\"\n"
            }
          ]
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "typeVersion": 1,
      "position": [
        224,
        0
      ],
      "id": "10cfb083-7d8e-4619-90cb-24e3dd950cc3",
      "name": "Message a model",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "f1c17a3b-dd7f-4c1c-aa27-12faf31d3310",
              "name": "email",
              "value": "={{ JSON.parse($json.content.parts[0].text.replace(/```json|```/g, '')).email_cliente }}",
              "type": "string"
            },
            {
              "id": "a6e243cc-02d4-4fe1-b636-14f7947e6cf8",
              "name": "indidencia",
              "value": "={{ JSON.parse($json.content.parts[0].text.replace(/```json|```/g, '')).id_incidencia }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        576,
        0
      ],
      "id": "30e744b8-e96b-4cf7-a59f-ad0d280732d5",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.email }}",
                    "rightValue": "=@ual.es",
                    "operator": {
                      "type": "string",
                      "operation": "contains"
                    },
                    "id": "4b06dbe3-1894-40d5-895a-efb49f30d255"
                  }
                ],
                "combinator": "and"
              }
            }
          ]
        },
        "options": {
          "fallbackOutput": "extra"
        }
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.3,
      "position": [
        800,
        0
      ],
      "id": "9a451dd9-0d53-4005-996a-937fdc7d7cc5",
      "name": "Switch"
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Message a model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Message a model": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "versionId": "8e1d8785-cc1f-428e-bf62-bd7e69c037a1",
  "activeVersionId": null,
  "versionCounter": 2,
  "triggerCount": 0,
  "tags": [],
  "shared": [
    {
      "updatedAt": "2025-12-07T22:59:36.867Z",
      "createdAt": "2025-12-07T22:59:36.867Z",
      "role": "workflow:owner",
      "workflowId": "SzRGUZ56IaE7ufDM",
      "projectId": "jEpZT8mLa3eTbWzT",
      "project": {
        "updatedAt": "2025-11-07T16:30:44.943Z",
        "createdAt": "2025-11-07T16:25:40.556Z",
        "id": "jEpZT8mLa3eTbWzT",
        "name": "Anass El Jabiry <aek676@inlumine.ual.es>",
        "type": "personal",
        "icon": null,
        "description": null,
        "creatorId": "685a70bc-7fcf-484c-be50-a33cd8a1716e"
      }
    }
  ]
}