{
  "name": "Find the best favicon from multiple sources with GPT-4 vision analysis",
  "nodes": [
    {
      "id": "bd2411e4-555c-4d27-bc70-3e977bb5f83a",
      "name": "workflow_trigger",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        0,
        0
      ]
    },
    {
      "id": "16ca4bff-0871-4cba-bf58-cdc110059f6f",
      "name": "logo_dev",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        580,
        0
      ]
    },
    {
      "id": "f8603300-93c6-4771-a8c7-6cf898020d72",
      "name": "google",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        580,
        -180
      ]
    },
    {
      "id": "3bc983e4-b152-485a-a6ec-1938250f33ee",
      "name": "merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        880,
        0
      ]
    },
    {
      "id": "ff5aff24-360e-42a8-ba3f-d7136a6d739d",
      "name": "analyze_each_icon",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1720,
        0
      ]
    },
    {
      "id": "fcbfc5f7-0909-47b4-a306-0d6431f8a9ac",
      "name": "extract_best_icon",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        2260,
        0
      ]
    },
    {
      "id": "c7727f10-dd2a-4cb2-8145-c9931bcdaeec",
      "name": "clearbit",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        580,
        180
      ]
    },
    {
      "id": "125b7434-258b-4071-b49c-f20fd670077d",
      "name": "filter_errors",
      "type": "n8n-nodes-base.filter",
      "position": [
        1140,
        0
      ]
    },
    {
      "id": "569cd049-711d-47a2-9753-5b0d74fb2842",
      "name": "set_common_fields",
      "type": "n8n-nodes-base.set",
      "position": [
        280,
        0
      ]
    },
    {
      "id": "8ca9921d-5992-4d68-ae4c-feb4b066c452",
      "name": "filter_mime_type",
      "type": "n8n-nodes-base.filter",
      "position": [
        1420,
        0
      ]
    },
    {
      "id": "630e82ee-9f1e-4984-af0c-2a7e13408b2a",
      "name": "return_final_image_url",
      "type": "n8n-nodes-base.code",
      "position": [
        2660,
        0
      ]
    },
    {
      "id": "095b9170-dcc5-4947-8405-fb8046511c0a",
      "name": "gpt-4o-mini",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        2360,
        220
      ]
    },
    {
      "id": "bfdb05c0-1103-4fc6-ab4a-c499aea954e1",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -340
      ],
      "parameters": {
        "width": 1140,
        "height": 740,
        "content": "## 1. Fetch Favicon Images \n\nAttempts to fetch favicon images from multiple providers by using the website's `url` and `domain` inputs."
      }
    },
    {
      "id": "af0b3b5c-0e17-48d0-bd44-8b2a9f32322b",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1080,
        -340
      ],
      "parameters": {
        "width": 1080,
        "height": 740,
        "content": "## 2. Analyze Each Image\n\nUse OpenAI's vision API to analyze each image and assign a \"Quality Score\" for each favicon previously fetched."
      }
    },
    {
      "id": "f8499d0f-69e8-45dd-9777-259c0e5318c9",
      "name": "aggregate_results",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1980,
        0
      ]
    },
    {
      "id": "9e2213b3-a204-4dbc-ac7c-b8d363f7f8e3",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2180,
        -340
      ],
      "parameters": {
        "width": 700,
        "height": 740,
        "content": "## 3. Build Result\n\nThe final step here picks out the best score from the previous analysis and returns the url for the highest quality favicon image."
      }
    }
  ],
  "connections": {
    "merge": {
      "main": [
        [
          {
            "node": "filter_errors",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "google": {
      "main": [
        [
          {
            "node": "merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "clearbit": {
      "main": [
        [
          {
            "node": "merge",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "logo_dev": {
      "main": [
        [
          {
            "node": "merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "gpt-4o-mini": {
      "ai_languageModel": [
        [
          {
            "node": "extract_best_icon",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "filter_errors": {
      "main": [
        [
          {
            "node": "filter_mime_type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "filter_mime_type": {
      "main": [
        [
          {
            "node": "analyze_each_icon",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "workflow_trigger": {
      "main": [
        [
          {
            "node": "set_common_fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "aggregate_results": {
      "main": [
        [
          {
            "node": "extract_best_icon",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "analyze_each_icon": {
      "main": [
        [
          {
            "node": "aggregate_results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "extract_best_icon": {
      "main": [
        [
          {
            "node": "return_final_image_url",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "set_common_fields": {
      "main": [
        [
          {
            "node": "google",
            "type": "main",
            "index": 0
          },
          {
            "node": "logo_dev",
            "type": "main",
            "index": 0
          },
          {
            "node": "clearbit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}