自然言語による WooCommerce 管理

上級

これはContent Creation, Multimodal AI分野の自動化ワークフローで、28個のノードを含みます。主にAgent, WooCommerceTool, McpTrigger, ChatTrigger, LmChatOpenAiなどのノードを使用。 GPT-4.1とMCPサーバーで自然言語管理によるWooCommerceストアを管理

前提条件
  • OpenAI API Key
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "hm1wXpMtuPsBRlzQ",
  "meta": {
    "instanceId": "cbe443dad974471e0b4f8b19ab92782e168bbdef84a3d0b94f5f96a67e01c92c",
    "templateCredsSetupCompleted": true
  },
  "name": "WooCommerceMCP",
  "tags": [],
  "nodes": [
    {
      "id": "931451bd-28db-4a2b-9575-1e74c7dfa6c4",
      "name": "AIエージェント",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1616,
        80
      ],
      "parameters": {
        "options": {
          "systemMessage": "You are an AI Commerce Assistant integrated with a WooCommerce MCP Server (via n8n).\nYour goal is to help users manage their WooCommerce store efficiently with minimal friction by intelligently using the available MCP tools.\n\n🔑 Core Principles\n\nMinimize Questions\n\nBefore asking the user for any detail, always attempt to retrieve it automatically using available MCP tools (e.g., fetch customer, product, order records).\n\nIf a detail can be derived from context (e.g., “latest order” → fetch most recent order), do so without asking.\n\nOnly ask the user if the information cannot be inferred or retrieved.\n\nContext-Aware Automation\n\nUse prior conversation history and WooCommerce data to fill in missing fields.\n\nWhen multiple matches are possible (e.g., two customers with similar names), suggest the best match and confirm only if needed.\n\nDefault to sensible values when options are ambiguous (e.g., if product variant unspecified, pick best-seller or default variation).\n\nUser Experience (UX) First\n\nRespond clearly, concisely, and in natural language.\n\nAvoid technical jargon unless explicitly requested.\n\nSummarize actions before execution only when they are irreversible (e.g., refunding an order).\n\nAction Orientation\n\nAlways try to take direct action rather than explaining how.\n\nFor requests like “create a coupon,” “add product,” “check stock,” or “get sales report,” immediately call the appropriate MCP tool and provide results.\n\nError & Fallback Handling\n\nIf a tool call fails, retry with adjusted parameters (e.g., fuzzy search for names).\n\nIf still unsuccessful, explain clearly what’s missing and ask the user only for that specific piece of info.\n\nNever overwhelm the user with multiple technical errors.\n\n⚙️ Available Capabilities (via MCP Server Tools)\n\nCustomer Management: Create, update, fetch, and search customers.\n\nProduct Management: Create, update, fetch, and search products, categories, stock.\n\nOrder Management: Create, update, fetch, search, and refund orders.\n\nReports & Analytics: Fetch sales reports, top products, low-stock items, revenue insights.\n\nCoupons & Discounts: Create, fetch, and manage coupons.\n\nStore Settings: Fetch store details, currency, tax rates.\n\n📝 Behavioral Guidelines\n\nDefault to automation: Always use available MCP tools before asking for details.\n\nSmart filling: Auto-populate fields (e.g., customer email from prior orders).\n\nConcise responses: Provide clear, user-friendly summaries of results.\n\nProgressive disclosure: Share only the info relevant to the request; provide deeper details only if asked.\n\nConfirmation required for critical actions: Refunds, deletions, or bulk updates.\n\n✅ Example Behaviors\n\nUser: \"Create an order for John Doe for 2 T-shirts.\"\n\nAuto: Search customer → find John Doe’s ID.\n\nAuto: Search product “T-shirt” → resolve product ID + variation if default exists.\n\nAuto: Create order with quantity 2.\n\nRespond: “✅ Order #1234 created for John Doe (2 × T-shirt).”\n\nUser: \"Check today’s sales.\"\n\nAuto: Call sales report tool with today’s date.\n\nRespond: “📊 Today’s sales: $2,345 from 42 orders. Top product: Blue Hoodie.”\n\nUser: \"Add a new coupon.\"\n\nAuto: Ask only for missing details (e.g., discount percentage).\n\nDefault sensible values (expiry = 30 days, usage limit = unlimited).\n\nRespond: “🎟️ Coupon ‘SAVE10’ created: 10% off, valid for 30 days.”\n\n🔒 Final Rule: Always act as a proactive assistant—reduce friction, retrieve what you can, ask the minimum necessary, and deliver results efficiently."
        }
      },
      "typeVersion": 2
    },
    {
      "id": "040bd0e2-cf68-47a6-b179-196c3df8ed92",
      "name": "OpenAI チャットモデル",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1536,
        320
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "PZKWI5QVcBWITAgc",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "5b472f09-c37c-4c39-b1f3-5cc5840915c1",
      "name": "MCPクライアント",
      "type": "@n8n/n8n-nodes-langchain.mcpClientTool",
      "position": [
        1824,
        320
      ],
      "parameters": {
        "sseEndpoint": "http://localhost:5678/mcp/61f50ac7-9318-4b24-a682-4e45df349c2e/sse"
      },
      "typeVersion": 1
    },
    {
      "id": "b2a62d21-4035-4e76-9c54-88eae498c517",
      "name": "シンプルメモリ",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1680,
        320
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "723b4dcd-cefd-4ca5-988f-7244a2173c85",
      "name": "チャットメッセージ受信時",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        1648,
        -176
      ],
      "webhookId": "9c081beb-aeea-4679-89df-084b99c58eae",
      "parameters": {
        "public": true,
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "95175abc-064f-4c67-9aed-6685277d23d5",
      "name": "WooCommerce ツールMCPサーバー",
      "type": "@n8n/n8n-nodes-langchain.mcpTrigger",
      "position": [
        704,
        -224
      ],
      "webhookId": "61f50ac7-9318-4b24-a682-4e45df349c2e",
      "parameters": {
        "path": "61f50ac7-9318-4b24-a682-4e45df349c2e"
      },
      "typeVersion": 1
    },
    {
      "id": "4c777f10-337a-44c7-be1a-39cbe300efaa",
      "name": "WooCommerceで顧客を作成",
      "type": "n8n-nodes-base.wooCommerceTool",
      "position": [
        336,
        48
      ],
      "parameters": {
        "email": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Email', ``, 'string') }}",
        "resource": "customer",
        "additionalFields": {
          "billing": {
            "city": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('City', ``, 'string') }}",
            "email": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Email', ``, 'string') }}",
            "phone": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Phone', ``, 'string') }}",
            "state": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('State', ``, 'string') }}",
            "company": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Company', ``, 'string') }}",
            "country": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Country', ``, 'string') }}",
            "postcode": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Postcode', ``, 'string') }}",
            "address_1": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Address_1', ``, 'string') }}",
            "address_2": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Address_2', ``, 'string') }}",
            "last_name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Last_Name', ``, 'string') }}",
            "first_name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('First_Name', ``, 'string') }}"
          },
          "password": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Password', ``, 'string') }}",
          "shipping": {
            "city": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('City', ``, 'string') }}",
            "email": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Email', ``, 'string') }}",
            "phone": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Phone', ``, 'string') }}",
            "state": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('State', ``, 'string') }}",
            "company": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Company', ``, 'string') }}",
            "country": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Country', ``, 'string') }}",
            "postcode": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Postcode', ``, 'string') }}",
            "address_1": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Address_1', ``, 'string') }}",
            "address_2": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Address_2', ``, 'string') }}",
            "last_name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Last_Name', ``, 'string') }}",
            "first_name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('First_Name', ``, 'string') }}"
          },
          "username": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Username', ``, 'string') }}",
          "last_name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Last_Name', ``, 'string') }}",
          "meta_data": {
            "meta_data_fields": [
              {
                "key": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('meta_data_fields0_Key', ``, 'string') }}",
                "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('meta_data_fields0_Value', ``, 'string') }}"
              }
            ]
          },
          "first_name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('First_Name', ``, 'string') }}"
        }
      },
      "credentials": {
        "wooCommerceApi": {
          "id": "lPZ1v567JsRzkX9o",
          "name": "WooCommerce account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "fc1c54b5-f821-4d77-976f-90947bfda805",
      "name": "WooCommerceで複数顧客を取得",
      "type": "n8n-nodes-base.wooCommerceTool",
      "position": [
        560,
        48
      ],
      "parameters": {
        "filters": {},
        "resource": "customer",
        "operation": "getAll",
        "returnAll": true
      },
      "credentials": {
        "wooCommerceApi": {
          "id": "lPZ1v567JsRzkX9o",
          "name": "WooCommerce account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "252ba508-724f-4353-b8c8-a86d6202e776",
      "name": "WooCommerceでIDによる顧客取得",
      "type": "n8n-nodes-base.wooCommerceTool",
      "position": [
        752,
        48
      ],
      "parameters": {
        "resource": "customer",
        "operation": "get",
        "customerId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Customer_ID', ``, 'string') }}"
      },
      "credentials": {
        "wooCommerceApi": {
          "id": "lPZ1v567JsRzkX9o",
          "name": "WooCommerce account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2c52c751-a71c-4700-9e5a-6bd6c54d05f5",
      "name": "WooCommerceでメールによる顧客取得",
      "type": "n8n-nodes-base.wooCommerceTool",
      "position": [
        944,
        48
      ],
      "parameters": {
        "filters": {
          "email": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Email', ``, 'string') }}"
        },
        "resource": "customer",
        "operation": "getAll"
      },
      "credentials": {
        "wooCommerceApi": {
          "id": "lPZ1v567JsRzkX9o",
          "name": "WooCommerce account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "b879d7cc-0633-47de-b6b7-c80988ffe575",
      "name": "WooCommerceで顧客を更新",
      "type": "n8n-nodes-base.wooCommerceTool",
      "position": [
        1136,
        48
      ],
      "parameters": {
        "resource": "customer",
        "operation": "update",
        "customerId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Customer_ID', ``, 'string') }}",
        "updateFields": {
          "billing": {
            "city": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('City', ``, 'string') }}",
            "email": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Email', ``, 'string') }}",
            "phone": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Phone', ``, 'string') }}",
            "state": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('State', ``, 'string') }}",
            "company": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Company', ``, 'string') }}",
            "country": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Country', ``, 'string') }}",
            "postcode": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Postcode', ``, 'string') }}",
            "address_1": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Address_1', ``, 'string') }}",
            "address_2": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Address_2', ``, 'string') }}",
            "last_name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Last_Name', ``, 'string') }}",
            "first_name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('First_Name', ``, 'string') }}"
          },
          "shipping": {
            "city": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('City', ``, 'string') }}",
            "email": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Email', ``, 'string') }}",
            "phone": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Phone', ``, 'string') }}",
            "state": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('State', ``, 'string') }}",
            "company": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Company', ``, 'string') }}",
            "country": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Country', ``, 'string') }}",
            "postcode": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Postcode', ``, 'string') }}",
            "address_1": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Address_1', ``, 'string') }}",
            "address_2": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Address_2', ``, 'string') }}",
            "last_name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Last_Name', ``, 'string') }}",
            "first_name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('First_Name', ``, 'string') }}"
          },
          "last_name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Last_Name', ``, 'string') }}",
          "first_name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('First_Name', ``, 'string') }}"
        }
      },
      "credentials": {
        "wooCommerceApi": {
          "id": "lPZ1v567JsRzkX9o",
          "name": "WooCommerce account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "b9374c93-805b-47b2-83a1-718eb7ef561c",
      "name": "WooCommerceで顧客を削除",
      "type": "n8n-nodes-base.wooCommerceTool",
      "position": [
        1344,
        48
      ],
      "parameters": {
        "resource": "customer",
        "operation": "delete",
        "customerId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Customer_ID', ``, 'string') }}"
      },
      "credentials": {
        "wooCommerceApi": {
          "id": "lPZ1v567JsRzkX9o",
          "name": "WooCommerce account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "0917dc25-5dfe-47cb-9200-c3857b41aeed",
      "name": "WooCommerceで商品を作成",
      "type": "n8n-nodes-base.wooCommerceTool",
      "position": [
        336,
        304
      ],
      "parameters": {
        "name": "={{ $fromAI('Product_Name', ``, 'string') }}",
        "imagesUi": {},
        "resource": "product",
        "operation": "create",
        "metadataUi": {},
        "dimensionsUi": {},
        "descriptionType": "auto",
        "additionalFields": {
          "sku": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('SKU', ``, 'string') }}",
          "slug": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Slug', ``, 'string') }}",
          "status": "draft",
          "featured": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Featured', ``, 'boolean') }}",
          "salePrice": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Sale_Price', ``, 'string') }}",
          "backorders": "no",
          "buttonText": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Button_Text', ``, 'string') }}",
          "categories": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Category_Names_or_IDs', ``, 'string') }}",
          "description": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Description', ``, 'string') }}",
          "downloadable": true,
          "purchaseNote": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Purchase_Note', ``, 'string') }}",
          "regularPrice": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Regular_Price', ``, 'string') }}",
          "reviewsAllowed": true,
          "shortDescription": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Short_Description', ``, 'string') }}",
          "catalogVisibility": "visible"
        }
      },
      "credentials": {
        "wooCommerceApi": {
          "id": "lPZ1v567JsRzkX9o",
          "name": "WooCommerce account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "7925298b-8030-454d-a23e-cdb70aeb9c25",
      "name": "WooCommerceでIDによる商品取得",
      "type": "n8n-nodes-base.wooCommerceTool",
      "position": [
        752,
        304
      ],
      "parameters": {
        "operation": "get",
        "productId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Product_ID', ``, 'string') }}"
      },
      "credentials": {
        "wooCommerceApi": {
          "id": "lPZ1v567JsRzkX9o",
          "name": "WooCommerce account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "264e7738-26b5-466c-9b6d-3cf4335525fa",
      "name": "WooCommerceで複数商品を取得",
      "type": "n8n-nodes-base.wooCommerceTool",
      "position": [
        560,
        304
      ],
      "parameters": {
        "options": {},
        "operation": "getAll",
        "returnAll": true
      },
      "credentials": {
        "wooCommerceApi": {
          "id": "lPZ1v567JsRzkX9o",
          "name": "WooCommerce account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e983c804-3ae0-435d-bb0b-a9f1d7db58ae",
      "name": "WooCommerceでカテゴリー名による商品検索",
      "type": "n8n-nodes-base.wooCommerceTool",
      "position": [
        944,
        304
      ],
      "parameters": {
        "options": {
          "search": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Search', ``, 'string') }}"
        },
        "operation": "getAll",
        "returnAll": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Return_All', ``, 'boolean') }}"
      },
      "credentials": {
        "wooCommerceApi": {
          "id": "lPZ1v567JsRzkX9o",
          "name": "WooCommerce account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8c4bcf41-e3d6-4aa5-898e-7a65db5cfb12",
      "name": "WooCommerceで商品を更新",
      "type": "n8n-nodes-base.wooCommerceTool",
      "position": [
        1136,
        304
      ],
      "parameters": {
        "operation": "update",
        "productId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Product_ID', ``, 'string') }}",
        "metadataUi": {
          "metadataValues": [
            {
              "key": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('metadataValues0_Key', ``, 'string') }}",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('metadataValues0_Value', ``, 'string') }}"
            }
          ]
        },
        "dimensionsUi": {
          "dimensionsValues": {
            "width": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Width', ``, 'string') }}",
            "height": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Height', ``, 'string') }}",
            "length": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Length', ``, 'string') }}"
          }
        },
        "updateFields": {
          "sku": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('SKU', ``, 'string') }}",
          "name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Name', ``, 'string') }}",
          "slug": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Slug', ``, 'string') }}",
          "tags": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Tag_Names_or_IDs', ``, 'string') }}",
          "type": "simple",
          "status": "publish",
          "weight": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Weight', ``, 'string') }}",
          "virtual": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Virtual', ``, 'boolean') }}",
          "featured": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Featured', ``, 'boolean') }}",
          "parentId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Parent_ID', ``, 'string') }}",
          "taxClass": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Tax_Class', ``, 'string') }}",
          "menuOrder": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Menu_Order', ``, 'number') }}",
          "salePrice": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Sale_Price', ``, 'string') }}",
          "taxStatus": "taxable",
          "upsellIds": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Upsell_IDs', ``, 'string') }}",
          "backorders": "no",
          "buttonText": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Button_Text', ``, 'string') }}",
          "categories": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Category_Names_or_IDs', ``, 'string') }}",
          "description": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Description', ``, 'string') }}",
          "externalUrl": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('External_URL', ``, 'string') }}",
          "manageStock": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Manage_Stock', ``, 'boolean') }}",
          "stockStatus": "instock",
          "crossSellIds": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Cross_Sell_IDs', ``, 'string') }}",
          "dateOnSaleTo": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Date_On_Sale_To', ``, 'string') }}",
          "downloadable": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Downloadable', ``, 'boolean') }}",
          "purchaseNote": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Purchase_Note', ``, 'string') }}",
          "regularPrice": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Regular_Price', ``, 'string') }}",
          "shippingClass": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Shipping_Class', ``, 'string') }}",
          "stockQuantity": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Stock_Quantity', ``, 'number') }}",
          "dateOnSaleFrom": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Date_On_Sale_From', ``, 'string') }}",
          "reviewsAllowed": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Reviews_Allowed', ``, 'boolean') }}",
          "shortDescription": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Short_Description', ``, 'string') }}",
          "soldIndividually": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Sold_Individually', ``, 'boolean') }}",
          "catalogVisibility": "visible"
        }
      },
      "credentials": {
        "wooCommerceApi": {
          "id": "lPZ1v567JsRzkX9o",
          "name": "WooCommerce account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "5d8ef615-41e4-4e1c-bdb8-e0c1afa27fce",
      "name": "WooCommerceで商品を削除",
      "type": "n8n-nodes-base.wooCommerceTool",
      "position": [
        1344,
        304
      ],
      "parameters": {
        "operation": "delete",
        "productId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Product_ID', ``, 'string') }}"
      },
      "credentials": {
        "wooCommerceApi": {
          "id": "lPZ1v567JsRzkX9o",
          "name": "WooCommerce account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "37a9ce0e-f595-478d-be8a-98394aa01427",
      "name": "WooCommerceで注文を作成",
      "type": "n8n-nodes-base.wooCommerceTool",
      "position": [
        336,
        544
      ],
      "parameters": {
        "resource": "order",
        "billingUi": {},
        "operation": "create",
        "feeLinesUi": {},
        "metadataUi": {},
        "shippingUi": {},
        "lineItemsUi": {
          "lineItemsValues": [
            {
              "name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('lineItemsValues0_Name', ``, 'string') }}",
              "total": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('lineItemsValues0_Total', ``, 'string') }}",
              "quantity": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('lineItemsValues0_Quantity', ``, 'number') }}",
              "subtotal": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('lineItemsValues0_Subtotal', ``, 'string') }}",
              "taxClass": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('lineItemsValues0_Tax_Class', ``, 'string') }}",
              "productId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('lineItemsValues0_Product_ID', ``, 'number') }}",
              "metadataUi": {},
              "variationId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('lineItemsValues0_Variation_ID', ``, 'number') }}"
            }
          ]
        },
        "couponLinesUi": {},
        "descriptionType": "auto",
        "shippingLinesUi": {},
        "additionalFields": {
          "setPaid": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Set_Paid', ``, 'boolean') }}",
          "currency": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Currency', ``, 'string') }}",
          "customerId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Customer_ID', ``, 'string') }}",
          "customerNote": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Customer_Note', ``, 'string') }}"
        }
      },
      "credentials": {
        "wooCommerceApi": {
          "id": "lPZ1v567JsRzkX9o",
          "name": "WooCommerce account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "70800c56-cfb4-4454-b0fb-e2b99a889207",
      "name": "WooCommerceで注文を取得",
      "type": "n8n-nodes-base.wooCommerceTool",
      "position": [
        752,
        544
      ],
      "parameters": {
        "orderId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Order_ID', ``, 'string') }}",
        "resource": "order",
        "operation": "get"
      },
      "credentials": {
        "wooCommerceApi": {
          "id": "lPZ1v567JsRzkX9o",
          "name": "WooCommerce account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f0a7a1c1-a5c8-4f17-a0c4-a9052fc777ac",
      "name": "WooCommerceで複数注文を取得",
      "type": "n8n-nodes-base.wooCommerceTool",
      "position": [
        560,
        544
      ],
      "parameters": {
        "options": {},
        "resource": "order",
        "operation": "getAll",
        "returnAll": true
      },
      "credentials": {
        "wooCommerceApi": {
          "id": "lPZ1v567JsRzkX9o",
          "name": "WooCommerce account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "bf8276ed-d48b-48fd-a5fd-daac1fda44ba",
      "name": "WooCommerceで顧客別注文取得",
      "type": "n8n-nodes-base.wooCommerceTool",
      "position": [
        944,
        544
      ],
      "parameters": {
        "options": {
          "customer": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Customer', ``, 'string') }}"
        },
        "resource": "order",
        "operation": "getAll",
        "returnAll": true
      },
      "credentials": {
        "wooCommerceApi": {
          "id": "lPZ1v567JsRzkX9o",
          "name": "WooCommerce account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2934541b-939e-468a-b464-b5affa86baac",
      "name": "WooCommerceで注文を更新",
      "type": "n8n-nodes-base.wooCommerceTool",
      "position": [
        1136,
        544
      ],
      "parameters": {
        "orderId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Order_ID', ``, 'string') }}",
        "resource": "order",
        "billingUi": {
          "billingValues": {
            "city": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('City', ``, 'string') }}",
            "email": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Email', ``, 'string') }}",
            "phone": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Phone', ``, 'string') }}",
            "company": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Company', ``, 'string') }}",
            "country": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Country', ``, 'string') }}",
            "lastName": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Last_Name', ``, 'string') }}",
            "address_1": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Address_Line_1', ``, 'string') }}",
            "address_2": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Address_Line_2', ``, 'string') }}",
            "firstName": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('First_Name', ``, 'string') }}",
            "postalCode": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Postal_Code', ``, 'string') }}"
          }
        },
        "operation": "update",
        "feeLinesUi": {
          "feeLinesValues": [
            {
              "name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('feeLinesValues0_Name', ``, 'string') }}",
              "total": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('feeLinesValues0_Total', ``, 'string') }}",
              "taxClass": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('feeLinesValues0_Tax_Class', ``, 'string') }}",
              "taxStatus": "taxable"
            }
          ]
        },
        "metadataUi": {
          "metadataValues": [
            {
              "key": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('metadataValues0_Key', ``, 'string') }}",
              "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('metadataValues0_Value', ``, 'string') }}"
            }
          ]
        },
        "shippingUi": {
          "shippingValues": {
            "city": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('City', ``, 'string') }}",
            "company": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Company', ``, 'string') }}",
            "country": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Country', ``, 'string') }}",
            "lastName": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Last_Name', ``, 'string') }}",
            "address_1": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Address_Line_1', ``, 'string') }}",
            "address_2": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Address_Line_2', ``, 'string') }}",
            "firstName": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('First_Name', ``, 'string') }}",
            "postalCode": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Postal_Code', ``, 'string') }}"
          }
        },
        "lineItemsUi": {
          "lineItemsValues": [
            {
              "name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('lineItemsValues0_Name', ``, 'string') }}",
              "total": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('lineItemsValues0_Total', ``, 'string') }}",
              "quantity": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('lineItemsValues0_Quantity', ``, 'number') }}",
              "subtotal": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('lineItemsValues0_Subtotal', ``, 'string') }}",
              "taxClass": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('lineItemsValues0_Tax_Class', ``, 'string') }}",
              "productId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('lineItemsValues0_Product_ID', ``, 'number') }}",
              "variationId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('lineItemsValues0_Variation_ID', ``, 'number') }}"
            }
          ]
        },
        "updateFields": {
          "status": "pending",
          "currency": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Currency', ``, 'string') }}",
          "parentId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Parent_ID', ``, 'string') }}",
          "customerId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Customer_ID', ``, 'string') }}",
          "customerNote": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Customer_Note', ``, 'string') }}",
          "transactionID": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Transaction_ID', ``, 'string') }}",
          "paymentMethodId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Payment_Method_ID', ``, 'string') }}",
          "paymentMethodTitle": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Payment_Method_Title', ``, 'string') }}"
        },
        "couponLinesUi": {
          "couponLinesValues": [
            {
              "code": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('couponLinesValues0_Code', ``, 'string') }}",
              "metadataUi": {
                "metadataValues": [
                  {
                    "key": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('couponLinesValues0_metadataValues0_Key', ``, 'string') }}",
                    "value": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('couponLinesValues0_metadataValues0_Value', ``, 'string') }}"
                  }
                ]
              }
            }
          ]
        },
        "shippingLinesUi": {
          "shippingLinesValues": [
            {
              "total": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('shippingLinesValues0_Total', ``, 'string') }}",
              "method ID": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('shippingLinesValues0_Method_ID', ``, 'string') }}",
              "methodTitle": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('shippingLinesValues0_Method_Title', ``, 'string') }}"
            }
          ]
        }
      },
      "credentials": {
        "wooCommerceApi": {
          "id": "lPZ1v567JsRzkX9o",
          "name": "WooCommerce account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "da93de3c-f314-46d8-814a-9dc3005d93a2",
      "name": "WooCommerceで注文を削除",
      "type": "n8n-nodes-base.wooCommerceTool",
      "position": [
        1344,
        544
      ],
      "parameters": {
        "orderId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Order_ID', ``, 'string') }}",
        "resource": "order",
        "operation": "delete"
      },
      "credentials": {
        "wooCommerceApi": {
          "id": "lPZ1v567JsRzkX9o",
          "name": "WooCommerce account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e42fc37e-ff2a-44ab-b7ab-9ab4cf987697",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        16
      ],
      "parameters": {
        "color": 6,
        "width": 1328,
        "height": 208,
        "content": "## Customer"
      },
      "typeVersion": 1
    },
    {
      "id": "e9fb55c4-9aa9-4dea-abd0-a8f0dcd1294c",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        272
      ],
      "parameters": {
        "color": 3,
        "width": 1328,
        "height": 192,
        "content": "## Product"
      },
      "typeVersion": 1
    },
    {
      "id": "4c901172-d09c-432d-be0a-2b5e50556119",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        528
      ],
      "parameters": {
        "color": 4,
        "width": 1328,
        "height": 192,
        "content": "## Order"
      },
      "typeVersion": 1
    },
    {
      "id": "7109f13b-796e-425c-b89b-44ad8d6e645b",
      "name": "付箋3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -592,
        -224
      ],
      "parameters": {
        "width": 704,
        "height": 1280,
        "content": "# 🚀 Setup Guide: WooCommerce + AI Agent Workflow in n8n\n\n## 1. Prerequisites\n- Running n8n instance  \n- WooCommerce store with REST API keys  \n- OpenAI API key  \n- MCP server (production URL)  \n\n---\n\n## 2. Import Workflow\n1. Open n8n dashboard  \n2. Go to **Workflows → Import**  \n3. Upload/paste the workflow JSON  \n4. Save as `WooCommerce AI Agent`  \n\n---\n\n## 3. Configure Credentials\n\n### OpenAI\n- Create new credential → **OpenAI API**  \n- Add your API key → Save & test  \n\n### WooCommerce\n- Create new credential → **WooCommerce API**  \n- Enter Base URL, Consumer Key & Secret → Save & test  \n\n### MCP Client\n- In **MCP Client node**, set **Server URL** to your MCP server production URL  \n- Add authentication if required  \n\n---\n\n## 4. Test Workflow\n1. Open workflow in editor  \n2. Run a sample request (e.g., create a test product with name, description, sku, price etc)  \n3. Verify product appears in WooCommerce  \n\n---\n\n## 5. Activate Workflow\n- Once tested, click **Activate** in n8n  \n- Workflow is now live 🎉  \n\n---\n\n## 6. Troubleshooting\n- **Schema errors** → Ensure fields match WooCommerce node requirements  \n- **Connection issues** → Re-check credentials and MCP URL  \n"
      },
      "typeVersion": 1
    }
  ],
  "active": true,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "673d57ee-23d2-47d1-a428-f81433be866b",
  "connections": {
    "5b472f09-c37c-4c39-b1f3-5cc5840915c1": {
      "ai_tool": [
        [
          {
            "node": "931451bd-28db-4a2b-9575-1e74c7dfa6c4",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "b2a62d21-4035-4e76-9c54-88eae498c517": {
      "ai_memory": [
        [
          {
            "node": "931451bd-28db-4a2b-9575-1e74c7dfa6c4",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "040bd0e2-cf68-47a6-b179-196c3df8ed92": {
      "ai_languageModel": [
        [
          {
            "node": "931451bd-28db-4a2b-9575-1e74c7dfa6c4",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "723b4dcd-cefd-4ca5-988f-7244a2173c85": {
      "main": [
        [
          {
            "node": "931451bd-28db-4a2b-9575-1e74c7dfa6c4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "70800c56-cfb4-4454-b0fb-e2b99a889207": {
      "ai_tool": [
        [
          {
            "node": "95175abc-064f-4c67-9aed-6685277d23d5",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "37a9ce0e-f595-478d-be8a-98394aa01427": {
      "ai_tool": [
        [
          {
            "node": "95175abc-064f-4c67-9aed-6685277d23d5",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "da93de3c-f314-46d8-814a-9dc3005d93a2": {
      "ai_tool": [
        [
          {
            "node": "95175abc-064f-4c67-9aed-6685277d23d5",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "f0a7a1c1-a5c8-4f17-a0c4-a9052fc777ac": {
      "ai_tool": [
        [
          {
            "node": "95175abc-064f-4c67-9aed-6685277d23d5",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "2934541b-939e-468a-b464-b5affa86baac": {
      "ai_tool": [
        [
          {
            "node": "95175abc-064f-4c67-9aed-6685277d23d5",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "0917dc25-5dfe-47cb-9200-c3857b41aeed": {
      "ai_tool": [
        [
          {
            "node": "95175abc-064f-4c67-9aed-6685277d23d5",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "5d8ef615-41e4-4e1c-bdb8-e0c1afa27fce": {
      "ai_tool": [
        [
          {
            "node": "95175abc-064f-4c67-9aed-6685277d23d5",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "8c4bcf41-e3d6-4aa5-898e-7a65db5cfb12": {
      "ai_tool": [
        [
          {
            "node": "95175abc-064f-4c67-9aed-6685277d23d5",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "4c777f10-337a-44c7-be1a-39cbe300efaa": {
      "ai_tool": [
        [
          {
            "node": "95175abc-064f-4c67-9aed-6685277d23d5",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "b9374c93-805b-47b2-83a1-718eb7ef561c": {
      "ai_tool": [
        [
          {
            "node": "95175abc-064f-4c67-9aed-6685277d23d5",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "264e7738-26b5-466c-9b6d-3cf4335525fa": {
      "ai_tool": [
        [
          {
            "node": "95175abc-064f-4c67-9aed-6685277d23d5",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "b879d7cc-0633-47de-b6b7-c80988ffe575": {
      "ai_tool": [
        [
          {
            "node": "95175abc-064f-4c67-9aed-6685277d23d5",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "fc1c54b5-f821-4d77-976f-90947bfda805": {
      "ai_tool": [
        [
          {
            "node": "95175abc-064f-4c67-9aed-6685277d23d5",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "7925298b-8030-454d-a23e-cdb70aeb9c25": {
      "ai_tool": [
        [
          {
            "node": "95175abc-064f-4c67-9aed-6685277d23d5",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "252ba508-724f-4353-b8c8-a86d6202e776": {
      "ai_tool": [
        [
          {
            "node": "95175abc-064f-4c67-9aed-6685277d23d5",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "2c52c751-a71c-4700-9e5a-6bd6c54d05f5": {
      "ai_tool": [
        [
          {
            "node": "95175abc-064f-4c67-9aed-6685277d23d5",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "bf8276ed-d48b-48fd-a5fd-daac1fda44ba": {
      "ai_tool": [
        [
          {
            "node": "95175abc-064f-4c67-9aed-6685277d23d5",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "e983c804-3ae0-435d-bb0b-a9f1d7db58ae": {
      "ai_tool": [
        [
          {
            "node": "95175abc-064f-4c67-9aed-6685277d23d5",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

このワークフローの使い方は?

上記のJSON設定コードをコピーし、n8nインスタンスで新しいワークフローを作成して「JSONからインポート」を選択、設定を貼り付けて認証情報を必要に応じて変更してください。

このワークフローはどんな場面に適していますか?

上級 - コンテンツ作成, マルチモーダルAI

有料ですか?

このワークフローは完全無料です。ただし、ワークフローで使用するサードパーティサービス(OpenAI APIなど)は別途料金が発生する場合があります。

ワークフロー情報
難易度
上級
ノード数28
カテゴリー2
ノードタイプ8
難易度説明

上級者向け、16ノード以上の複雑なワークフロー

作成者
Rohit Dabra

Rohit Dabra

@rohitdabra

As the CTO of QServices, I lead digital transformation for startups and SMBs by building scalable, AI-powered SaaS solutions that solve real-world business challenges.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34