8
n8n 中文网amn8n.com

自动发布到 WooCommerce_模板

高级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 26 个节点。主要使用 If, Set, Code, Wait, Telegram 等节点。 自动将Telegram频道帖子转换为WooCommerce产品

前置要求
  • Telegram Bot Token
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "sSqJNShO1lSW7pDR",
  "meta": {
    "instanceId": "f5aa635d637faa7cf397adde51f1a02fdf8ac6454c1c6457738ffd11609a900c",
    "templateCredsSetupCompleted": true
  },
  "name": "自动发布到 WooCommerce_模板",
  "tags": [
    {
      "id": "GvyyqNQKMajZL27F",
      "name": "Template",
      "createdAt": "2025-09-18T07:14:31.617Z",
      "updatedAt": "2025-09-18T07:14:31.617Z"
    }
  ],
  "nodes": [
    {
      "id": "e966e752-5474-4e9f-840e-7605dd3065e7",
      "name": "Telegram 触发器",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -496,
        -352
      ],
      "webhookId": "e6e194e8-9087-4543-a1a6-7399db513f52",
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "f1828cff-a28e-4d55-be61-efb7499d711c",
      "name": "代码",
      "type": "n8n-nodes-base.code",
      "position": [
        176,
        -256
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "510a7a54-e603-4611-b71c-0d50f076c585",
      "name": "创建产品",
      "type": "n8n-nodes-base.wooCommerce",
      "position": [
        1520,
        -256
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "bafc8bd9-191d-4426-bf53-ba9e86428432",
      "name": "获取文件",
      "type": "n8n-nodes-base.telegram",
      "position": [
        624,
        -256
      ],
      "webhookId": "eee98b0f-5204-4577-b556-1dfd16b1fb98",
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "6681ddd1-00ad-4c96-9446-df536ea72b62",
      "name": "获取分类",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1072,
        -256
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "3d6611ad-212f-4223-933d-8aa0ea373861",
      "name": "如果",
      "type": "n8n-nodes-base.if",
      "position": [
        -48,
        -352
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "5d30354c-a6f9-444e-b7b7-3f53e143bb8a",
      "name": "从磁盘读取/写入文件",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        1840,
        -256
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "92031371-df3c-4bf5-9c55-440b11103ee7",
      "name": "转换为文件",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        1696,
        -256
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "c959ec8c-62a9-45cc-8d14-80e97a625691",
      "name": "获取文件1",
      "type": "n8n-nodes-base.telegram",
      "position": [
        176,
        -448
      ],
      "webhookId": "5c96e4e1-2a95-40c1-ada4-0b6328d538c3",
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "479b4163-08f0-4c8f-82b0-630b6e22f091",
      "name": "等待",
      "type": "n8n-nodes-base.wait",
      "position": [
        624,
        -448
      ],
      "webhookId": "c9007e03-a2bf-4d19-a966-4e0e77a6fb5a",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "607c1bdd-8492-484a-8f72-7a13cde71710",
      "name": "从磁盘读取/写入文件1",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        848,
        -448
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "6f2b3798-8b89-4aee-a8a9-04a170bbc973",
      "name": "附加图片",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1744,
        -448
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "98d6ca10-c43b-45d5-98bb-59e1d35a9191",
      "name": "获取产品",
      "type": "n8n-nodes-base.wooCommerce",
      "position": [
        1296,
        -448
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "dfe4dfe9-6b1c-40e2-84b3-021e0532d720",
      "name": "最后保存的 Json",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1072,
        -448
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "ef828ca3-91b0-4002-9469-45c544e69d7d",
      "name": "代码3",
      "type": "n8n-nodes-base.code",
      "notes": "Push to images Arr",
      "position": [
        1520,
        -448
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 2
    },
    {
      "id": "a6fe4653-4b74-4004-b3bb-4d50c35150af",
      "name": "上传图片",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        400,
        -448
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "f8c39952-2732-4b1d-9c5a-126e8729722f",
      "name": "上传图片1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        848,
        -256
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "0c30126b-0d99-438f-94c6-32f0ab815902",
      "name": "如果有照片",
      "type": "n8n-nodes-base.if",
      "position": [
        400,
        -256
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "8a2648c0-ba30-4a6e-88ff-316794d251e9",
      "name": "设置字段",
      "type": "n8n-nodes-base.set",
      "position": [
        -272,
        -352
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "ffb95b43-c697-4d04-afa5-65b262cb6243",
      "name": "从文本查找分类 ID",
      "type": "n8n-nodes-base.code",
      "position": [
        1296,
        -256
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "bfd046f2-fad4-4eb3-8eda-423fcc99858f",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -800
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "db8f0adc-5037-49eb-8105-05a9c6f37df2",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        -560
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "bff925fb-7c60-490d-89ad-2504c4c1e439",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        992,
        -288
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "448edca4-21a3-45d5-84e7-d92352c86cc6",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        -288
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "32c79d06-afa1-4d58-ad5f-7e3dcfe75720",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        368,
        -288
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "b262afaa-9d23-43d8-b54a-27496c156ac2",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1456,
        -288
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "6581f90d-610a-4e9f-ab51-523a89b65e67",
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Get a file1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code": {
      "main": [
        [
          {
            "node": "IfHasPhoto",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Read/Write Files from Disk1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code3": {
      "main": [
        [
          {
            "node": "AppendImages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SetFields": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get a file": {
      "main": [
        [
          {
            "node": "UploadImage1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IfHasPhoto": {
      "main": [
        [
          {
            "node": "Get a file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get a file1": {
      "main": [
        [
          {
            "node": "UploadImage",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "UploadImage": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "UploadImage1": {
      "main": [
        [
          {
            "node": "GetCategories",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get a product": {
      "main": [
        [
          {
            "node": "Code3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GetCategories": {
      "main": [
        [
          {
            "node": "FindCatId_From_Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "LastSavedJson": {
      "main": [
        [
          {
            "node": "Get a product",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "Read/Write Files from Disk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a product": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "SetFields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "FindCatId_From_Text": {
      "main": [
        [
          {
            "node": "Create a product",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read/Write Files from Disk1": {
      "main": [
        [
          {
            "node": "LastSavedJson",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 内容创作, 多模态 AI

需要付费吗?

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

工作流信息
难度等级
高级
节点数量26
分类2
节点类型12
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者
Shohani

Shohani

@shohani

Software Developer Since 2004

外部链接
在 n8n.io 查看

分享此工作流