通过REST API修复并重新发送Magento 2访客订单邮件

中级

这是一个CRM领域的自动化工作流,包含 10 个节点。主要使用 If、Code、MySql、FormTrigger、HttpRequest 等节点。 通过REST API修复并重新发送Magento 2访客订单邮件

前置要求
  • MySQL 数据库连接信息
  • 可能需要目标 API 的认证凭证

分类

工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "54d8e296590faa0bb0e9d6290ad6ee2f19b78aa7b248ecb45c5f7c5ff622d210",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "f51fc817-6fe6-47aa-9fb2-a74614417162",
      "name": "表单提交时",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -660,
        -180
      ],
      "webhookId": "e441bdd8-6557-4b93-9d3a-8530db0d6b92",
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "cc5e2ab4-04a7-4e2c-acbe-1cfbb74f5c7c",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -740,
        -260
      ],
      "parameters": {
        "content": "### 要求"
      },
      "typeVersion": 1
    },
    {
      "id": "9a28e493-cb2e-4a95-ac1a-925b80897035",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -20,
        -260
      ],
      "parameters": {
        "content": "### 要求"
      },
      "typeVersion": 1
    },
    {
      "id": "63d44194-73e7-43f5-9553-4ece56b67619",
      "name": "按增量ID获取订单",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -440,
        -180
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "eae95104-f7ab-410e-a150-6fba641bc6aa",
      "name": "检查订单是否存在",
      "type": "n8n-nodes-base.if",
      "position": [
        -220,
        -180
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "79745ed9-731d-404b-a487-25bd2a3afcca",
      "name": "代码",
      "type": "n8n-nodes-base.code",
      "position": [
        0,
        -180
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "9b7ab232-4046-4acc-bbb0-3f001e05590b",
      "name": "更新访客订单邮箱",
      "type": "n8n-nodes-base.mySql",
      "position": [
        220,
        -180
      ],
      "parameters": {},
      "typeVersion": 2.4
    },
    {
      "id": "0fff6518-a075-4deb-8d77-5c31b8d83917",
      "name": "重新发送订单确认",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        660,
        -180
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "c228566c-7f60-4524-b626-e3d825cfc21c",
      "name": "检查是否需要重新发送",
      "type": "n8n-nodes-base.if",
      "position": [
        440,
        -180
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "88bbb3e5-f5ec-43e4-aa4a-696dbee08aed",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -740,
        -440
      ],
      "parameters": {
        "content": "### 要求"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "Update Guest Order Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Checks for Resend": {
      "main": [
        [
          {
            "node": "resend order confirmation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Get Order By Increment ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Checks If Order Exist": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Guest Order Email": {
      "main": [
        [
          {
            "node": "Checks for Resend",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Order By Increment ID": {
      "main": [
        [
          {
            "node": "Checks If Order Exist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

这是一个中级难度的工作流,适用于CRM等场景。适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

需要付费吗?

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

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

适合有一定经验的用户,包含 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 上查看 →

分享此工作流