8
n8n 中文网amn8n.com

使用 OpenAI 和 Gemini 从网站生成自定义徽标

中级

这是一个自动化工作流,包含 13 个节点。主要使用 Webhook, HttpRequest, Agent, RespondToWebhook, GoogleGemini 等节点。 使用 OpenAI 和 Gemini 从网站生成自定义徽标

前置要求
  • HTTP Webhook 端点(n8n 会自动生成)
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key

分类

-
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "3d7eb9567ae690bf8c9bba1cb43396e6e40c18e15eb5889cf9673ed1713da6db",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "4c829734-83d0-43ef-8111-2b8222bff6ee",
      "name": "当收到网站 URL 时",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1136,
        2224
      ],
      "webhookId": "15a007b2-0c35-47f6-8387-5b3548c2e295",
      "parameters": {
        "path": "175b3350-1d0c-48c5-99d1-06e3b209a68097t657yi97",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 2.1
    },
    {
      "id": "0c5f6963-4d1a-4f1e-bf2e-9adc4e53f3fb",
      "name": "捕获网站截图",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -976,
        2224
      ],
      "parameters": {
        "url": "=https://api.screenshotone.com/take",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "access_key",
              "value": "[Your ScreenshotOne Access Key]"
            },
            {
              "name": "url",
              "value": "={{ $json.body.websiteUrl }}"
            },
            {
              "name": "format",
              "value": "jpg"
            },
            {
              "name": "block_ads",
              "value": "true"
            },
            {
              "name": "block_cookie_banners",
              "value": "true"
            },
            {
              "name": "block_banners_by_heuristics",
              "value": "false"
            },
            {
              "name": "block_trackers",
              "value": "true"
            },
            {
              "name": "delay",
              "value": "0"
            },
            {
              "name": "timeout",
              "value": "60"
            },
            {
              "name": "response_type",
              "value": "=json"
            },
            {
              "name": "image_quality",
              "value": "80"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "2156cf0b-97f0-425e-a28d-d7ea9e2d7d17",
      "name": "获取网站内容",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -816,
        2224
      ],
      "parameters": {
        "url": "={{ $('When Website URL Received').item.json.body.websiteUrl }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "5995ca13-7f6b-4899-88fb-d85e18921143",
      "name": "生成 Logo 提示",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -640,
        2224
      ],
      "parameters": {
        "text": "=Write a prompt to create a logo for this website based of the content of the site and a screenshot of the front page\n\nScreenshot: {{ $('Capture Website Screenshot').item.json.screenshot_url }}\nWebsite data:{{ $json.data }}\n\nOutput the prompt in \"Prompt\"",
        "options": {
          "passthroughBinaryImages": true
        },
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "5b7b8344-4acc-46df-8412-30cdaeb49273",
      "name": "生成 Logo 图片",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        -352,
        2224
      ],
      "parameters": {
        "prompt": "={{ $json.output }}",
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "models/gemini-2.5-flash-image",
          "cachedResultName": "models/gemini-2.5-flash-image (Nano Banana)"
        },
        "options": {},
        "resource": "image"
      },
      "credentials": {
        "googlePalmApi": {
          "id": "7v8o9EaQkl33woxm",
          "name": "v9"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f9cc1b9b-b610-442e-8ea9-2ddc18d8de09",
      "name": "响应 Logo",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        -176,
        2224
      ],
      "parameters": {
        "options": {},
        "respondWith": "binary"
      },
      "typeVersion": 1.4
    },
    {
      "id": "f1bc68c6-ccf3-4fdf-97c5-5a86928838f7",
      "name": "注意:Webhook 触发器",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1248,
        2000
      ],
      "parameters": {
        "color": 6,
        "width": 344,
        "height": 212,
        "content": "## 📥 当收到网站 URL 时"
      },
      "typeVersion": 1
    },
    {
      "id": "a1cef014-ddd9-4db2-8333-a7579608008e",
      "name": "注意:截图捕获",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1168,
        2464
      ],
      "parameters": {
        "color": 3,
        "width": 312,
        "height": 212,
        "content": "## 🖼️ 捕获网站截图"
      },
      "typeVersion": 1
    },
    {
      "id": "62e394c1-363f-4164-81f5-39cde9ca7b22",
      "name": "注意:内容获取",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -816,
        2000
      ],
      "parameters": {
        "color": 5,
        "width": 216,
        "height": 196,
        "content": "## 🌐 获取网站内容"
      },
      "typeVersion": 1
    },
    {
      "id": "21b9ad9a-cbb4-4ad2-94d7-6424bf906478",
      "name": "注意:提示生成",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -528,
        2464
      ],
      "parameters": {
        "color": 5,
        "width": 312,
        "height": 212,
        "content": "## ✍️ 生成 Logo 提示"
      },
      "typeVersion": 1
    },
    {
      "id": "cb688126-2285-4ff0-9beb-259c9d0f7c43",
      "name": "注意:Logo 生成",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -368,
        2000
      ],
      "parameters": {
        "color": 2,
        "width": 280,
        "height": 180,
        "content": "## 🎨 生成 Logo 图片"
      },
      "typeVersion": 1
    },
    {
      "id": "d470c3e0-e75b-455c-b514-7e242fe664dc",
      "name": "概述注释 5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1888,
        1808
      ],
      "parameters": {
        "color": 4,
        "width": 600,
        "height": 1100,
        "content": "# 🤖 从网站 URL 生成 AI Logo"
      },
      "typeVersion": 1
    },
    {
      "id": "ae9beb67-4ce8-43be-a73c-37fb446517fd",
      "name": "GPT-5 mini",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -640,
        2400
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5-mini",
          "cachedResultName": "gpt-5-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "ymMvgDroJHalwvRf",
          "name": "OpenAI"
        }
      },
      "typeVersion": 1.2
    }
  ],
  "pinData": {},
  "connections": {
    "GPT-5 mini": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Logo Prompt",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Generate Logo Image": {
      "main": [
        [
          {
            "node": "Respond with Logo",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Logo Prompt": {
      "main": [
        [
          {
            "node": "Generate Logo Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Website Content": {
      "main": [
        [
          {
            "node": "Generate Logo Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Website URL Received": {
      "main": [
        [
          {
            "node": "Capture Website Screenshot",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Capture Website Screenshot": {
      "main": [
        [
          {
            "node": "Fetch Website Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

中级

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
中级
节点数量13
分类-
节点类型7
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
Daniel Nkencho

Daniel Nkencho

@daniel-automates

AI Automation Consultant | Helping Business Owners Implement AI Systems for Growth and Lead Gen

外部链接
在 n8n.io 查看

分享此工作流