This workflow corresponds to n8n.io template #5599 — we link there as the canonical source.
This workflow follows the Execute Workflow Trigger → HTTP Request recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "avK3DkrjbyTrhqdg",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Module - Get Best Favicon",
"tags": [
{
"id": "IPgYZQUa5S80tGVk",
"name": "Tool Listing Agent",
"createdAt": "2025-02-25T02:55:31.909Z",
"updatedAt": "2025-02-25T02:55:31.909Z"
}
],
"nodes": [
{
"id": "bd2411e4-555c-4d27-bc70-3e977bb5f83a",
"name": "workflow_trigger",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
0,
0
],
"parameters": {
"workflowInputs": {
"values": [
{
"name": "url"
},
{
"name": "domain"
}
]
}
},
"typeVersion": 1.1
},
{
"id": "16ca4bff-0871-4cba-bf58-cdc110059f6f",
"name": "logo_dev",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
580,
0
],
"parameters": {
"url": "=https://img.logo.dev/{{ $json.domain }}?format=png&size=512",
"options": {
"response": {
"response": {
"fullResponse": true,
"responseFormat": "file"
}
},
"allowUnauthorizedCerts": true
},
"authentication": "genericCredentialType",
"genericAuthType": "httpQueryAuth"
},
"credentials": {
"httpQueryAuth": {
"name": "<your credential>"
}
},
"typeVersion": 4.2
},
{
"id": "f8603300-93c6-4771-a8c7-6cf898020d72",
"name": "google",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
580,
-180
],
"parameters": {
"url": "=https://t3.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url={{ $('workflow_trigger').item.json.url }}&size=256",
"options": {
"response": {
"response": {
"fullResponse": true,
"responseFormat": "file"
}
},
"allowUnauthorizedCerts": true
}
},
"typeVersion": 4.2
},
{
"id": "3bc983e4-b152-485a-a6ec-1938250f33ee",
"name": "merge",
"type": "n8n-nodes-base.merge",
"position": [
880,
0
],
"parameters": {
"numberInputs": 3
},
"typeVersion": 3
},
{
"id": "ff5aff24-360e-42a8-ba3f-d7136a6d739d",
"name": "analyze_each_icon",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1720,
0
],
"parameters": {
"text": "I want you to give me a quality on a floating point range of 0 to 1.0\n\n- A score of 0.0 is not a good fit to be used as a featured icon\n- A score of 1.0 is a great fit to be used as a featured icon\n\nI want the best quality icon to display on this listing page with at least 256x256 resolution. It should not be blurry or contain artifacts. It should be a true brand icon or favicon of the brand. Transparency and solid colored background colors are good. I want to avoid any icons that already have rounded containers or other shapes that are featuring the icon/favicon.\n\nA high quality icon should NOT be a default icon that is used by javascript framework templates and other defaults. For example, the Vercel triangle icon would not be a high quality icon since it is not actually the true icon for the tool on the directory page.\n\nThis should be in the context of using the given image icon on as the main icon on a directory of AI tools.\n\nDon't take the actual design of the logo, icon, or favicon into consideration. It should be how cleanly it is presented within the image.",
"modelId": {
"__rl": true,
"mode": "list",
"value": "chatgpt-4o-latest",
"cachedResultName": "CHATGPT-4O-LATEST"
},
"options": {},
"resource": "image",
"inputType": "base64",
"operation": "analyze"
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.8
},
{
"id": "fcbfc5f7-0909-47b4-a306-0d6431f8a9ac",
"name": "extract_best_icon",
"type": "@n8n/n8n-nodes-langchain.informationExtractor",
"position": [
2260,
0
],
"parameters": {
"text": "={{ $json.results.map((item, index) => {\n let result = \"\";\n result += \"Image Number \" + index + \":\";\n result += \"\\n\";\n result += item;\n return result;\n}).join(\"\\n\\n-----\\n\\n\") }}",
"options": {
"systemPromptTemplate": "You are an expert extraction algorithm.\nOnly extract relevant information from the text.\nIf you do not know the value of an attribute asked to extract, you may omit the attribute's value."
},
"attributes": {
"attributes": [
{
"name": "best_image_index",
"type": "number",
"required": true,
"description": "This is the image number that has the best quality score associated with it. The quality score is a floating point number on a scale of 0.0 through 1.0. The image number you return should be the image that has the greatest score and best feedback."
}
]
}
},
"typeVersion": 1
},
{
"id": "c7727f10-dd2a-4cb2-8145-c9931bcdaeec",
"name": "clearbit",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueRegularOutput",
"position": [
580,
180
],
"parameters": {
"url": "=https://logo.clearbit.com/{{ $json.domain }}?size=256&format=png",
"options": {
"response": {
"response": {
"fullResponse": true,
"responseFormat": "file"
}
},
"allowUnauthorizedCerts": true
}
},
"typeVersion": 4.2
},
{
"id": "125b7434-258b-4071-b49c-f20fd670077d",
"name": "filter_errors",
"type": "n8n-nodes-base.filter",
"position": [
1140,
0
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "08448b34-04ca-4429-b0e0-c9855d123904",
"operator": {
"type": "object",
"operation": "notExists",
"singleValue": true
},
"leftValue": "={{ $('merge')?.item?.json?.error }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2.2
},
{
"id": "569cd049-711d-47a2-9753-5b0d74fb2842",
"name": "set_common_fields",
"type": "n8n-nodes-base.set",
"position": [
280,
0
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "418bd8cc-479c-47f4-8809-c2efcb835727",
"name": "url",
"type": "string",
"value": "={{ $json.url }}"
},
{
"id": "da80fa55-5c68-415f-ac95-7fadb22e685a",
"name": "domain",
"type": "string",
"value": "={{ $json.domain }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "8ca9921d-5992-4d68-ae4c-feb4b066c452",
"name": "filter_mime_type",
"type": "n8n-nodes-base.filter",
"position": [
1420,
0
],
"parameters": {
"options": {
"ignoreCase": true
},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": false,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "0f380a0c-05d4-42e1-a606-33d09e35554c",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.headers['content-type'] }}",
"rightValue": "image/png"
},
{
"id": "fbc9d748-06ea-40e1-a547-bb524e548f99",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "{{ $json.headers['content-type'] }}",
"rightValue": "image/jpeg"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "630e82ee-9f1e-4984-af0c-2a7e13408b2a",
"name": "return_final_image_url",
"type": "n8n-nodes-base.code",
"position": [
2660,
0
],
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "let idx = Number($json.output.best_image_index);\nlet url = $('set_common_fields').item.json.tool_url;\nlet domain = $('set_common_fields').item.json.domain;\nlet icon_url = \"\";\n\nswitch (idx) {\n // google\n case 0:\n icon_url = `https://t3.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=${url}&size=256`;\n break;\n\n // logo.dev\n case 1:\n icon_url = `https://img.logo.dev/${domain}?token=YOUR_TOKEN_HERE&format=png&size=512`;\n break;\n\n // clearbit\n case 2:\n icon_url = `https://logo.clearbit.com/${domain}?size=256&format=png`;\n break;\n\n default:\n throw new Error(\"Unknown image index\");\n}\n\nreturn { icon_url };"
},
"typeVersion": 2
},
{
"id": "095b9170-dcc5-4947-8405-fb8046511c0a",
"name": "gpt-4o-mini",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
2360,
220
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {
"temperature": 0
}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "bfdb05c0-1103-4fc6-ab4a-c499aea954e1",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-80,
-340
],
"parameters": {
"color": 4,
"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."
},
"typeVersion": 1
},
{
"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."
},
"typeVersion": 1
},
{
"id": "f8499d0f-69e8-45dd-9777-259c0e5318c9",
"name": "aggregate_results",
"type": "n8n-nodes-base.aggregate",
"position": [
1980,
0
],
"parameters": {
"options": {},
"fieldsToAggregate": {
"fieldToAggregate": [
{
"renameField": true,
"outputFieldName": "results",
"fieldToAggregate": "content"
}
]
}
},
"typeVersion": 1
},
{
"id": "9e2213b3-a204-4dbc-ac7c-b8d363f7f8e3",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
2180,
-340
],
"parameters": {
"color": 6,
"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."
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "db484788-16f9-4f1f-a6ef-54f18035e1c8",
"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
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
httpQueryAuthopenAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow is perfect for directory site creators, content managers, and developers who need to automatically find and select the highest quality favicon or logo for websites they're showcasing. Instead of manually hunting down brand assets or settling for blurry default…
Source: https://n8n.io/workflows/5599/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
🎯 Create viral TikToks, Shorts, Reels, podcasts, and ASMR videos in minutes — all on autopilot.
The best content automation template in the market is now even better—with “deep research” on time-sensitive topics\! Unlike most n8n content automation templates that are mainly for “demo purposes,”
Template Carnaval - time instagram. Uses toolWorkflow, lmChatOpenAi, memoryBufferWindow, agent. Event-driven trigger; 56 nodes.
This is an automated blog post generation system that: Researches topics using AI agents and web search tools Writes complete blog posts with proper SEO structure Generates custom images for each post
Code Schedule. Uses memoryBufferWindow, agent, stickyNote, outputParserStructured. Event-driven trigger; 45 nodes.