模块 - 获取最佳网站图标
高级
这是一个Document Extraction, AI Summarization领域的自动化工作流,包含 16 个节点。主要使用 Set, Code, Merge, Filter, Aggregate 等节点。 通过GPT-4视觉分析从多个来源查找最佳网站图标
前置要求
- •可能需要目标 API 的认证凭证
- •OpenAI API Key
使用的节点 (16)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "avK3DkrjbyTrhqdg",
"meta": {
"instanceId": "06e5009344f682419c20ccd4ecdcb5223bbb91761882af93ac6d468dbc2cbf8d",
"templateCredsSetupCompleted": true
},
"name": "模块 - 获取最佳网站图标",
"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": {
"id": "5dqFKvC44DJBQMOn",
"name": "Logo.dev API"
}
},
"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": {
"id": "7ecUbyMBJInZM14n",
"name": "Open AI"
}
},
"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=pk_b6ax6oVTTlSLqCezmTitOg&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": {
"id": "7ecUbyMBJInZM14n",
"name": "Open AI"
}
},
"typeVersion": 1.2
},
{
"id": "bfdb05c0-1103-4fc6-ab4a-c499aea954e1",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-80,
-340
],
"parameters": {
"color": 4,
"width": 1140,
"height": 740,
"content": "## 1. 获取网站图标图像"
},
"typeVersion": 1
},
{
"id": "af0b3b5c-0e17-48d0-bd44-8b2a9f32322b",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1080,
-340
],
"parameters": {
"width": 1080,
"height": 740,
"content": "## 2. 分析每个图像"
},
"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": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
2180,
-340
],
"parameters": {
"color": 6,
"width": 700,
"height": 740,
"content": "## 3. 构建结果"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {
"workflow_trigger": [
{
"json": {
"tool_url": "http://fyxer.ai",
"tool_name": "Fyxer AI"
}
}
]
},
"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
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 文档提取, AI 摘要总结
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
使用VEXA、OpenAI和Mem0自动化会议智能分析
使用VEXA、OpenAI和Mem0自动化会议对话洞察分析
Set
Code
Merge
+13
26 节点Stephan Koning
文档提取
在可视化参考库中探索n8n节点
在可视化参考库中探索n8n节点
If
Ftp
Set
+93
113 节点I versus AI
其他
国家气象局AI分析
基于NWS警报、雷达图像和Home Assistant的AI生成天气分析
Set
Code
Merge
+10
20 节点Carl Danley
个人效率
联系人信息丰富化
基于 Apollo、LinkedIn 和 GPT-4o 的全面联系人信息丰富化,适用于 HubSpot
If
Set
Code
+15
24 节点Interlock GTM
潜在客户开发
Fireflies会议转录和摘要自动化
使用Gemini和Gmail从Fireflies转录自动化会议摘要
Set
Code
Gmail
+11
26 节点Davide
文档提取
基于Voyage-Context-3嵌入和MongoDB Atlas的文档问答系统
基于Voyage-Context-3嵌入和MongoDB Atlas的文档问答系统
Set
Code
Wait
+18
53 节点Jimleuk
工程
工作流信息
难度等级
高级
节点数量16
分类2
节点类型11
作者
Lucas Walter
@lucaswalterI build the systems behind The Recap AI, where we teach and help people implement AI in ways that make the most sense for their businesses.
外部链接
在 n8n.io 查看 →
分享此工作流