使用GPT-4.1和LangChain为Magento 2自动生成SEO元描述和关键词
这是一个Content Creation、Multimodal AI领域的自动化工作流,包含 11 个节点。主要使用 If、Code、FormTrigger、HttpRequest、Agent 等节点。 使用GPT-4.1和LangChain为Magento 2自动生成SEO元描述和关键词
- •可能需要目标 API 的认证凭证
- •OpenAI API Key
使用的节点 (11 个)
{
"meta": {
"instanceId": "54d8e296590faa0bb0e9d6290ad6ee2f19b78aa7b248ecb45c5f7c5ff622d210",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "a811e531-c75d-4e16-a878-865bae3c3bfd",
"name": "表单提交时",
"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": "通过SKU获取产品",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1000,
300
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "47f2485b-cd4d-44a8-b3c7-3e3e1fee12b5",
"name": "代码",
"type": "n8n-nodes-base.code",
"position": [
-500,
80
],
"parameters": {},
"typeVersion": 2
},
{
"id": "638900a5-efe7-4499-b51f-09b2ec1f38f8",
"name": "AI元代理",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-260,
80
],
"parameters": {},
"retryOnFail": true,
"typeVersion": 1.7
},
{
"id": "3c3e7fec-2f31-458c-9129-effad4e10baa",
"name": "OpenAI 聊天模型1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-340,
360
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "f09995d4-703a-4849-99bb-3b5a4fc152a7",
"name": "结构化输出解析器",
"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": "更新产品元数据",
"type": "n8n-nodes-base.httpRequest",
"position": [
180,
80
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "2079e7ad-f704-4177-b6e7-e255910f9266",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1260,
-20
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "8c203609-5553-4a1f-9bac-fdff01b2ee3a",
"name": "检查SKU是否存在",
"type": "n8n-nodes-base.if",
"position": [
-780,
300
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "d0db2725-a786-427d-ba44-872d323930d0",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-520,
-20
],
"parameters": {
"content": ""
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Code": {
"main": [
[
{
"node": "AI Meta Agent",
"type": "main",
"index": 0
}
]
]
},
"SerpAPI": {
"ai_tool": [
[
{
"node": "AI Meta Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"AI Meta Agent": {
"main": [
[
{
"node": "Update Product Meta Data",
"type": "main",
"index": 0
}
]
]
},
"Get Product By SKU": {
"main": [
[
{
"node": "Checks If SKU exists",
"type": "main",
"index": 0
}
]
]
},
"On form submission": {
"main": [
[
{
"node": "Get Product By SKU",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model1": {
"ai_languageModel": [
[
{
"node": "AI Meta Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Checks If SKU exists": {
"main": [
[
{
"node": "Code",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "AI Meta Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
}
}
}如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
这是一个中级难度的工作流,适用于Content Creation、Multimodal AI等场景。适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
Kanaka Kishore Kandregula
@kmyprojectsExperienced 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.
分享此工作流