{
  "name": "InnoIT: Generar imagen",
  "nodes": [
    {
      "parameters": {
        "resource": "image",
        "modelId": {
          "__rl": true,
          "value": "models/imagen-4.0-generate-001",
          "mode": "list",
          "cachedResultName": "models/imagen-4.0-generate-001"
        },
        "prompt": "={{ $('chat').item.json.chatInput }}",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "typeVersion": 1,
      "position": [
        240,
        16
      ],
      "id": "e4513203-6c51-4d42-acf3-02084b3f08ac",
      "name": "Generate an image",
      "credentials": {
        "googlePalmApi": {
          "id": "6P1f4AtQwxrrUvJM",
          "name": "Google Gemini(PaLM) Api account"
        }
      }
    },
    {
      "parameters": {
        "message": "=Imagen generada: \nhttps://aviatordev-n8n-files.s3.eu-west-3.amazonaws.com/{{ $('UUID').item.json.uuid }}.png",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chat",
      "typeVersion": 1,
      "position": [
        768,
        16
      ],
      "id": "dcd6460f-0dc7-483e-b01e-9d4651d88935",
      "name": "Respond to Chat"
    },
    {
      "parameters": {
        "operation": "upload",
        "bucketName": "aviatordev-n8n-files",
        "fileName": "={{$('UUID').item.json.uuid}}.png",
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.awsS3",
      "typeVersion": 2,
      "position": [
        512,
        16
      ],
      "id": "fe6624d8-5d14-4487-a174-39e616a4e266",
      "name": "Upload a file1",
      "credentials": {
        "aws": {
          "id": "GQUjP2b5r1OF1oVI",
          "name": "AWS account"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const uuid = require('uuid');\nitems[0].json.uuid = uuid.v4();\nreturn items;"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -32,
        16
      ],
      "id": "11d4fbe5-fcf1-4ed8-9fce-f8993943c2a7",
      "name": "UUID"
    },
    {
      "parameters": {
        "public": true,
        "options": {
          "responseMode": "responseNodes"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.3,
      "position": [
        -304,
        16
      ],
      "id": "e2c524c0-9882-4e66-94ca-61a3d7b636ce",
      "name": "chat",
      "webhookId": "bd3b5f19-5f72-4270-9110-c4c54342e65a"
    }
  ],
  "pinData": {},
  "connections": {
    "Generate an image": {
      "main": [
        [
          {
            "node": "Upload a file1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload a file1": {
      "main": [
        [
          {
            "node": "Respond to Chat",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "UUID": {
      "main": [
        [
          {
            "node": "Generate an image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "chat": {
      "main": [
        [
          {
            "node": "UUID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": "8YGqL2u2WNhXHiNN",
    "timezone": "Europe/Madrid"
  },
  "versionId": "62bd4187-3eb6-45b8-8e55-3fd944aaeef4",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "edf65107f4e74e1fc40836f00996d676566a5287b4feb81d57380eb9da83ec7e"
  },
  "id": "E1FYLltNCWFsrAVc",
  "tags": [
    {
      "createdAt": "2025-10-17T20:29:05.379Z",
      "updatedAt": "2025-10-17T20:29:05.379Z",
      "id": "R02q32gn6O27XAZN",
      "name": "InnoIT"
    }
  ]
}