ジーミナAIを活用したZoho Deskサポートチケットの自動分類

中級

これは自動化ワークフローで、14個のノードを含みます。主にCode, SplitOut, HttpRequest, ManualTrigger, ChainLlmなどのノードを使用。 Zoho DeskのチケットをGemini AIで自動分類

前提条件
  • ターゲットAPIの認証情報が必要な場合あり

カテゴリー

-
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "meta": {
    "instanceId": "42450f423595f391b7c323eb4191c0bc81df9f6de5483a12f34f76cb4146556c",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "f34db366-b13a-43ac-8d4e-a52e3a7243dd",
      "name": "「ワークフロー実行」クリック時",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -432,
        -256
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "e2386bfd-2803-4f40-8744-0c86aecfb167",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        1200,
        -96
      ],
      "parameters": {
        "model": "google/gemini-2.5-flash-lite-preview-09-2025",
        "options": {}
      },
      "credentials": {
        "openRouterApi": {
          "id": "aCsTDT5LGS5D8Ndl",
          "name": "OpenRouter account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "fe6a1452-471c-4e2b-8c64-7d32e35bb33b",
      "name": "フィルター classification = null",
      "type": "n8n-nodes-base.code",
      "position": [
        496,
        -256
      ],
      "parameters": {
        "jsCode": "// Filter items where classification is null\nconst filteredItems = $input.all().filter(item => item.json.classification === null);\n\nreturn filteredItems;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "4153b802-af64-4ec1-b55e-2dcd41a8f038",
      "name": "スレッドを取得",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        720,
        -256
      ],
      "parameters": {
        "url": "=https://desk.zoho.eu/api/v1/tickets/{{ $json.id }}/threads",
        "options": {},
        "sendQuery": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "oAuth2Api",
        "queryParameters": {
          "parameters": [
            {
              "name": "sortBy",
              "value": "sendDateTime"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {}
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "f41d94a5-3070-4874-a72d-2ff28af6e4ca",
      "name": "最初のスレッドを取得",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        944,
        -256
      ],
      "parameters": {
        "url": "=https://desk.zoho.eu/api/v1/tickets/{{ $('Filter classification = null').item.json.id }}/threads/{{ $json.data[0].id }}",
        "options": {},
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "oAuth2Api",
        "queryParameters": {
          "parameters": [
            {
              "name": "include",
              "value": "plainText"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "dba88e6c-e555-42d6-b0b6-b02c2f5ef977",
      "name": "分類",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        1168,
        -256
      ],
      "parameters": {
        "text": "=**Role:** You are an expert support ticket classification system.\n\n**Task:** Read the provided ticket title and request body. Based on the content, classify the ticket into one of the following categories. Respond with only the single, most appropriate category name.\n\n**Categories:**\n• Content\n• Contract\n• Invoice\n• Featured Products\n• Affiliate-Partner\n• Bug\n• Feature\n• Other\n\n---\n\n**Ticket Title:**\n{{ $('Filter classification = null').item.json.subject }}\n\n**Ticket Request:**\n{{ $json.plainText }}\n\n**Category:**",
        "batching": {},
        "promptType": "define"
      },
      "typeVersion": 1.7
    },
    {
      "id": "b14e73ba-0046-4395-9e26-f80014a3332a",
      "name": "チケットを更新",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        1600,
        -256
      ],
      "parameters": {
        "url": "=https://desk.zoho.eu/api/v1/tickets/{{ $('Filter classification = null').item.json.id }}",
        "method": "PUT",
        "options": {},
        "sendBody": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "classification",
              "value": "={{ $json.text }}"
            }
          ]
        },
        "genericAuthType": "oAuth2Api"
      },
      "typeVersion": 4.2
    },
    {
      "id": "62d15c70-77fb-4947-a808-29e0c366e957",
      "name": "全チケットを取得",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        48,
        -256
      ],
      "parameters": {
        "url": "https://desk.zoho.eu/api/v1/tickets/search",
        "options": {
          "pagination": {
            "pagination": {
              "parameters": {
                "parameters": [
                  {
                    "name": "from",
                    "value": "={{ $pageCount * 100 }}"
                  }
                ]
              },
              "completeExpression": "={{ $response.body.data.length === 0 || $response.body.data.length < 100 }}",
              "paginationCompleteWhen": "other"
            }
          }
        },
        "sendQuery": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "oAuth2Api",
        "queryParameters": {
          "parameters": [
            {
              "name": "limit",
              "value": "100"
            },
            {
              "name": "sortBy",
              "value": "createdTime"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "4e551054-ffb2-4d4b-ba37-3b24045c9971",
      "name": "チケットを分割",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        272,
        -256
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "data"
      },
      "typeVersion": 1
    },
    {
      "id": "8e29f267-2cae-4429-8914-a58487d45840",
      "name": "付箋1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -576,
        -784
      ],
      "parameters": {
        "width": 368,
        "height": 480,
        "content": "## 🎯 WORKFLOW PURPOSE\n\nAutomatically classifies Zoho Desk tickets using AI based on their title and content.\nProcesses all unclassified tickets in batches.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "4b6d79df-3535-4d37-b959-64f5642817eb",
      "name": "付箋2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -784
      ],
      "parameters": {
        "color": 7,
        "width": 368,
        "height": 480,
        "content": "## 📥 FETCH TICKETS WITH PAGINATION\n- Retrieves 100 tickets per page\n- Automatically paginates through ALL results\n- Sorted by creation time\n\n## 🔐 OAUTH2 SETUP\nSetting up OAuth2 with Zoho can be tricky! \nFollow my complete guide: https://gist.github.com/Julian194/7c0ef5abaa5e3850f2bcc0a51bcd4633\n\n## ⚙️ PAGINATION EXPLAINED\nThis demonstrates proper Zoho API pagination:\n- Uses 'from' parameter: {{ $pageCount * 100 }}\n- Stops when: data.length === 0 or < 100\n- This pattern works for all Zoho Desk paginated endpoints\n"
      },
      "typeVersion": 1
    },
    {
      "id": "a019181e-7023-4002-b106-2635cf4ccf3d",
      "name": "付箋3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        384,
        -784
      ],
      "parameters": {
        "color": 7,
        "width": 320,
        "height": 480,
        "content": "## 🔍 FILTER LOGIC\nOnly processes tickets where 'classification' is empty/null.\nPrevents re-processing already classified tickets.\n\n## 💡 ALTERNATIVE APPROACH\nYou can filter directly in the API using query parameters instead!\nCheck the Zoho API docs for available filters.\nThis example shows client-side filtering for simplicity.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "33dbe4e2-6f94-41f9-bc39-2b57c3df728e",
      "name": "付箋4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1104,
        -784
      ],
      "parameters": {
        "color": 7,
        "width": 368,
        "height": 480,
        "content": "## 🤖 AI CLASSIFICATION CATEGORIES\n• Content\n• Contract\n• Invoice\n• Featured Products\n• Affiliate-Partner\n• Bug\n• Feature\n• Other\n\n## ✏️ CUSTOMIZE FOR YOUR USE CASE\nChange these categories to match your business needs!\nYou can also modify the prompt to classify different aspects \n(urgency, department, product type, etc.)\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "57d25075-78d6-42cc-8415-9a51c8c7883e",
      "name": "付箋5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1536,
        -512
      ],
      "parameters": {
        "color": 7,
        "width": 272,
        "height": 208,
        "content": "## 💾 SAVE CLASSIFICATION\nUpdates the Zoho Desk ticket with the AI-generated classification.\nError handling enabled to continue processing other tickets if one fails.\n"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "dba88e6c-e555-42d6-b0b6-b02c2f5ef977": {
      "main": [
        [
          {
            "node": "b14e73ba-0046-4395-9e26-f80014a3332a",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4153b802-af64-4ec1-b55e-2dcd41a8f038": {
      "main": [
        [
          {
            "node": "f41d94a5-3070-4874-a72d-2ff28af6e4ca",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4e551054-ffb2-4d4b-ba37-3b24045c9971": {
      "main": [
        [
          {
            "node": "fe6a1452-471c-4e2b-8c64-7d32e35bb33b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f41d94a5-3070-4874-a72d-2ff28af6e4ca": {
      "main": [
        [
          {
            "node": "dba88e6c-e555-42d6-b0b6-b02c2f5ef977",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "62d15c70-77fb-4947-a808-29e0c366e957": {
      "main": [
        [
          {
            "node": "4e551054-ffb2-4d4b-ba37-3b24045c9971",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e2386bfd-2803-4f40-8744-0c86aecfb167": {
      "ai_languageModel": [
        [
          {
            "node": "dba88e6c-e555-42d6-b0b6-b02c2f5ef977",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "fe6a1452-471c-4e2b-8c64-7d32e35bb33b": {
      "main": [
        [
          {
            "node": "4153b802-af64-4ec1-b55e-2dcd41a8f038",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "f34db366-b13a-43ac-8d4e-a52e3a7243dd": {
      "main": [
        [
          {
            "node": "62d15c70-77fb-4947-a808-29e0c366e957",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

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

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

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

中級

有料ですか?

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

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

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

作成者
Julian Kaiser

Julian Kaiser

@jksr

Full Stack Developer turned AI & Automation Engineer, implementing intelligent solutions with custom code, LLMs & n8n. Use my link to book a free 30-minute call to discuss your AI challenges and see if my services might be a good fit for your needs.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34