Classificateur de courriels simple

Intermédiaire

Ceci est unAI Summarization, Multimodal AIworkflow d'automatisation du domainecontenant 8 nœuds.Utilise principalement des nœuds comme Gmail, GmailTrigger, LmChatOpenAi, TextClassifier. Classification automatique des e-mails Gmail basée sur la classification GPT-4 Mini

Prérequis
  • Compte Google et informations d'identification Gmail API
  • Clé API OpenAI
Aperçu du workflow
Visualisation des connexions entre les nœuds, avec support du zoom et du déplacement
Exporter le workflow
Copiez la configuration JSON suivante dans n8n pour importer et utiliser ce workflow
{
  "id": "GW8BgSXuDRHwmSI6",
  "meta": {
    "instanceId": "e73c77a832a4af1fdbfd95e61201dd65dffb85871e88031e3f1475c5661e7b54",
    "templateCredsSetupCompleted": true
  },
  "name": "Simple emails classifier",
  "tags": [],
  "nodes": [
    {
      "id": "a06f8baa-e67e-49ed-b471-74fc05fc6b38",
      "name": "Déclencheur Gmail",
      "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": "Classificateur de texte",
      "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": "Modèle de chat OpenAI",
      "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": "Aucune opération, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        0,
        368
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "190c147b-d1e0-4aa0-ad3f-eadc012ff546",
      "name": "Business",
      "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": "Cold E-mails",
      "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": "Meetings",
      "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": "Note adhésive",
      "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": {
    "Gmail Trigger": {
      "main": [
        [
          {
            "node": "Text Classifier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Text Classifier": {
      "main": [
        [
          {
            "node": "190c147b-d1e0-4aa0-ad3f-eadc012ff546",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Cold Emails",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "6ca3d75f-410b-49a1-a685-7bbbad760074",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Text Classifier",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}
Foire aux questions

Comment utiliser ce workflow ?

Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.

Dans quelles scénarios ce workflow est-il adapté ?

Intermédiaire - Résumé IA, IA Multimodale

Est-ce payant ?

Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.

Informations sur le workflow
Niveau de difficulté
Intermédiaire
Nombre de nœuds8
Catégorie2
Types de nœuds6
Description de la difficulté

Adapté aux utilisateurs expérimentés, avec des workflows de complexité moyenne contenant 6-15 nœuds

Auteur
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.

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34