カスタマーサポートワークフロー

中級

これは自動化ワークフローで、15個のノードを含みます。主にGmail, GmailTrigger, Agent, TextClassifier, EmbeddingsOpenAiなどのノードを使用。 AIを活用したGmailカスタマーサポートで、OpenRouterとPineconeナレッジベースを統合

前提条件
  • Googleアカウント + Gmail API認証情報
  • OpenAI API Key
  • Pinecone API Key

カテゴリー

-
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "CUKGI0izi0AiPcTi",
  "meta": {
    "instanceId": "6615d3df9d365bf328b0a329fe952ab6b434c9ecc8f5a2517849ec1f68f0d9b0",
    "templateCredsSetupCompleted": true
  },
  "name": "Customer Support Workflow",
  "tags": [],
  "nodes": [
    {
      "id": "c21b53e9-1422-4be5-b8aa-e6c9fe2f2ed4",
      "name": "Gmail トリガー",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -48,
        240
      ],
      "parameters": {
        "simple": false,
        "filters": {},
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        }
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "YtSYw4XPKtxrfXMo",
          "name": "emilio.mayares.loewenstein@gmail.com"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "4ac4150d-8d4c-4d19-a4e9-9b4ad2bf6805",
      "name": "テキスト分類器",
      "type": "@n8n/n8n-nodes-langchain.textClassifier",
      "position": [
        160,
        240
      ],
      "parameters": {
        "options": {},
        "inputText": "={{ $json.text }}",
        "categories": {
          "categories": [
            {
              "category": "Customer Support ",
              "description": "An email that is related to helping out a costumer. They may be asking questions about our policies or questions or questions about our products or services. Adding to that A customer email typically includes a greeting, a clear question or problem, relevant details like an order number or account information, and a polite closing. It is written in natural language and usually asks for help, information, or action.\n\nHere is an Example: \n\nSubject: Issue with My Recent Order\n\nHi there,\n\nI placed an order (#12345) last week, but I haven’t received a shipping confirmation yet. Can you please check the status for me?\n\nThanks in advance!\n\nBest,\nJohn Doe\n"
            },
            {
              "category": "Other ",
              "description": "Any email that is not Costumer Support related "
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "a141facb-644c-4d19-8fdc-44a17d9ee330",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        272,
        656
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openRouterApi": {
          "id": "3AbcnT3Z9ViRfs1R",
          "name": "Demo "
        }
      },
      "typeVersion": 1
    },
    {
      "id": "b6e7d92c-fe48-4790-bb13-11242097a67e",
      "name": "操作なし, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        608,
        416
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "a279b9cc-00ff-4a81-b98e-139b77d960f0",
      "name": "AI エージェント",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        560,
        32
      ],
      "parameters": {
        "text": "={{ $('Gmail Trigger').item.json.text }}",
        "options": {
          "systemMessage": "=# Overview \nYou are a customer support agent for Tech Haven. Your job is to respond to incoming emails with relevant information using your knowledgeBase tool. \n\n# Instructions \n- Your output should be friendly and give as detailed information as possbile \n- Sign off as Mrs. Helpful from Tech Haven Solutions \n\n## Output \n- Output only the body content of the email "
        },
        "promptType": "define"
      },
      "typeVersion": 2.1
    },
    {
      "id": "2f763a56-7c2d-4317-9df2-cb38d2176b9f",
      "name": "OpenRouter Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        560,
        224
      ],
      "parameters": {
        "model": "google/gemini-2.0-flash-001",
        "options": {}
      },
      "credentials": {
        "openRouterApi": {
          "id": "3AbcnT3Z9ViRfs1R",
          "name": "Demo "
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f8d50a89-7a5c-4088-861c-ce238e42e908",
      "name": "knowledgeBase",
      "type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
      "position": [
        864,
        272
      ],
      "parameters": {
        "mode": "retrieve-as-tool",
        "options": {
          "pineconeNamespace": "FAQ"
        },
        "pineconeIndex": {
          "__rl": true,
          "mode": "list",
          "value": "sample",
          "cachedResultName": "sample"
        },
        "toolDescription": "Name: knowledgeBase\n\nCall this tool to [your Database] information"
      },
      "credentials": {
        "pineconeApi": {
          "id": "oSFHC8zVT449PBxm",
          "name": "PineconeApi account"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "5c4edd48-ac92-4a2a-8261-40ecbe322df6",
      "name": "OpenAI 埋め込み",
      "type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
      "position": [
        960,
        432
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "WVC4WZ1lsahz1CtE",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "e3b08b15-3e88-407c-91bb-1bef981acf48",
      "name": "Reply to a message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1072,
        32
      ],
      "webhookId": "61d9e565-906c-4053-b5c2-875df9a77704",
      "parameters": {
        "message": "={{ $json.output }}",
        "options": {
          "appendAttribution": false
        },
        "emailType": "text",
        "messageId": "={{ $('Gmail Trigger').item.json.id }}",
        "operation": "reply"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "YtSYw4XPKtxrfXMo",
          "name": "emilio.mayares.loewenstein@gmail.com"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "93fe6d9e-3c6b-4980-a003-35cb603e7099",
      "name": "付箋",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -304,
        -48
      ],
      "parameters": {
        "width": 400,
        "height": 592,
        "content": "## Gmail Trigger \n- How it Works: Listens for new incoming Gmail messages in real time.\n- Value: Automatically pulls new customer emails into the workflow without manual checking.\n- Credentials: Connect your Gmail account using Gmail OAuth2.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "af395655-6228-4838-8aee-2bcba241dca0",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        -48
      ],
      "parameters": {
        "color": 2,
        "width": 288,
        "height": 592,
        "content": "## Text Classifier\n- How it Works: Uses AI to classify emails into Customer Support or Other.\n- Value: Ensures only relevant customer support emails get a response.\n- Credentials: None required (uses built-in LangChain classifier)."
      },
      "typeVersion": 1
    },
    {
      "id": "3048d5d3-b301-4a79-a3ac-39bd57f99e10",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -304,
        560
      ],
      "parameters": {
        "color": 3,
        "width": 704,
        "height": 256,
        "content": "## OpenRouter Chat Model \n- How it Works: Provides AI-powered text generation for classification and responses.\n- Value: Enhances classification and helps prepare structured input for the agent.\n- Credentials: Connect your OpenRouter API key."
      },
      "typeVersion": 1
    },
    {
      "id": "473c68ec-f0b0-4a2a-86ca-1abc25fa01e9",
      "name": "付箋3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        448,
        -208
      ],
      "parameters": {
        "color": 4,
        "width": 464,
        "height": 208,
        "content": "## AI Agent \n- How it Works: Acts as a virtual support agent. It takes customer emails, retrieves policy/FAQ info, and drafts a helpful reply.\n- Value: Saves time by providing accurate, personalized, and friendly responses automatically.\n- Credentials: Requires OpenRouter API and connection to Pinecone knowledge base."
      },
      "typeVersion": 1
    },
    {
      "id": "8ea803ef-4f38-4611-928e-fb3ddd833f45",
      "name": "付箋4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1152,
        272
      ],
      "parameters": {
        "width": 288,
        "height": 320,
        "content": "## KnowledgeBase \n- How it Works: Stores and retrieves your Database information.\n- Value: Ensures responses are consistent and based on verified knowledge.\n- Credentials: Connect your Pinecone API credentials."
      },
      "typeVersion": 1
    },
    {
      "id": "540a4355-c133-488b-b5c3-8b53a9417379",
      "name": "付箋5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        608
      ],
      "parameters": {
        "color": 6,
        "width": 560,
        "height": 208,
        "content": "## Embeddings (OpenAI)\n- How it Works: Converts FAQ text into embeddings so the AI can search and retrieve relevant information.\n- Value: Improves accuracy of answers by grounding responses in real data.\n- Credentials: Connect your OpenAI API key."
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "72b878a4-7173-40ae-952e-999765d1728a",
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "e3b08b15-3e88-407c-91bb-1bef981acf48",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail Trigger": {
      "main": [
        [
          {
            "node": "Text Classifier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f8d50a89-7a5c-4088-861c-ce238e42e908": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Text Classifier": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Embeddings OpenAI": {
      "ai_embedding": [
        [
          {
            "node": "f8d50a89-7a5c-4088-861c-ce238e42e908",
            "type": "ai_embedding",
            "index": 0
          }
        ]
      ]
    },
    "a141facb-644c-4d19-8fdc-44a17d9ee330": {
      "ai_languageModel": [
        [
          {
            "node": "Text Classifier",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "2f763a56-7c2d-4317-9df2-cb38d2176b9f": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

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

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

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

中級

有料ですか?

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

ワークフロー情報
難易度
中級
ノード数15
カテゴリー-
ノードタイプ9
難易度説明

経験者向け、6-15ノードの中程度の複雑さのワークフロー

作成者
Emilio Loewenstein

Emilio Loewenstein

@emilio-loewenstein

Emilio is an 18-year-old AI Engineer and Co-Founder of an AI agency, building intelligent systems that help businesses automate, innovate, and scale.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34