🚀 Shopifyブランドを対象としたAI駆動型WhatsAppカスタマーサポート

上級

これはMiscellaneous, AI Chatbot, Multimodal AI分野の自動化ワークフローで、30個のノードを含みます。主にSet, Slack, Switch, WhatsApp, HttpRequestなどのノードを使用。 Shopify向けのAI駆動WhatsAppカスタマーサポート(LLMエージェント)

前提条件
  • Slack Bot Token または Webhook URL
  • ターゲットAPIの認証情報が必要な場合あり
  • OpenAI API Key
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "T34FGUZ2HaXkfEGA",
  "meta": {
    "instanceId": "54982cbe9f8132ea9a4a7e9e8f355b9eb6ea3f69d2ba679cde0f482c65ee4fcb"
  },
  "name": "🚀 AI-Powered WhatsApp Customer Support for Shopify Brands",
  "tags": [],
  "nodes": [
    {
      "id": "396cc334-cabd-4647-b625-c6d861b59c67",
      "name": "WhatsAppトリガー",
      "type": "n8n-nodes-base.whatsAppTrigger",
      "position": [
        -1776,
        880
      ],
      "webhookId": "7067eade-3bdd-45f7-a2dc-9de896f32504",
      "parameters": {
        "options": {},
        "updates": [
          "messages"
        ]
      },
      "credentials": {
        "whatsAppTriggerApi": {
          "id": "0a9ZTj0w0kP1Xoyj",
          "name": "Le WhatsApp OAuth account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8cc9d281-f641-45da-a241-9da9a0b9886c",
      "name": "スイッチ",
      "type": "n8n-nodes-base.switch",
      "position": [
        -800,
        848
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "WelcomeMsg",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "3f5d0aa4-8e80-41f4-84fd-f2f8e53cb1b2",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.categorized }}",
                    "rightValue": "Starter"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "OrderStatusQuery",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "778cb6a5-51e4-4255-8459-640670c9fd25",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.categorized }}",
                    "rightValue": "Order status"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "ProductsQuery",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "0a306950-ee2c-46fb-9b96-1942e4ef5c7e",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.categorized }}",
                    "rightValue": "Products"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "SupportQuery",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "615cd80c-dcaa-498e-8cd3-3eeecc9995d8",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.categorized }}",
                    "rightValue": "Support"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {
          "fallbackOutput": 3
        }
      },
      "typeVersion": 3.2
    },
    {
      "id": "07e36edb-644a-4abd-a8d6-318d80edfe3c",
      "name": "シンプルメモリ",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -272,
        544
      ],
      "parameters": {
        "sessionKey": "={{ $json.messages[0].text.body }}",
        "sessionIdType": "customKey"
      },
      "typeVersion": 1.3
    },
    {
      "id": "0c00ac3c-4ce8-4c9f-b52c-4e09ffa33e21",
      "name": "OpenRouterチャットモデル",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        -528,
        544
      ],
      "parameters": {
        "model": "deepseek/deepseek-chat-v3.1:free",
        "options": {}
      },
      "credentials": {
        "openRouterApi": {
          "id": "FPjvfEkMxPLT3f99",
          "name": "OpenRouter account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "5c14f15c-020d-4529-bed2-6b63cdad94a9",
      "name": "Shopifyから商品を取得",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        -224,
        1136
      ],
      "parameters": {
        "url": "https://<YourStore>.myshopify.com/admin/api/2025-07/products.json",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "mU8IG8Eu0HocNIzv",
          "name": "Shopify Header Access token"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "f0005249-2e1b-4d2f-8423-b754e4152d9f",
      "name": "入力の正規化",
      "type": "n8n-nodes-base.set",
      "position": [
        -1024,
        880
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "4f012685-2724-42f6-a86e-72bf7ea300d2",
              "name": "=normalized",
              "type": "string",
              "value": "{{|const raw = $json.body || $json.text || \"\";const normalized = raw  .toLowerCase()  .trim()  .replace(/[^\\w\\s#]/g, \"\");  // keep #, remove other punctuationreturn [{  original: raw,  normalized: normalized}];}}"
            },
            {
              "id": "b320a461-bc21-43aa-bf55-d1dd583b447d",
              "name": "messages[0].text.body",
              "type": "string",
              "value": "={{ $('WhatsApp Trigger').item.json.messages[0].text.body.toLowerCase().trim().replace(/[^\\w\\s#]/g, '') }}"
            },
            {
              "id": "de55950f-a124-4af2-a8b1-ff2e3a0fcac4",
              "name": "categorized",
              "type": "string",
              "value": "={{ \n(() => {\n  const msg = ( $('WhatsApp Trigger').item.json.messages[0].text.body.toLowerCase().trim().replace(/[^\\w\\s#]/g, '')|| \"\").trim();\n  const low = msg.toLowerCase();\n\n  // Regex patterns\n  const rePriority = /\\b(not\\s+(?:acceptable|happy|satisfied|working)|angry|frustrat(?:ed|ing)|disappoint(?:ed|ing)|complain(?:t|ing)?|escalate|fed\\s*up|ridiculous|worst|cheat(?:ed)?|fake|scam|delay(?:ed)?|late|still\\s+haven'?t\\s+received|no\\s+update|i\\s+don'?t\\s+believe|unacceptable|3\\+?\\s*weeks|weeks?\\s*(?:now|and\\s*no\\s*update))\\b|[\\?\\!]{2,}/i;\n  const reRefund = /\\b(refund(?:ed|s)?|refund\\s*status|refund\\s*not\\s*(?:received|got)|return(?:s|ing)?|exchange|replacement|replace|cancel(?:led|ation)?|cancel\\s*(?:my\\s*)?order|return\\s*policy|refund\\s*policy|rto\\s*refund|money\\s*back)\\b/i;\n  const reOrder = /\\b(where\\s+is\\s+my\\s+order|order\\s*status|status\\s+of|dispatc?h(?:ed)?|shipp(?:ed|ing)?|delivery|deliver(?:ed)?\\s*(?:date|eta)?|track(?:ing)?\\s*(?:id|no\\.?|number|details)?|awb|courier|out\\s*for\\s*delivery|when\\s+can\\s+i\\s+expect|eta|tracking\\s*id|tracking\\s*no\\.?|tracking\\s*number)\\b/i;\n  const reProducts = /\\b(product(?:s)?|available|availability|catalog|collection|inventory|in\\s*stock|restock|size(?:s)?|size\\s*chart|color|colour|colors|colours|variant(?:s)?|price|pricing|cost|mrp|new\\s*arrivals?|latest)\\b/i;\n  const reStarter = /^(?:\\s*(hi|hello|hey|hola|namaste|yo|sup|greetings|gm|good\\s*morning|good\\s*afternoon|good\\s*evening|gn)\\b|👋)\\s*[!.?]*$/i;\n\n  // Priority order\n  if (reOrder.test(msg)) return \"Order status\";\n  if (reProducts.test(msg)) return \"Products\";\n  if (reStarter.test(msg) && msg.length < 40) return \"Starter\";\n  return \"Support\";\n})()\n}}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "3d1b7f86-9821-488f-b6bd-aaf38b241f37",
      "name": "注文エージェント",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -416,
        256
      ],
      "parameters": {
        "text": "={{ $('WhatsApp Trigger').item.json.messages[0].text.body }}",
        "options": {
          "systemMessage": "=You are a helpful assistant\n\nYou are a WhatsApp Customer Support Agent for an e-commerce store. Your task is to read the customer’s query, classify it into one of the categories below, and reply accordingly.\n\n- **OrderStatus** → Queries related to order tracking, delivery status, shipping, delays, etc.  \n  **Action**:When http request returns, fetch the status from response[0].orders.orders[0].fulfillments.fulfillments[0].shipment_status \nand tracking_url from response[0].tracking_url.\n  **Response format**:  \n  ```\n  Your order is currently in <status>.  \n  You can track it here: https://odrtrk.live/trk/<tracking_url>\n  ```\n  If order is not found:  \n  ```\n  I couldn’t find your order. Could you please share your order ID?\n  ```\n\n\n### Rules\n1.Do not invent data. If order data is not found, respond with:  \n   ```\n   I couldn’t find your order. Could you please share your order ID?\n   ```  "
        },
        "promptType": "define",
        "needsFallback": true,
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "f9d42ea8-c632-4864-9f21-0d919f28ee2a",
      "name": "商品エージェント",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -416,
        912
      ],
      "parameters": {
        "text": "={{ $json.messages[0].text.body }}",
        "options": {
          "systemMessage": "=ROLE\nYou are a WhatsApp Product Availability Agent for a Shopify store. Your job is to answer product availability questions by calling the “Get Products from Shopify” tool, filtering results, and replying with a concise list of products and their in-stock sizes.\n\nTOOLS YOU CAN USE\n- Get Products from Shopify  → returns an array of products with fields like:\n  id, title, handle, status, tags, variants[], images[], updated_at\n  Each variant has: option1 (Size), option2 (Color), price, inventory_quantity, inventory_management, status implied by product, etc.\n\nPOLICIES (MUST FOLLOW)\n1) Only consider products where product.status == \"active\".\n2) For each product, only show sizes (variants) where inventory_quantity > 0.\n   - Treat variant.option1 as the Size. (Example: \"XXL\")\n   - If multiple colors exist and the user asks for a color, filter variants by that color (option2). Otherwise, ignore color in the final list unless it helps clarity.\n3) Do not show sold-out variants (inventory_quantity <= 0) and do not mention sizes with zero inventory.\n4) If the customer asks for “best seller” or “top rated”:\n   - Use tags to identify them.\n   - BEST SELLER tags include: [\"best-seller\",\"bestseller\",\"best_seller\"]\n   - TOP RATED tags include: [\"top-rated\",\"top_rated\",\"toprated\"]\n   - If the user asks for “new” or “new arrivals”, use tags like [\"new\",\"new-drop\",\"new_arrival\",\"new_arrivals\"].\n   - If both are requested, prioritize best seller first, then top rated.\n5) If the user asks for a specific product name, search case-insensitively within product.title or handle and show only that product’s in-stock sizes.\n6) Never invent data, prices, or links. Only use what the tool returns.\n7) Keep responses WhatsApp-friendly, scannable, and brief (max ~6 items). If more exist, say “and more…”.\n8) If nothing matches or all matching sizes are out of stock, say it’s currently out of stock and offer to show alternatives.\n9) Call the “Get Products from Shopify” tool at most once per user message. Do all filtering and formatting locally.\n\nOUTPUT FORMAT (STRICT)\n- Start with a one-line summary tailored to the query.\n- Then a bulleted list. For each product, print:\n  • {Product Title}\n  • Sizes in stock: {SIZE1} ({QTY1}), {SIZE2} ({QTY2}) …\n- If the user asked “best seller” or “top rated”, add a short label after the title, e.g., “(Best Seller)” or “(Top Rated)”.\n- If a single product was requested, you may return just that product’s line.\n\nALGORITHM (WHEN YOU REPLY)\n1) Parse the user’s intent:\n   - Specific product name? (e.g., “Aurora”, “Do you have AURORA in XXL?”)\n   - Category/interest? (e.g., “best sellers”, “top rated”, “new arrivals”)\n   - Optional color/size hints (e.g., “Ash Black”, “XXL”).\n2) Call “Get Products from Shopify”.\n3) Filter to product.status == \"active\".\n4) If a product name/handle was mentioned, keep only those products (case-insensitive substring match).\n5) If “best sellers” or “top rated” were requested, filter by tags per policy.\n6) For each remaining product:\n   - Collect variants where inventory_quantity > 0.\n   - Group by Size (variant.option1). For each size, report the total inventory_quantity (or the variant’s quantity if one variant per size).\n   - If no sizes remain after filtering, exclude that product from the list.\n7) Sort:\n   - If user asked best sellers → list best-seller tagged products first.\n   - If top rated → list top-rated tagged products first.\n   - Otherwise sort by most recently updated (descending) or by title ASC if no updated_at.\n8) Do not show products that are out of stock or no inventory for all its sizes\n9) Compose the WhatsApp reply using the OUTPUT FORMAT.\n\nEXAMPLES (FOLLOW EXACTLY THE FORMAT)\nUser: Do you have Aurora in XXL?\nReply:\nHere’s what I found:\n• AURORA\n• Sizes in stock: XXL (9)\n\nUser: Show me best sellers in stock\nReply:\nOur best sellers available now:\n• AURORA (Best Seller)\n• Sizes in stock: XXL (9)\n(and more…)\n\nUser: What are your top rated hoodies?\nReply:\nTop rated items in stock:\n• AURORA (Top Rated)\n• Sizes in stock: XXL (9)\n\nUser: What sizes are available for Aurora?\nReply:\nAvailable sizes for AURORA:\n• Sizes in stock: XXL (9)\n\nNOTES ON DATA FIELDS\n- Size is variant.option1.\n- Color is variant.option2 (use only if user mentions color).\n- Only show a product if it has at least one variant with inventory_quantity > 0.\n- Ignore non-active product statuses completely.\n\nIf at any step there is uncertainty, default to the safest truthful response (e.g., “no active stock found for that item; want me to show similar items available now?”) without inventing details."
        },
        "promptType": "define",
        "needsFallback": true,
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "c502f75d-cad0-42f7-8d10-bdf782e84d36",
      "name": "Shopifyから顧客を取得",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1472,
        880
      ],
      "parameters": {
        "url": "https://<YourStore>.myshopify.com/admin/api/2025-07/customers/search.json",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "query",
              "value": "=phone:{{ $json.contacts[0].wa_id }}"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "mU8IG8Eu0HocNIzv",
          "name": "Shopify Header Access token"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "0da409a0-4e94-41b4-b5f6-dc8b6ee54e8f",
      "name": "顧客詳細",
      "type": "n8n-nodes-base.set",
      "position": [
        -1248,
        880
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "b320a461-bc21-43aa-bf55-d1dd583b447d",
              "name": "customerID",
              "type": "string",
              "value": "={{ $json.customers[0].id }}"
            },
            {
              "id": "352358ab-778a-4ada-af03-1374ca1361ca",
              "name": "customerName",
              "type": "string",
              "value": "={{ $json.customers[0].first_name }} {{ $json.customers[0].last_name }}"
            },
            {
              "id": "2268cc38-f580-4b33-b3cf-23f187df2fb4",
              "name": "lastOrderID",
              "type": "string",
              "value": "={{ $json.customers[0].last_order_id }}"
            },
            {
              "id": "c3155a8e-6ca7-4a32-9dc6-35f2e5d42402",
              "name": "CustomerPhone",
              "type": "string",
              "value": "={{ $('WhatsApp Trigger').item.json.contacts[0].wa_id }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "c9eeb7fe-162c-43da-b9c7-e353a2458df6",
      "name": "顧客注文を取得",
      "type": "n8n-nodes-base.httpRequestTool",
      "position": [
        -128,
        544
      ],
      "parameters": {
        "url": "=https://<YourStore>.myshopify.com/admin/api/2025-07/customers/{{ $('Customer Details').item.json.customerID }}/orders.json",
        "options": {
          "redirect": {
            "redirect": {
              "followRedirects": false
            }
          }
        },
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "mU8IG8Eu0HocNIzv",
          "name": "Shopify Header Access token"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "0d8eddf9-adcb-45e7-af25-0ae972e9f928",
      "name": "構造化出力パーサー",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        0,
        544
      ],
      "parameters": {
        "jsonSchemaExample": "{\n\t\"status\": \"fulfilled\",\n\t\"tracking_url\": \"/123254\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "b4b475fb-e3d0-4a95-9120-2b5ff9f4abfa",
      "name": "構造化出力パーサー1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -64,
        1136
      ],
      "parameters": {
        "jsonSchemaExample": "[\n  {\n\t\"productName\": \"Product Name\",\n\t\"sizes\": \"XXXS (4) XXS (17) XS (29) S (102)\"\n  }\n]"
      },
      "typeVersion": 1.3
    },
    {
      "id": "a4aa7f20-2ef5-436a-835a-d0b8e2ad212e",
      "name": "OpenAIチャットモデル",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -400,
        544
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "Ilwgv4g8yJyaTaa4",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "78867e2c-05f6-4685-9cd8-edd7af5fd015",
      "name": "サポートにメッセージを送信",
      "type": "n8n-nodes-base.slack",
      "position": [
        -320,
        1312
      ],
      "webhookId": "57b871c4-ab71-427c-9e15-17dadc02f384",
      "parameters": {
        "text": "={{ $('WhatsApp Trigger').item.json.messages[0].text.body }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "C09DP0XJ961",
          "cachedResultName": "customer-support"
        },
        "otherOptions": {
          "sendAsUser": "={{ $('Customer Details').item.json.customerName }}",
          "includeLinkToWorkflow": false
        }
      },
      "credentials": {
        "slackApi": {
          "id": "9jU2ksKc08rLTFLT",
          "name": "Slack account"
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "87eef063-0bc0-4ba1-ba61-660f511e32e3",
      "name": "操作なし(何もしない)",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -64,
        1312
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "1d14573b-ca33-4a59-9a0e-fda3d93e996f",
      "name": "ウェルカムメッセージ",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        -384,
        48
      ],
      "webhookId": "7bc228a2-1954-4451-96a0-012b8a71c27d",
      "parameters": {
        "textBody": "=Hello {{ $('Customer Details').item.json.customerName }}! Welcome. How can I assist you today?",
        "operation": "send",
        "phoneNumberId": "792860653905890",
        "additionalFields": {},
        "recipientPhoneNumber": "={{ $('WhatsApp Trigger').item.json.contacts[0].wa_id}}"
      },
      "credentials": {
        "whatsAppApi": {
          "id": "zJEUtyOU44mPb74x",
          "name": "Le WhatsApp System token"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "edce7929-b3e4-40c1-85c4-b8e9e523ecb0",
      "name": "注文ステータスを送信",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        80,
        256
      ],
      "webhookId": "fbe3da88-8ba1-48a0-8563-f857684ce519",
      "parameters": {
        "textBody": "={{ \n  \"Hi \" + ($('Customer Details').item.json.customerName || \"there\") + \",\\n\" +\n  \"I’ve checked your order and it is currently \" + \n  $json[\"output\"][\"status\"].replace(/_/g, \" \") + \" 🚚.\\n\" +\n  \"You can follow its journey anytime using this link: \" + \n  $json[\"output\"][\"tracking_url\"] + \".\\n\" +\n  \"Thank you for your patience — your package is on the way! 💙\"\n}}\n",
        "operation": "send",
        "phoneNumberId": "792860653905890",
        "additionalFields": {},
        "recipientPhoneNumber": "={{ $('WhatsApp Trigger').item.json.contacts[0].wa_id}}"
      },
      "credentials": {
        "whatsAppApi": {
          "id": "zJEUtyOU44mPb74x",
          "name": "Le WhatsApp System token"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "eb8c54b5-ad12-401e-a3c2-a2f2d0ee7f6c",
      "name": "商品メッセージを送信",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        176,
        912
      ],
      "webhookId": "fbe3da88-8ba1-48a0-8563-f857684ce519",
      "parameters": {
        "textBody": "={{\n(() => {\n  const products = ($node[\"Products Agent\"].json.output || []);\n\n  const lines = products.map(p => {\n    // sizes can be an array OR a comma-separated string; normalize to array\n    const arr = Array.isArray(p.sizes)\n      ? p.sizes\n      : (typeof p.sizes === 'string'\n          ? p.sizes.split(',').map(s => s.trim()).filter(Boolean)\n          : []);\n\n    const sizesText = arr.length ? \"Sizes: \" + arr.join(\", \") : \"❌ Currently out of stock\";\n    return \"✨ \" + p.productName + \"\\n\" + sizesText;\n  });\n\n  return \"👋 Hey there!\\nHere are our latest available pieces:\\n\\n\"\n    + lines.join(\"\\n\\n\");\n})()\n}}",
        "operation": "send",
        "phoneNumberId": "792860653905890",
        "additionalFields": {},
        "recipientPhoneNumber": "={{ $('WhatsApp Trigger').item.json.contacts[0].wa_id}}"
      },
      "credentials": {
        "whatsAppApi": {
          "id": "zJEUtyOU44mPb74x",
          "name": "Le WhatsApp System token"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2345427f-6889-4832-865d-3b836e4aa1b8",
      "name": "操作なし(何もしない)1",
      "type": "n8n-nodes-base.noOp",
      "position": [
        400,
        912
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "89e578a3-e4ea-4586-a390-8db20665734e",
      "name": "操作なし(何もしない)2",
      "type": "n8n-nodes-base.noOp",
      "position": [
        288,
        256
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "545d1354-b7c4-4a2b-bcac-bc772f18a119",
      "name": "操作なし(何もしない)3",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -176,
        48
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "7eaa8330-1b6f-4ee9-a6bf-71895a0c28ec",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1488,
        656
      ],
      "parameters": {
        "color": 5,
        "width": 352,
        "height": 576,
        "content": "**Get Customer details from shopify** retrieves user information based on their WhatsApp number.\nIt fetches profile and order-related data from Shopify to identify the customer.\nThe details are then normalized to ensure consistent formatting for downstream workflow steps."
      },
      "typeVersion": 1
    },
    {
      "id": "755da7df-b610-4f08-ab26-f510bef9dc31",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1088,
        736
      ],
      "parameters": {
        "color": 3,
        "height": 448,
        "content": "**Normalize Input** ensures user queries are cleaned, standardized, and free of noise.  \nIt also categorizes the input, preparing it for accurate intent detection in the next step.  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "88df567c-28c0-44d0-8075-5aaa795b9f27",
      "name": "付箋4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "color": 4,
        "width": 448,
        "height": 192,
        "content": "### Welcome whatsapp message\n![](https://ik.imagekit.io/tscnqj8zf/welcome.png?updatedAt=1757147294837)\n"
      },
      "typeVersion": 1
    },
    {
      "id": "c3069b7b-4689-4eea-8ab0-bcce59fdc72a",
      "name": "付箋5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        208
      ],
      "parameters": {
        "color": 4,
        "width": 560,
        "height": 352,
        "content": "### Order status whatsapp message\n![](https://ik.imagekit.io/tscnqj8zf/orders.png?updatedAt=1757147297281)\n"
      },
      "typeVersion": 1
    },
    {
      "id": "d37a5a15-30af-486a-acb9-fb92f49163a4",
      "name": "付箋6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        608,
        864
      ],
      "parameters": {
        "color": 4,
        "width": 560,
        "height": 352,
        "content": "### Products Info whatsapp message\n![](https://ik.imagekit.io/tscnqj8zf/products.png?updatedAt=1757147299171)\n"
      },
      "typeVersion": 1
    },
    {
      "id": "22959921-9aa3-4865-89b8-7a5cc68c4834",
      "name": "付箋7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        1264
      ],
      "parameters": {
        "color": 4,
        "width": 560,
        "height": 352,
        "content": "### Slack message to Customer support\n![](https://ik.imagekit.io/tscnqj8zf/slackimage.png?updatedAt=1757147311870)\n"
      },
      "typeVersion": 1
    },
    {
      "id": "1f5a72de-8a8f-46aa-b00c-3bc22ea6180a",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1840,
        704
      ],
      "parameters": {
        "color": 6,
        "width": 272,
        "height": 512,
        "content": "**WhatsApp Trigger** listens for incoming customer messages on WhatsApp.  \nIt captures the text, sender ID, and metadata to initiate the workflow.  \nThis ensures every query received on WhatsApp is processed in real time.  \n"
      },
      "typeVersion": 1
    },
    {
      "id": "24c5a5e5-5623-4f7c-b67c-55015b52378a",
      "name": "付箋3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2592,
        368
      ],
      "parameters": {
        "width": 656,
        "height": 1184,
        "content": "# 🚀 Try It Out!\n\nThis n8n template demonstrates how to build an **AI-powered WhatsApp & Shopify Support Copilot**.  \nIt integrates **WhatsApp Business API**, **Shopify API**, and **LLM Agents** to handle order status queries, product lookups, and customer support escalation.\n\n**Use cases**: Automate order tracking, respond with real-time product availability, or escalate complex issues to a Slack support channel.\n\n---\n\n## How it works\n- **Trigger**: A WhatsApp webhook activates on every new customer message.  \n- **Customer Lookup**: Fetches details from Shopify using the customer’s WhatsApp number.  \n- **Input Normalization**: Cleans and categorizes user queries.  \n- **Intent Switch**: Routes requests to Order Agent, Product Agent, or Support.  \n- **Orders Agent**: Retrieves latest Shopify order data, parses, and sends status via WhatsApp.  \n- **Products Agent**: Pulls inventory & best sellers from Shopify and replies with sizes/availability.  \n- **Support Escalation**: Posts unresolved queries to Slack for human intervention.\n\n---\n\n## How to use\n- Configure **WhatsApp Business API**, **Shopify Admin API**, and **Slack OAuth** credentials in n8n.  \n- Sync products via Shopify API.  \n- Test with queries like “Where is my order?” or “Show me best sellers.”  \n- Escalate unresolved issues directly to Slack with context.\n\n---\n\n## Requirements\n- WhatsApp Business API (Meta, Twilio, or Exotel)  \n- Shopify Admin API access  \n- LLM provider key (OpenAI / OpenRouter)  \n- Slack OAuth or webhook for human support  \n\n---\n\n💡 Always open to feedback and improvements! **DM me at [info@zenithworks.ai](mailto:info@zenithworks.ai).**\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "c0897329-bdef-49a0-8e31-b1173351ef5a",
  "connections": {
    "8cc9d281-f641-45da-a241-9da9a0b9886c": {
      "main": [
        [
          {
            "node": "1d14573b-ca33-4a59-9a0e-fda3d93e996f",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "3d1b7f86-9821-488f-b6bd-aaf38b241f37",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "f9d42ea8-c632-4864-9f21-0d919f28ee2a",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "78867e2c-05f6-4685-9cd8-edd7af5fd015",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3d1b7f86-9821-488f-b6bd-aaf38b241f37": {
      "main": [
        [
          {
            "node": "edce7929-b3e4-40c1-85c4-b8e9e523ecb0",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "07e36edb-644a-4abd-a8d6-318d80edfe3c": {
      "ai_memory": [
        [
          {
            "node": "f9d42ea8-c632-4864-9f21-0d919f28ee2a",
            "type": "ai_memory",
            "index": 0
          },
          {
            "node": "3d1b7f86-9821-488f-b6bd-aaf38b241f37",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "f9d42ea8-c632-4864-9f21-0d919f28ee2a": {
      "main": [
        [
          {
            "node": "eb8c54b5-ad12-401e-a3c2-a2f2d0ee7f6c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f0005249-2e1b-4d2f-8423-b754e4152d9f": {
      "main": [
        [
          {
            "node": "8cc9d281-f641-45da-a241-9da9a0b9886c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1d14573b-ca33-4a59-9a0e-fda3d93e996f": {
      "main": [
        [
          {
            "node": "545d1354-b7c4-4a2b-bcac-bc772f18a119",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0da409a0-4e94-41b4-b5f6-dc8b6ee54e8f": {
      "main": [
        [
          {
            "node": "f0005249-2e1b-4d2f-8423-b754e4152d9f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "396cc334-cabd-4647-b625-c6d861b59c67": {
      "main": [
        [
          {
            "node": "c502f75d-cad0-42f7-8d10-bdf782e84d36",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a4aa7f20-2ef5-436a-835a-d0b8e2ad212e": {
      "ai_languageModel": [
        [
          {
            "node": "3d1b7f86-9821-488f-b6bd-aaf38b241f37",
            "type": "ai_languageModel",
            "index": 1
          },
          {
            "node": "f9d42ea8-c632-4864-9f21-0d919f28ee2a",
            "type": "ai_languageModel",
            "index": 1
          }
        ]
      ]
    },
    "edce7929-b3e4-40c1-85c4-b8e9e523ecb0": {
      "main": [
        [
          {
            "node": "89e578a3-e4ea-4586-a390-8db20665734e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c9eeb7fe-162c-43da-b9c7-e353a2458df6": {
      "ai_tool": [
        [
          {
            "node": "3d1b7f86-9821-488f-b6bd-aaf38b241f37",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "0c00ac3c-4ce8-4c9f-b52c-4e09ffa33e21": {
      "ai_languageModel": [
        [
          {
            "node": "f9d42ea8-c632-4864-9f21-0d919f28ee2a",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "3d1b7f86-9821-488f-b6bd-aaf38b241f37",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "eb8c54b5-ad12-401e-a3c2-a2f2d0ee7f6c": {
      "main": [
        [
          {
            "node": "2345427f-6889-4832-865d-3b836e4aa1b8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0d8eddf9-adcb-45e7-af25-0ae972e9f928": {
      "ai_outputParser": [
        [
          {
            "node": "3d1b7f86-9821-488f-b6bd-aaf38b241f37",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "c502f75d-cad0-42f7-8d10-bdf782e84d36": {
      "main": [
        [
          {
            "node": "0da409a0-4e94-41b4-b5f6-dc8b6ee54e8f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5c14f15c-020d-4529-bed2-6b63cdad94a9": {
      "ai_tool": [
        [
          {
            "node": "f9d42ea8-c632-4864-9f21-0d919f28ee2a",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "78867e2c-05f6-4685-9cd8-edd7af5fd015": {
      "main": [
        [
          {
            "node": "87eef063-0bc0-4ba1-ba61-660f511e32e3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b4b475fb-e3d0-4a95-9120-2b5ff9f4abfa": {
      "ai_outputParser": [
        [
          {
            "node": "f9d42ea8-c632-4864-9f21-0d919f28ee2a",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

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

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

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

上級 - その他, AIチャットボット, マルチモーダルAI

有料ですか?

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

関連ワークフロー

WhatsApp顧客支援を自動化:音声文字起こし、FAQ、予約スケジュールも含む
WhatsApp カスタマーサポートを自動化(音声文字起こし、FAQ、予約調整込み)
If
Set
Switch
+
If
Set
Switch
23 ノードAureusR
その他
メモリ、Google Suite、複数のAIリサーチ画像を備えたWhatsAppアシスタントの構築
メモリ、Google Suite、そして複数のAIによる研究イメージングを備えたWhatsAppアシスタントを構築
If
Set
Code
+
If
Set
Code
71 ノードIniyavan JC
AIチャットボット
AI を活用した WhatsApp カスタマーサービス(GPT-4、スマートルーティング、ナレッジベース)
AI ベースの WhatsApp カスタマー サービス (GPT-4、インテリジェント ルーティング、ナレッジ ベース)
Set
Gmail
Merge
+
Set
Gmail
Merge
45 ノードPaul
AIチャットボット
画像生成と人間の審査を使用して LinkedIn および Facebook 向けに AI 駆動型ソーシャルメディアコンテンツを作成
画像生成と人間の審査を使用して LinkedIn と Facebook 向けの AI 駆動のソーシャルメディアコンテンツを作成
If
Set
Slack
+
If
Set
Slack
63 ノードDidac Fernandez
その他
ビジネスのAIコマンドセンター:Google Workspaceモジュール型アクター、ベクター検索、マルチチャネルレポート
ビジネスAIコマンドセンター:Google Workspaceモジュール型アジンス、ベクター検索、マルチチャネルレポート
Set
Gmail
Slack
+
Set
Gmail
Slack
80 ノードPaul
文書抽出
Dream 100 リサーチエージェント
Perplexity AI を使って研究し、Google Sheets で Dream 100 リードリストを生成
If
Set
Slack
+
If
Set
Slack
29 ノードBrandon True
その他
ワークフロー情報
難易度
上級
ノード数30
カテゴリー3
ノードタイプ14
難易度説明

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

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34