{
  "name": "My workflow VISION",
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -384,
        1104
      ],
      "id": "4da32746-2b94-49d8-871e-799bce6fc12a",
      "name": "When clicking \u2018Execute workflow\u2019"
    },
    {
      "parameters": {
        "url": "={{ $json.sample_image }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.3,
      "position": [
        64,
        1200
      ],
      "id": "9c2ab66f-1815-41ad-9793-ab5766492ffc",
      "name": "HTTP Request"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "0da1ec5b-dbca-41df-8cf0-842c7b8e0b66",
              "name": "sample_image",
              "value": "https://metalbyexample.com/wp-content/uploads/figure-65.png",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -160,
        1104
      ],
      "id": "33654b94-3400-4e86-83f5-d05a6c6e291c",
      "name": "Edit Fields"
    },
    {
      "parameters": {
        "jsCode": "// Get binary data from input item\nconst binaryData = items[0].binary;\n\n// Get the binary field name (default 'data')\nconst binaryPropertyName = 'data'; // Change this if your binary has a different name\n\n// Verify that binary exists\nif (!binaryData || !binaryData[binaryPropertyName]) {\n  throw new Error('Binary data not found in the specified field');\n}\n\n// Get the buffer from binary\nconst buffer = await this.helpers.getBinaryDataBuffer(0, binaryPropertyName);\n\n// Convert to base64\nconst base64String = buffer.toString('base64');\n\n// Return the result\nreturn [\n  {\n    json: {\n      base64: base64String,\n      mimeType: binaryData[binaryPropertyName].mimeType,\n      fileName: binaryData[binaryPropertyName].fileName\n    }\n  }\n];"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        288,
        1296
      ],
      "id": "db55cf01-a039-47aa-aa9f-fd970cd2f608",
      "name": "Binary to Base64"
    },
    {
      "parameters": {
        "model": "google/gemini-2.5-flash-lite",
        "imageSource": "url",
        "imageUrl": "={{ $json.sample_image }}",
        "modelParameters": {},
        "advancedOptions": {}
      },
      "type": "n8n-nodes-universal-llm-vision.universalLlmVision",
      "typeVersion": 1.1,
      "position": [
        64,
        1008
      ],
      "id": "7b5b77c0-5898-44d1-8cd5-cfe4bec13cb5",
      "name": "Universal LLM Vision (URL)",
      "credentials": {
        "universalLlmVisionApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": "google/gemini-2.5-flash-lite",
        "modelParameters": {},
        "advancedOptions": {}
      },
      "type": "n8n-nodes-universal-llm-vision.universalLlmVision",
      "typeVersion": 1.1,
      "position": [
        288,
        1104
      ],
      "id": "fe8d1ff6-1ea6-43a6-8c43-eaf82ad2971e",
      "name": "Universal LLM Vision (BINARY)",
      "credentials": {
        "universalLlmVisionApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": "google/gemini-2.5-flash-lite",
        "imageSource": "base64",
        "base64Data": "={{ $json.base64 }}",
        "modelParameters": {},
        "advancedOptions": {}
      },
      "type": "n8n-nodes-universal-llm-vision.universalLlmVision",
      "typeVersion": 1.1,
      "position": [
        512,
        1296
      ],
      "id": "811e9bbb-50cc-45ac-af94-f6c27391bf77",
      "name": "Universal LLM Vision (BASE 64)",
      "credentials": {
        "universalLlmVisionApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.4,
      "position": [
        -384,
        1344
      ],
      "id": "6cf85466-3349-4095-aafd-00de42ced6d0",
      "name": "When chat message received"
    },
    {
      "parameters": {
        "options": {
          "systemMessage": "You are a multimodal analysis agent.\nTo analyze images, you require a publicly accessible image URL.\nWhen an image is provided, call the Universal_LLM_Vision tool using the public image URL and a short, task-focused prompt.\nFollow the user instructions precisely and avoid assumptions not supported by the image.\nRespond clearly, concisely, and in a useful format."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 3.1,
      "position": [
        -176,
        1344
      ],
      "id": "2ccc25a5-853a-4e00-993c-fd22b305a59b",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "model": "openai/gpt-4.1-nano",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "typeVersion": 1,
      "position": [
        -192,
        1552
      ],
      "id": "3e2d73e7-bde7-4912-aff7-c6f4123412f7",
      "name": "OpenRouter Chat Model",
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "toolDescription": "Analyze images using a LLM",
        "model": "google/gemini-2.5-flash-lite",
        "imageSource": "url",
        "imageUrl": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Image_URL', ``, 'string') }}",
        "prompt": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Prompt', ``, 'string') }}",
        "modelParameters": {},
        "advancedOptions": {}
      },
      "type": "n8n-nodes-universal-llm-vision.universalLlmVisionTool",
      "typeVersion": 1.1,
      "position": [
        -16,
        1552
      ],
      "id": "0cb4bedb-9083-40f4-a4d4-aca9cfbcd148",
      "name": "Universal LLM Vision",
      "credentials": {
        "universalLlmVisionApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Universal LLM Vision (BINARY)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Binary to Base64",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          },
          {
            "node": "Universal LLM Vision (URL)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Binary to Base64": {
      "main": [
        [
          {
            "node": "Universal LLM Vision (BASE 64)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Universal LLM Vision": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "availableInMCP": false
  },
  "versionId": "c3adcb63-0711-4540-bd49-30b8fc3b7af8",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "Ob9A-CkSopOZQQtpuWavN",
  "tags": []
}