Enrichissement de Contacts par IA

Intermédiaire

Ceci est uncontenant 9 nœuds.Utilise principalement des nœuds comme Code, Webhook, Supabase, HttpRequest. Enrichissement intelligent des contacts piloté par l'IA, utilisant OpenAI/Anthropic et Supabase

Prérequis
  • Point de terminaison HTTP Webhook (généré automatiquement par n8n)
  • URL et Clé API Supabase
  • Peut nécessiter les informations d'identification d'authentification de l'API cible

Catégorie

-
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
{
  "name": "AI Contact Enrichment",
  "tags": [
    {
      "id": "customer-support",
      "name": "customer-support",
      "createdAt": "2025-01-14T00:00:00.000Z",
      "updatedAt": "2025-01-14T00:00:00.000Z"
    },
    {
      "id": "ai-automation",
      "name": "ai-automation",
      "createdAt": "2025-01-14T00:00:00.000Z",
      "updatedAt": "2025-01-14T00:00:00.000Z"
    }
  ],
  "nodes": [
    {
      "id": "webhook-trigger",
      "name": "Webhook Déclencheur",
      "type": "n8n-nodes-base.webhook",
      "position": [
        250,
        300
      ],
      "webhookId": "contact-enrichment-webhook",
      "parameters": {
        "path": "contact-enrichment",
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "process-data",
      "name": "Traiter les données",
      "type": "n8n-nodes-base.code",
      "position": [
        450,
        300
      ],
      "parameters": {
        "functionCode": "// Extract and process data\nconst data = {\n  id: Date.now().toString(),\n  ...$input.item.json,\n  timestamp: new Date().toISOString()\n};\nreturn { json: data };"
      },
      "typeVersion": 2
    },
    {
      "id": "prepare-ai",
      "name": "Préparer la requête IA",
      "type": "n8n-nodes-base.code",
      "position": [
        650,
        300
      ],
      "parameters": {
        "functionCode": "// AI Configuration\nconst aiConfig = {\n  provider: $env.AI_PROVIDER || 'openai',\n  apiKey: $env.AI_API_KEY,\n  model: $env.AI_MODEL || 'gpt-3.5-turbo',\n  endpoint: $env.AI_ENDPOINT\n};\nreturn { json: { aiConfig, data: $json } };"
      },
      "typeVersion": 2
    },
    {
      "id": "call-ai",
      "name": "Appeler l'IA API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        850,
        300
      ],
      "parameters": {
        "url": "={{$json.aiConfig.provider === 'openai' ? 'https://api.openai.com/v1/chat/completions' : $json.aiConfig.endpoint}}",
        "method": "POST",
        "sendBody": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "model",
              "value": "={{$json.aiConfig.model}}"
            },
            {
              "name": "messages",
              "value": "={{JSON.stringify([{role: 'user', content: JSON.stringify($json.data)}])}}"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "Authorization",
              "value": "=Bearer {{$json.aiConfig.apiKey}}"
            }
          ]
        }
      },
      "typeVersion": 4
    },
    {
      "id": "save-to-db",
      "name": "Sauvegarder dans Supabase",
      "type": "n8n-nodes-base.supabase",
      "position": [
        1050,
        300
      ],
      "parameters": {
        "table": "workflow_logs",
        "values": "=AI Contact Enrichment,={{JSON.stringify($json)}},={{JSON.stringify($json)}},={{new Date().toISOString()}}",
        "columns": "workflow_name,data,ai_response,created_at",
        "operation": "insert"
      },
      "credentials": {
        "supabaseApi": {
          "id": "supabase-credentials",
          "name": "Supabase API"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "format-response",
      "name": "Formater la réponse",
      "type": "n8n-nodes-base.code",
      "position": [
        1250,
        300
      ],
      "parameters": {
        "functionCode": "return { json: { success: true, workflow: 'AI Contact Enrichment', timestamp: new Date().toISOString() } };"
      },
      "typeVersion": 2
    },
    {
      "id": "sticky-overview",
      "name": "Note adhésive",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        240,
        60
      ],
      "parameters": {
        "width": 380,
        "height": 380,
        "content": "## 🔍 AI Contact Enrichment Workflow\n\n**Purpose:** Automatically enhance contact data with AI-powered insights including job roles, company details, and persona analysis.\n\n**Key Features:**\n✅ Universal AI provider support (OpenAI, Anthropic, etc.)\n✅ Enrich partial contact data\n✅ Generate buyer personas\n✅ Automatic data logging to Supabase\n✅ Perfect for sales & marketing teams"
      },
      "typeVersion": 1
    },
    {
      "id": "sticky-setup",
      "name": "Note adhésive1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        60
      ],
      "parameters": {
        "width": 360,
        "height": 380,
        "content": "## 📋 Setup Required\n\n**Environment Variables:**\n• AI_PROVIDER (openai/anthropic/etc.)\n• AI_API_KEY\n• AI_MODEL (gpt-3.5-turbo/gpt-4)\n• AI_ENDPOINT (for custom providers)\n\n**Credentials:**\n• Supabase API credentials\n\n**Database:**\n• Table: workflow_logs\n• Columns: workflow_name, data, ai_response, created_at"
      },
      "typeVersion": 1
    },
    {
      "id": "sticky-flow",
      "name": "Note adhésive2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        60
      ],
      "parameters": {
        "width": 340,
        "height": 300,
        "content": "## 🔄 Workflow Flow\n\n1️⃣ Webhook receives contact data\n2️⃣ Data is processed and timestamped\n3️⃣ AI configuration prepared from env vars\n4️⃣ AI enriches contact with insights\n5️⃣ Enriched data logged to Supabase\n6️⃣ Success response returned\n\n**Output:** Enhanced contact profile with insights"
      },
      "typeVersion": 1
    }
  ],
  "settings": {
    "executionOrder": "v1"
  },
  "updatedAt": "2025-01-14T00:00:00.000Z",
  "versionId": "1",
  "staticData": null,
  "connections": {
    "call-ai": {
      "main": [
        [
          {
            "node": "save-to-db",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "process-data": {
      "main": [
        [
          {
            "node": "prepare-ai",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "webhook-trigger": {
      "main": [
        [
          {
            "node": "process-data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "save-to-db": {
      "main": [
        [
          {
            "node": "format-response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "prepare-ai": {
      "main": [
        [
          {
            "node": "call-ai",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "triggerCount": 1
}
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

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œuds9
Catégorie-
Types de nœuds5
Description de la difficulté

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

Auteur
Shelly-Ann Davy

Shelly-Ann Davy

@SheCodesFlow

Founder of The Workflow Muse & @SheCodesFlow. I craft elegant, task-focused automations for creators, founders, and soft-tech enthusiasts. “Automate with grace. Scale with power.”

Liens externes
Voir sur n8n.io

Partager ce workflow

Catégories

Catégories: 34