8
n8n 中文网amn8n.com

使用GPT-4.1和LangChain为Magento

中级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 11 个节点。主要使用 If, Code, FormTrigger, HttpRequest, Agent 等节点。 使用GPT-4.1和LangChain为Magento 2自动生成SEO元描述和关键词

前置要求
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "54d8e296590faa0bb0e9d6290ad6ee2f19b78aa7b248ecb45c5f7c5ff622d210",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "a811e531-c75d-4e16-a878-865bae3c3bfd",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -1220,
        300
      ],
      "webhookId": "e441bdd8-6557-4b93-9d3a-8530db0d6b92",
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "c6f37027-62d2-4970-b16a-2eb14f56b9ed",
      "name": "Get Product By SKU",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1000,
        300
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "47f2485b-cd4d-44a8-b3c7-3e3e1fee12b5",
      "name": "Code",
      "type": "n8n-nodes-base.code",
      "position": [
        -500,
        80
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "638900a5-efe7-4499-b51f-09b2ec1f38f8",
      "name": "AI Meta Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -260,
        80
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 1.7
    },
    {
      "id": "3c3e7fec-2f31-458c-9129-effad4e10baa",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -340,
        360
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "f09995d4-703a-4849-99bb-3b5a4fc152a7",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        20,
        360
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "5d13b7fb-27cd-4898-a0c6-5b88f618de8d",
      "name": "SerpAPI",
      "type": "@n8n/n8n-nodes-langchain.toolSerpApi",
      "disabled": true,
      "position": [
        -160,
        360
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "14f21035-1c8d-47c9-a3ab-c90aacc8889e",
      "name": "Update Product Meta Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        180,
        80
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "2079e7ad-f704-4177-b6e7-e255910f9266",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1260,
        -20
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "8c203609-5553-4a1f-9bac-fdff01b2ee3a",
      "name": "Checks If SKU exists",
      "type": "n8n-nodes-base.if",
      "position": [
        -780,
        300
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "d0db2725-a786-427d-ba44-872d323930d0",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -520,
        -20
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "47f2485b-cd4d-44a8-b3c7-3e3e1fee12b5": {
      "main": [
        [
          {
            "node": "638900a5-efe7-4499-b51f-09b2ec1f38f8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5d13b7fb-27cd-4898-a0c6-5b88f618de8d": {
      "ai_tool": [
        [
          {
            "node": "638900a5-efe7-4499-b51f-09b2ec1f38f8",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "638900a5-efe7-4499-b51f-09b2ec1f38f8": {
      "main": [
        [
          {
            "node": "14f21035-1c8d-47c9-a3ab-c90aacc8889e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c6f37027-62d2-4970-b16a-2eb14f56b9ed": {
      "main": [
        [
          {
            "node": "8c203609-5553-4a1f-9bac-fdff01b2ee3a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a811e531-c75d-4e16-a878-865bae3c3bfd": {
      "main": [
        [
          {
            "node": "c6f37027-62d2-4970-b16a-2eb14f56b9ed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3c3e7fec-2f31-458c-9129-effad4e10baa": {
      "ai_languageModel": [
        [
          {
            "node": "638900a5-efe7-4499-b51f-09b2ec1f38f8",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "8c203609-5553-4a1f-9bac-fdff01b2ee3a": {
      "main": [
        [
          {
            "node": "47f2485b-cd4d-44a8-b3c7-3e3e1fee12b5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f09995d4-703a-4849-99bb-3b5a4fc152a7": {
      "ai_outputParser": [
        [
          {
            "node": "638900a5-efe7-4499-b51f-09b2ec1f38f8",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

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

需要付费吗?

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

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

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

作者
Kanaka Kishore Kandregula

Kanaka Kishore Kandregula

@kmyprojects

Experienced Magento 2 Developer with 10+ years of expertise in building and optimizing eCommerce solutions. Over the past year, I’ve expanded my skills into workflow automation using n8n, streamlining business processes and integrating systems for efficiency. Passionate about solving complex problems, enhancing performance, and leveraging automation to drive smarter workflows.

外部链接
在 n8n.io 查看

分享此工作流

分类

分类: 34