{
  "id": "hm1wXpMtuPsBRlzQ",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "WooCommerceMCP",
  "tags": [],
  "nodes": [
    {
      "id": "931451bd-28db-4a2b-9575-1e74c7dfa6c4",
      "name": "AI Agent",
      "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\ud83d\udd11 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., \u201clatest order\u201d \u2192 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 \u201ccreate a coupon,\u201d \u201cadd product,\u201d \u201ccheck stock,\u201d or \u201cget sales report,\u201d 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\u2019s missing and ask the user only for that specific piece of info.\n\nNever overwhelm the user with multiple technical errors.\n\n\u2699\ufe0f 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\ud83d\udcdd 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\u2705 Example Behaviors\n\nUser: \"Create an order for John Doe for 2 T-shirts.\"\n\nAuto: Search customer \u2192 find John Doe\u2019s ID.\n\nAuto: Search product \u201cT-shirt\u201d \u2192 resolve product ID + variation if default exists.\n\nAuto: Create order with quantity 2.\n\nRespond: \u201c\u2705 Order #1234 created for John Doe (2 \u00d7 T-shirt).\u201d\n\nUser: \"Check today\u2019s sales.\"\n\nAuto: Call sales report tool with today\u2019s date.\n\nRespond: \u201c\ud83d\udcca Today\u2019s sales: $2,345 from 42 orders. Top product: Blue Hoodie.\u201d\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: \u201c\ud83c\udf9f\ufe0f Coupon \u2018SAVE10\u2019 created: 10% off, valid for 30 days.\u201d\n\n\ud83d\udd12 Final Rule: Always act as a proactive assistant\u2014reduce friction, retrieve what you can, ask the minimum necessary, and deliver results efficiently."
        }
      },
      "typeVersion": 2
    },
    {
      "id": "040bd0e2-cf68-47a6-b179-196c3df8ed92",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1536,
        320
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "5b472f09-c37c-4c39-b1f3-5cc5840915c1",
      "name": "MCP Client",
      "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": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        1680,
        320
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "723b4dcd-cefd-4ca5-988f-7244a2173c85",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        1648,
        -176
      ],
      "parameters": {
        "public": true,
        "options": {}
      },
      "typeVersion": 1.1
    },
    {
      "id": "95175abc-064f-4c67-9aed-6685277d23d5",
      "name": "WooCommerce Tool MCP Server",
      "type": "@n8n/n8n-nodes-langchain.mcpTrigger",
      "position": [
        704,
        -224
      ],
      "parameters": {
        "path": "61f50ac7-9318-4b24-a682-4e45df349c2e"
      },
      "typeVersion": 1
    },
    {
      "id": "4c777f10-337a-44c7-be1a-39cbe300efaa",
      "name": "Create a customer in 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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "fc1c54b5-f821-4d77-976f-90947bfda805",
      "name": "Get many customers in WooCommerce",
      "type": "n8n-nodes-base.wooCommerceTool",
      "position": [
        560,
        48
      ],
      "parameters": {
        "filters": {},
        "resource": "customer",
        "operation": "getAll",
        "returnAll": true
      },
      "credentials": {
        "wooCommerceApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "252ba508-724f-4353-b8c8-a86d6202e776",
      "name": "Get a customer in WooCommerce By 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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2c52c751-a71c-4700-9e5a-6bd6c54d05f5",
      "name": "Get customers in WooCommerce By Email",
      "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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "b879d7cc-0633-47de-b6b7-c80988ffe575",
      "name": "Update a customer in 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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "b9374c93-805b-47b2-83a1-718eb7ef561c",
      "name": "Delete a customer in 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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "0917dc25-5dfe-47cb-9200-c3857b41aeed",
      "name": "Create a product in 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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "7925298b-8030-454d-a23e-cdb70aeb9c25",
      "name": "Get a product in WooCommerce By Id",
      "type": "n8n-nodes-base.wooCommerceTool",
      "position": [
        752,
        304
      ],
      "parameters": {
        "operation": "get",
        "productId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Product_ID', ``, 'string') }}"
      },
      "credentials": {
        "wooCommerceApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "264e7738-26b5-466c-9b6d-3cf4335525fa",
      "name": "Get many products in WooCommerce",
      "type": "n8n-nodes-base.wooCommerceTool",
      "position": [
        560,
        304
      ],
      "parameters": {
        "options": {},
        "operation": "getAll",
        "returnAll": true
      },
      "credentials": {
        "wooCommerceApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e983c804-3ae0-435d-bb0b-a9f1d7db58ae",
      "name": "Search many products in WooCommerce By Category Name",
      "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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8c4bcf41-e3d6-4aa5-898e-7a65db5cfb12",
      "name": "Update a product in 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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "5d8ef615-41e4-4e1c-bdb8-e0c1afa27fce",
      "name": "Delete a product in WooCommerce",
      "type": "n8n-nodes-base.wooCommerceTool",
      "position": [
        1344,
        304
      ],
      "parameters": {
        "operation": "delete",
        "productId": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Product_ID', ``, 'string') }}"
      },
      "credentials": {
        "wooCommerceApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "37a9ce0e-f595-478d-be8a-98394aa01427",
      "name": "Create an order in 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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "70800c56-cfb4-4454-b0fb-e2b99a889207",
      "name": "Get an order in 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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f0a7a1c1-a5c8-4f17-a0c4-a9052fc777ac",
      "name": "Get many orders in WooCommerce",
      "type": "n8n-nodes-base.wooCommerceTool",
      "position": [
        560,
        544
      ],
      "parameters": {
        "options": {},
        "resource": "order",
        "operation": "getAll",
        "returnAll": true
      },
      "credentials": {
        "wooCommerceApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "bf8276ed-d48b-48fd-a5fd-daac1fda44ba",
      "name": "Get many orders in WooCommerce By Customer",
      "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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2934541b-939e-468a-b464-b5affa86baac",
      "name": "Update an order in 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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "da93de3c-f314-46d8-814a-9dc3005d93a2",
      "name": "Delete an order in 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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e42fc37e-ff2a-44ab-b7ab-9ab4cf987697",
      "name": "Sticky Note",
      "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": "Sticky Note1",
      "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": "Sticky Note2",
      "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": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -592,
        -224
      ],
      "parameters": {
        "width": 704,
        "height": 1280,
        "content": "# \ud83d\ude80 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 \u2192 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 \u2192 **OpenAI API**  \n- Add your API key \u2192 Save & test  \n\n### WooCommerce\n- Create new credential \u2192 **WooCommerce API**  \n- Enter Base URL, Consumer Key & Secret \u2192 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 \ud83c\udf89  \n\n---\n\n## 6. Troubleshooting\n- **Schema errors** \u2192 Ensure fields match WooCommerce node requirements  \n- **Connection issues** \u2192 Re-check credentials and MCP URL  \n"
      },
      "typeVersion": 1
    }
  ],
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "673d57ee-23d2-47d1-a428-f81433be866b",
  "connections": {
    "MCP Client": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get an order in WooCommerce": {
      "ai_tool": [
        [
          {
            "node": "WooCommerce Tool MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Create an order in WooCommerce": {
      "ai_tool": [
        [
          {
            "node": "WooCommerce Tool MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Delete an order in WooCommerce": {
      "ai_tool": [
        [
          {
            "node": "WooCommerce Tool MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get many orders in WooCommerce": {
      "ai_tool": [
        [
          {
            "node": "WooCommerce Tool MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Update an order in WooCommerce": {
      "ai_tool": [
        [
          {
            "node": "WooCommerce Tool MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Create a product in WooCommerce": {
      "ai_tool": [
        [
          {
            "node": "WooCommerce Tool MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Delete a product in WooCommerce": {
      "ai_tool": [
        [
          {
            "node": "WooCommerce Tool MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Update a product in WooCommerce": {
      "ai_tool": [
        [
          {
            "node": "WooCommerce Tool MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Create a customer in WooCommerce": {
      "ai_tool": [
        [
          {
            "node": "WooCommerce Tool MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Delete a customer in WooCommerce": {
      "ai_tool": [
        [
          {
            "node": "WooCommerce Tool MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get many products in WooCommerce": {
      "ai_tool": [
        [
          {
            "node": "WooCommerce Tool MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Update a customer in WooCommerce": {
      "ai_tool": [
        [
          {
            "node": "WooCommerce Tool MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get many customers in WooCommerce": {
      "ai_tool": [
        [
          {
            "node": "WooCommerce Tool MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get a product in WooCommerce By Id": {
      "ai_tool": [
        [
          {
            "node": "WooCommerce Tool MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get a customer in WooCommerce By ID": {
      "ai_tool": [
        [
          {
            "node": "WooCommerce Tool MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get customers in WooCommerce By Email": {
      "ai_tool": [
        [
          {
            "node": "WooCommerce Tool MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get many orders in WooCommerce By Customer": {
      "ai_tool": [
        [
          {
            "node": "WooCommerce Tool MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Search many products in WooCommerce By Category Name": {
      "ai_tool": [
        [
          {
            "node": "WooCommerce Tool MCP Server",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}