シンプルなメール分類器

中級

これはAI Summarization, Multimodal AI分野の自動化ワークフローで、8個のノードを含みます。主にGmail, GmailTrigger, LmChatOpenAi, TextClassifierなどのノードを使用。 GPT-4 MiniによるGmailメールの自動分類

前提条件
  • Googleアカウント + Gmail API認証情報
  • OpenAI API Key
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "GW8BgSXuDRHwmSI6",
  "meta": {
    "instanceId": "e73c77a832a4af1fdbfd95e61201dd65dffb85871e88031e3f1475c5661e7b54",
    "templateCredsSetupCompleted": true
  },
  "name": "Simple emails classifier",
  "tags": [],
  "nodes": [
    {
      "id": "a06f8baa-e67e-49ed-b471-74fc05fc6b38",
      "name": "Gmail Trigger",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -560,
        192
      ],
      "parameters": {
        "filters": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        }
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "2B6GbcGNkQi4VDzQ",
          "name": "Gmail account"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "fc3e3e26-d404-412c-8d2d-03988214773c",
      "name": "テキスト分類器",
      "type": "@n8n/n8n-nodes-langchain.textClassifier",
      "position": [
        -352,
        160
      ],
      "parameters": {
        "options": {},
        "inputText": "=subject: {{ $json.Subject }}\nMessage: {{ $json.snippet }}",
        "categories": {
          "categories": [
            {
              "category": "Business",
              "description": "Anything from friends or co-workers related to work"
            },
            {
              "category": "Sales",
              "description": "Anything sounds like a cold email or someone trying to sell you something soft or hard way"
            },
            {
              "category": "Meetings",
              "description": "anything mentioning a meeting or a schedule or maybe a reminder"
            },
            {
              "category": "Random",
              "description": "Anything that doesn't fall into our 3 categories"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "8eb5fcae-9d32-445f-88a1-4203585be43a",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -352,
        384
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "iuyzWhX2JGVK5PCn",
          "name": "OpenAI Hostinger"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "1a4ea43d-2cc5-4931-bd5f-8adeebe20334",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        0,
        368
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "190c147b-d1e0-4aa0-ad3f-eadc012ff546",
      "name": "ビジネス",
      "type": "n8n-nodes-base.gmail",
      "position": [
        0,
        0
      ],
      "webhookId": "f69cb642-4f22-4d3a-8107-af33f3760576",
      "parameters": {
        "labelIds": [
          "IMPORTANT"
        ],
        "resource": "thread",
        "threadId": "={{ $('Gmail Trigger').item.json.id }}",
        "operation": "addLabels"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "2B6GbcGNkQi4VDzQ",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "780c4ca1-a6c6-404b-8643-498a4badb9bf",
      "name": "コールドメール",
      "type": "n8n-nodes-base.gmail",
      "position": [
        192,
        96
      ],
      "webhookId": "0a6b8d61-f922-4462-b8b3-26bb6d6aec27",
      "parameters": {
        "resource": "thread",
        "threadId": "={{ $json.id }}",
        "operation": "delete"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "2B6GbcGNkQi4VDzQ",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "6ca3d75f-410b-49a1-a685-7bbbad760074",
      "name": "ミーティング",
      "type": "n8n-nodes-base.gmail",
      "position": [
        192,
        256
      ],
      "webhookId": "f69cb642-4f22-4d3a-8107-af33f3760576",
      "parameters": {
        "labelIds": [
          "YELLOW_STAR"
        ],
        "resource": "thread",
        "threadId": "={{ $('Gmail Trigger').item.json.id }}",
        "operation": "addLabels"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "2B6GbcGNkQi4VDzQ",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "4befbb3e-c00c-443d-b216-90f61cf5ac64",
      "name": "付箋メモ",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -928,
        128
      ],
      "parameters": {
        "color": 6,
        "width": 272,
        "height": 240,
        "content": "## Guide\n\nSetup your openai credentials: https://platform.openai.com/settings/organization/api-keys\n\nSetup your gmail credentials\nand you are ready to go: https://console.cloud.google.com/"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "72a6698f-fc14-4c0a-8838-3f08023a5220",
  "connections": {
    "a06f8baa-e67e-49ed-b471-74fc05fc6b38": {
      "main": [
        [
          {
            "node": "fc3e3e26-d404-412c-8d2d-03988214773c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fc3e3e26-d404-412c-8d2d-03988214773c": {
      "main": [
        [
          {
            "node": "190c147b-d1e0-4aa0-ad3f-eadc012ff546",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "780c4ca1-a6c6-404b-8643-498a4badb9bf",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "6ca3d75f-410b-49a1-a685-7bbbad760074",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "1a4ea43d-2cc5-4931-bd5f-8adeebe20334",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8eb5fcae-9d32-445f-88a1-4203585be43a": {
      "ai_languageModel": [
        [
          {
            "node": "fc3e3e26-d404-412c-8d2d-03988214773c",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

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

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

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

中級 - AI要約, マルチモーダルAI

有料ですか?

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

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

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

作成者
Ilyass Kanissi

Ilyass Kanissi

@ilyass

I design and build custom no-code and low-code automations using n8n to help businesses save hours of manual work, streamline operations, and create clean, scalable workflows.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34