受信頼入り口管理エージェント

中級

これはAI Summarization, Multimodal AI分野の自動化ワークフローで、8個のノードを含みます。主にGmail, GmailTrigger, LmChatOpenAi, TextClassifierなどのノードを使用。 GPT-5 分類を使用して Gmail メッセージに自動のにラベルを付ける

前提条件
  • Googleアカウント + Gmail API認証情報
  • OpenAI API Key
ワークフロープレビュー
ノード接続関係を可視化、ズームとパンをサポート
ワークフローをエクスポート
以下のJSON設定をn8nにインポートして、このワークフローを使用できます
{
  "id": "iPhhNVPzleZr44YK",
  "meta": {
    "instanceId": "cbbe3d07d282d90d2165a7ab7800571be416166e6eb660e7a28cfe9b84473f49",
    "templateCredsSetupCompleted": true
  },
  "name": "Inbox Management Agent",
  "tags": [],
  "nodes": [
    {
      "id": "240f8e93-87f3-4185-bc12-9b82ab43ce9c",
      "name": "Gmail Trigger",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -336,
        -128
      ],
      "parameters": {
        "simple": false,
        "filters": {},
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        }
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "VI8hpbWunRMMvR6a",
          "name": "Gmail account"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "c6b683ca-49c4-41b2-aace-9cc434164460",
      "name": "テキスト分類器",
      "type": "@n8n/n8n-nodes-langchain.textClassifier",
      "position": [
        -112,
        -128
      ],
      "parameters": {
        "options": {},
        "inputText": "={{ $json.text }}",
        "categories": {
          "categories": [
            {
              "category": "High Priority",
              "description": "Emails that require immediate attention or quick response, often from executives, key clients, or internal stakeholders. These usually involve time-sensitive issues, deadlines, or escalations. Keywords/phrases to look for: “urgent,” “ASAP,” “immediate response,” “deadline,” “critical,” “important matter.”"
            },
            {
              "category": "Promotion",
              "description": "Emails related to marketing campaigns, sales offers, product launches, or event invitations. Typically sent in bulk and often contain discounts, new features, or company news. Keywords/phrases to look for: “special offer,” “discount,” “limited time,” “new product,” “webinar,” “sale,” “exclusive invite.”"
            },
            {
              "category": "Finance/Billing",
              "description": "Emails dealing with payments, invoices, receipts, or financial records. May come from vendors, clients, or internal finance teams. Usually involve transactions, balances, or account updates. Keywords/phrases to look for: “invoice,” “payment due,” “billing,” “receipt,” “account statement,” “refund,” “transaction.”"
            },
            {
              "category": "Customer Support",
              "description": "Emails from customers seeking help, troubleshooting, or service requests. Often include questions, complaints, or technical issues that require a response or resolution. Keywords/phrases to look for: “issue,” “not working,” “help,” “support needed,” “error,” “problem with,” “can you fix.”"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "572a1a99-1193-4128-9073-43b5a8a11d11",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -40,
        160
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-5",
          "cachedResultName": "gpt-5"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "BmIUKpYmW7YRSbaU",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "02ca20f3-241e-42df-8969-0c97119b77f8",
      "name": "高優先度",
      "type": "n8n-nodes-base.gmail",
      "position": [
        240,
        -416
      ],
      "webhookId": "2ac56052-19d7-4e91-a7db-855e99c0b996",
      "parameters": {
        "labelIds": [
          "Label_2050230922550608961"
        ],
        "messageId": "={{ $json.id }}",
        "operation": "addLabels"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "VI8hpbWunRMMvR6a",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "66943ca1-563f-426a-8d81-10be52294555",
      "name": "プロモーション",
      "type": "n8n-nodes-base.gmail",
      "position": [
        240,
        -224
      ],
      "webhookId": "2ac56052-19d7-4e91-a7db-855e99c0b996",
      "parameters": {
        "labelIds": [
          "Label_4137435394166770583",
          "CATEGORY_PROMOTIONS"
        ],
        "messageId": "={{ $json.id }}",
        "operation": "addLabels"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "VI8hpbWunRMMvR6a",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "32916943-2fc8-4b25-b986-bbc5ba64df7a",
      "name": "財務/請求",
      "type": "n8n-nodes-base.gmail",
      "position": [
        240,
        -32
      ],
      "webhookId": "2ac56052-19d7-4e91-a7db-855e99c0b996",
      "parameters": {
        "labelIds": [
          "Label_123317652592217245"
        ],
        "messageId": "={{ $json.id }}",
        "operation": "addLabels"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "VI8hpbWunRMMvR6a",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "ec3002b3-20a6-44c0-855f-43788eedbd4c",
      "name": "カスタマーサポート",
      "type": "n8n-nodes-base.gmail",
      "position": [
        240,
        160
      ],
      "webhookId": "2ac56052-19d7-4e91-a7db-855e99c0b996",
      "parameters": {
        "labelIds": [
          "Label_3866679317291552912"
        ],
        "messageId": "={{ $json.id }}",
        "operation": "addLabels"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "VI8hpbWunRMMvR6a",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "fb064df0-b84c-466c-b773-7e71e4fcd863",
      "name": "付箋メモ",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1008,
        -1280
      ],
      "parameters": {
        "width": 1520,
        "height": 2064,
        "content": "# Smart Gmail inbox organization with OpenAI classification\n\n## Who's it for\nThis template is perfect for busy professionals, customer service teams, and small business owners who receive high volumes of email and struggle to keep their Gmail inbox organized. If you're spending too much time manually sorting emails or missing important messages in the clutter, this AI-powered solution will transform your email management.\n\n## How it works\nThis workflow automatically monitors your Gmail inbox and uses OpenAI's GPT model to intelligently classify incoming emails into four key categories:\n - High Priority - Urgent emails requiring immediate attention from executives, clients, or stakeholders\n - Promotion - Marketing emails, sales offers, product launches, and event invitations\n - Finance/Billing - Invoices, receipts, payment notifications, and financial records\n - Customer Support - Help requests, troubleshooting queries, and service-related issues\n  \nOnce classified, emails are automatically labeled in Gmail using the appropriate tags, making it easy to filter, search, and prioritize your communications.\n\n## How to set up\n### Requirements\n - Gmail account with OAuth2 access enabled\n - OpenAI API key with GPT model access\n - Custom Gmail labels created for each category\n\n### Step-by-step setup\n 1. Create Gmail Labels\n  - In Gmail, create these labels: \"High Priority\", \"Promotion\", \"Finance/Billing\", \"Customer Support\"\n  - Note the label IDs (you'll need to replace the hardcoded ones in the workflow)\n 2. Configure Credentials\n  - Add your Gmail OAuth2 credentials in n8n\n  - Add your OpenAI API credentials\n 3. Update Label IDs\n  - Replace the hardcoded label IDs in each Gmail node with your actual label IDs\n  - You can find label IDs by testing the Gmail node or using Gmail API\n 4. Adjust Classification Rules\n  - Review the Text Classifier categories and modify descriptions to match your specific needs\n  - Add or remove categories as required\n 5. Set Polling Frequency\n  - The workflow is set to check every minute - adjust based on your email volume\n\n\n## How to customize the workflow\n### Modify Categories\n - Edit the Text Classifier node to add/remove email categories\n - Update category descriptions to better match your business context\n - Add corresponding Gmail nodes for new categories\n\n### Change AI Model\n - Switch from GPT-5 to GPT-4 or GPT-3.5-turbo based on your needs and budget\n - Adjust the model parameters in the OpenAI Chat Model node\n\n### Add Actions Beyond Labeling\n  - **Star important** emails by adding a Gmail \"star\" action for high priority items\n  - **Forward to team members** using additional Gmail send nodes\n  - **Create calendar events**  from meeting requests using Google Calendar integration\n  - **Log to spreadsheet**  for email analytics using Google Sheets\n\n### Advanced Filtering\n  - Add Gmail filter conditions to the trigger (sender, subject patterns, etc.)\n  - Include/exclude specific email addresses or domains\n  - Set up different polling schedules for different email types\n\n### Notification Options\n  - Add Slack notifications for high priority emails\n  - Send SMS alerts using Twilio for critical messages\n  - Create tickets in your support system for customer inquiries\n\n### Security considerations\n  - Never hardcode API keys in the workflow - always use n8n's credential system\n  - Review OpenAI's data usage policies for email content processing\n  - Consider data retention policies for processed email content\n  - Test thoroughly with non-sensitive emails first\n\n### Troubleshooting tips\n  - Classification accuracy: Fine-tune category descriptions if emails are being misclassified\n  - Rate limits: Monitor OpenAI API usage to avoid hitting rate limits with high email volumes\n  - Gmail quotas: Be aware of Gmail API quotas when processing large volumes\n  - Label sync: Allow time for Gmail labels to sync across devices and clients\n"
      },
      "typeVersion": 1
    }
  ],
  "active": true,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "874dd28f-0458-49bd-9e50-f23fd049c08a",
  "connections": {
    "240f8e93-87f3-4185-bc12-9b82ab43ce9c": {
      "main": [
        [
          {
            "node": "c6b683ca-49c4-41b2-aace-9cc434164460",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c6b683ca-49c4-41b2-aace-9cc434164460": {
      "main": [
        [
          {
            "node": "02ca20f3-241e-42df-8969-0c97119b77f8",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "66943ca1-563f-426a-8d81-10be52294555",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "32916943-2fc8-4b25-b986-bbc5ba64df7a",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "ec3002b3-20a6-44c0-855f-43788eedbd4c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "572a1a99-1193-4128-9073-43b5a8a11d11": {
      "ai_languageModel": [
        [
          {
            "node": "c6b683ca-49c4-41b2-aace-9cc434164460",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}
よくある質問

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

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

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

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

有料ですか?

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

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

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

作成者
Abideen Bello

Abideen Bello

@bideen

Data/Automation consultant with experience helping Sales & Marketing teams to streamline their processes. Use my link to book an initial consultation for custom n8n work.

外部リンク
n8n.ioで表示

このワークフローを共有

カテゴリー

カテゴリー: 34