8
n8n 中文网amn8n.com

将新的 Shopify 产品同步到 Odoo 产品

初级

这是一个Marketing, IT Ops领域的自动化工作流,包含 5 个节点。主要使用 Code, Odoo, Filter, ShopifyTrigger 等节点。 将新的 Shopify 产品同步至 Odoo 产品

前置要求
  • Shopify Admin API 凭证

使用的节点 (5)

工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "44PIIGwPzUe9dGfb",
  "meta": {
    "instanceId": "6b3e8c6c30cdfbf06283a3fa57016932c6b4ec959896c5c546ef5865ff697ff1"
  },
  "name": "将新的 Shopify 产品同步到 Odoo 产品",
  "tags": [],
  "nodes": [
    {
      "id": "5ad7f941-4146-4897-ad30-dcdccab85e82",
      "name": "Odoo6",
      "type": "n8n-nodes-base.odoo",
      "position": [
        320,
        0
      ],
      "parameters": {
        "limit": 1,
        "options": {},
        "resource": "custom",
        "operation": "getAll",
        "filterRequest": {
          "filter": [
            {
              "value": "={{ $('Shopify Trigger').all()[0].json.variants[0].product_id }}",
              "fieldName": "default_code"
            }
          ]
        },
        "customResource": "product.product"
      },
      "credentials": {
        "odooApi": {
          "id": "0qIK4Cq1BwOSbxT8",
          "name": "Odoo 148.66.157.208:8069"
        }
      },
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "1b1a3753-e645-465c-8155-ad8c006f3e13",
      "name": "过滤器2",
      "type": "n8n-nodes-base.filter",
      "position": [
        740,
        0
      ],
      "parameters": {
        "conditions": {
          "boolean": [
            {
              "value1": "={{ $json.existing }}"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "5b388afc-de9a-4246-85a8-0ef4ec8ac0bc",
      "name": "Odoo7",
      "type": "n8n-nodes-base.odoo",
      "position": [
        920,
        0
      ],
      "parameters": {
        "resource": "custom",
        "customResource": "product.product",
        "fieldsToCreateOrUpdate": {
          "fields": [
            {
              "fieldName": "name",
              "fieldValue": "={{ $json.product_detail.title }}"
            },
            {
              "fieldName": "default_code",
              "fieldValue": "={{ $json.product_detail.variants[0].product_id }}"
            },
            {
              "fieldName": "description",
              "fieldValue": "={{ $json.product_detail.body_html }}"
            },
            {
              "fieldName": "list_price",
              "fieldValue": "={{ $json.product_detail.variants[0].price }}"
            }
          ]
        }
      },
      "credentials": {
        "odooApi": {
          "id": "0qIK4Cq1BwOSbxT8",
          "name": "Odoo 148.66.157.208:8069"
        }
      },
      "typeVersion": 1,
      "alwaysOutputData": false
    },
    {
      "id": "765aeea5-bfe8-4d6c-96a4-ebbc192a9d60",
      "name": "Shopify 触发器",
      "type": "n8n-nodes-base.shopifyTrigger",
      "position": [
        80,
        0
      ],
      "webhookId": "30b89f06-e54c-4461-9e1e-9ef7f221e08b",
      "parameters": {
        "topic": "products/create",
        "authentication": "accessToken"
      },
      "credentials": {
        "shopifyAccessTokenApi": {
          "id": "zkXzZzc97XyALfN8",
          "name": "Evozard - Shopify"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e1b2f842-0b54-4f55-9c69-a4d40777fd0c",
      "name": "代码",
      "type": "n8n-nodes-base.code",
      "position": [
        560,
        0
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "var product_detail = $('Shopify Trigger').first().json\nconsole.log('-------product_detail--------',product_detail)\nvar existing_product = $('Odoo6').item.json\nreturn {existing:existing_product.id ? true:false,product_detail:product_detail}\n"
      },
      "typeVersion": 2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "5dc6f917-daa8-4819-b8ff-1c46ab75b680",
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "Filter2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Odoo6": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter2": {
      "main": [
        [
          {
            "node": "Odoo7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Shopify Trigger": {
      "main": [
        [
          {
            "node": "Odoo6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

初级 - 营销, IT 运维

需要付费吗?

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

工作流信息
难度等级
初级
节点数量5
分类2
节点类型4
难度说明

适合 n8n 新手,包含 1-5 个节点的简单工作流

作者

🚀 AI & Automation Expert | n8n Creator I specialize in building AI-powered automation and workflow solutions using n8n and no-code/low-code tools. With extensive experience in process automation, system integration, and AI-driven workflows, I help businesses streamline operations, enhance productivity, and reduce manual effort. Passionate about scalable automation that drives efficiency and growth.

外部链接
在 n8n.io 查看

分享此工作流