8
n8n 中文网amn8n.com

Telegram AI文生图(Gemini + Hugging Face FLUX)

中级

这是一个AI领域的自动化工作流,包含 9 个节点。主要使用 Telegram, HttpRequest, Agent, TelegramTrigger, LmChatGoogleGemini 等节点,结合人工智能技术实现智能自动化。 Telegram AI文生图(Gemini + Hugging Face FLUX)

前置要求
  • Telegram Bot Token
  • 可能需要目标 API 的认证凭证
  • Google Gemini API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "d04643ba872bb0fb252ed2c8197858d58cc47dd3c15ff6d08b19addd679e927b",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "c81aef50-92fc-461e-9dae-45fb936f1fb6",
      "name": "Telegram 触发器",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -460,
        -220
      ],
      "webhookId": "1eb2042d-f833-49eb-b69c-115cf5c4e729",
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "c753e481-79f5-4171-a7db-895c423154a2",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -180,
        -220
      ],
      "parameters": {},
      "typeVersion": 1.9
    },
    {
      "id": "2fda98bd-bc78-45dd-ad82-047904965df1",
      "name": "Google Gemini聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -80,
        80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f69e1aee-4bce-4eaf-afce-0dcff517e779",
      "name": "Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1060,
        -180
      ],
      "webhookId": "12236037-3950-42b7-9121-83076bcb24f7",
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "f0fc7c0c-609b-4714-be3e-40423a1a5e9f",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -580,
        -500
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "6031ea65-9875-4c7c-ac8c-812546c0bd08",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -200,
        0
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "435da6ad-401f-4912-b943-4d93722e696e",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        180,
        -700
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "fcccddcb-6af2-4a88-99c6-c43077527d2f",
      "name": "HTTP 请求 (Huggingface)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        540,
        -180
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "15aab548-038b-4349-9233-4c7ed03ea843",
      "name": "HTTP 请求 (下载图片)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        840,
        -180
      ],
      "parameters": {},
      "typeVersion": 4.2
    }
  ],
  "pinData": {},
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "HTTP Request (Huggingface)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request (Huggingface)": {
      "main": [
        [
          {
            "node": "HTTP Request(download_image)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request(download_image)": {
      "main": [
        [
          {
            "node": "Send Image (back to the chat via telegram)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 人工智能

需要付费吗?

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

工作流信息
难度等级
中级
节点数量9
分类1
节点类型6
难度说明

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

外部链接
在 n8n.io 查看

分享此工作流