Calificación automatizada de leads usando JotForm, Gemini de Google y recordatorios de Telegram

Intermedio

Este es unautomatización que contiene 12 nodos.Utiliza principalmente nodos como Set, Switch, Telegram, HttpRequest, JotFormTrigger. Cualificación automatizada de prospectos de JotForm usando Google Gemini y recordatorios de Telegram

Requisitos previos
  • Bot Token de Telegram
  • Pueden requerirse credenciales de autenticación para la API de destino
  • Clave de API de Google Gemini

Categoría

-
Vista previa del flujo de trabajo
Visualización de las conexiones entre nodos, con soporte para zoom y panorámica
Exportar flujo de trabajo
Copie la siguiente configuración JSON en n8n para importar y usar este flujo de trabajo
{
  "meta": {
    "instanceId": "02059f0cb4b0ce23b903e8adf7a801dac35cd440dae5af845bde6649af1dcbcf",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "99757a2a-b7d4-43fa-8e4c-5df2f38b2f4b",
      "name": "Analizador de Salida Estructurada",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        5696,
        3056
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"lead_classification\": 1,\n  \"conclusion\": \"Brief explanation of why this is classified as hot/cold lead\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "09144e8d-63e6-46f7-a39f-f7882d5a0a39",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        5536,
        3056
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "54d6f3a4-f95e-48e4-bd2a-5bcdb6ca80c2",
      "name": "Disparador: Al Enviar el Formulario",
      "type": "n8n-nodes-base.jotFormTrigger",
      "position": [
        5104,
        2896
      ],
      "webhookId": "YOUR_WEBHOOK_ID_1",
      "parameters": {
        "form": "252791935306463",
        "onlyAnswers": false
      },
      "typeVersion": 1
    },
    {
      "id": "24dcca39-691a-442a-87eb-a08c317ed555",
      "name": "Analizar Clasificación de IA",
      "type": "n8n-nodes-base.set",
      "position": [
        5328,
        2896
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "fb18d460-b74b-4c64-9b0b-6fd57496e14e",
              "name": "submissionID",
              "type": "string",
              "value": "={{ $json.submissionID }}"
            },
            {
              "id": "be636306-136d-457d-a3e6-003310a3aac8",
              "name": "Form_Data",
              "type": "object",
              "value": "={{ $json.rawRequest }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "0b0ba84c-d1e3-4234-a864-ef943f8b9f68",
      "name": "Clasificar Calidad del Lead",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        5552,
        2896
      ],
      "parameters": {
        "text": "=contact us submission data :-\n{{ $json.Form_Data.toJsonString() }}",
        "options": {
          "systemMessage": "You are a Lead Classification AI Agent for an AI and automation services business. Your task is to analyze contact form submissions and classify them into three categories based on their intent, relevance, and legitimacy.\n\n## Business Context\nThe business specializes in:\n- AI solutions and implementation\n- AI agent development\n- Business process automation\n- AI consulting and collaboration\n\n## Classification Criteria\n\n### Hot Lead (1) - Indicators:\n- Explicit interest in AI services, AI agents, or automation solutions\n- Requests for collaboration, partnership, or project proposals\n- Business inquiries about implementing AI/automation\n- Questions about specific AI/automation capabilities\n- Mentions wanting to discuss AI transformation or digital automation\n- Budget discussions or timeline inquiries for AI projects\n- RFP or RFQ related to AI/automation\n\n### Cold Lead (0) - Indicators:\n- Genuine inquiries unrelated to AI/automation\n- Job applications or recruitment queries (legitimate)\n- Business inquiries outside your service scope\n- Student queries or academic research (non-partnership)\n- Information requests that are real but not relevant to your services\n\n### Garbage/Spam (2) - Indicators:\n- Random text, gibberish, or nonsensical content\n- Test submissions (e.g., \"test\", \"asdf\", \"123\")\n- Spam or promotional content from other businesses\n- Fake data or obviously false information\n- Bot-generated submissions\n- Empty or incomplete critical fields\n- Abusive or inappropriate content\n- Duplicate spam submissions\n- No coherent message or intent\n\n## Task Instructions\n1. Analyze the provided contact form data carefully\n2. Check for data quality and legitimacy first\n3. Evaluate the intent, content, and relevance to AI/automation services\n4. Classify as hot lead (1), cold lead (0), or garbage (2)\n5. Provide a brief conclusion explaining your classification\n\n## Input Format\nYou will receive contact form data in JSON format containing fields such as name, email, message, company, etc.\n\n## Output Format\nReturn ONLY a valid JSON object with this exact structure:\n{\n  \"lead_classification\": 0 or 1 or 2,\n  \"conclusion\": \"Brief explanation of why this is classified as hot/cold/garbage lead\"\n}\n\n## Important Notes\n- Prioritize identifying garbage submissions first\n- Be decisive in your classification\n- Focus on data quality, business intent, and relevance\n- Keep conclusion concise (1-2 sentences max)\n- Always return valid JSON format\n"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "62dc02a1-9c96-4011-84df-0d542da55ae2",
      "name": "Enrutar por Tipo de Lead",
      "type": "n8n-nodes-base.switch",
      "position": [
        5904,
        2880
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "ee1788c4-76f6-492b-b0cb-e378ae42d289",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output.lead_classification }}",
                    "rightValue": "0"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "c3adcd2b-681b-4f95-a252-2bf0a5bbe3c8",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output.lead_classification }}",
                    "rightValue": "1"
                  }
                ]
              }
            },
            {
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "loose"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "40619cf1-977a-4da4-bc8e-f13c10759612",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.output.lead_classification }}",
                    "rightValue": "2"
                  }
                ]
              }
            }
          ]
        },
        "options": {},
        "looseTypeValidation": true
      },
      "typeVersion": 3.3
    },
    {
      "id": "87909f86-aaa7-4afb-86ef-150457f99d8a",
      "name": "Ignorar Lead Frío",
      "type": "n8n-nodes-base.noOp",
      "position": [
        6112,
        2720
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "a1ad2b16-920e-411c-9b81-8e145abf82f1",
      "name": "Notificar Lead Caliente",
      "type": "n8n-nodes-base.telegram",
      "position": [
        6176,
        2896
      ],
      "webhookId": "YOUR_WEBHOOK_ID_2",
      "parameters": {
        "text": "=Submission data\nName :- {{ $('Parse AI Classification').item.json.Form_Data.Name || '-' }}\nEmail :- {{ $('Parse AI Classification').item.json.Form_Data[\"E-mail\"] || '-' }}\nContact no :- {{ $('Parse AI Classification').item.json.Form_Data[\"Contact Number\"] || '-' }}\nWebsite :- {{ $('Parse AI Classification').item.json.Form_Data.Website || '-' }}\nMessage :- {{ $('Parse AI Classification').item.json.Form_Data.Message || '-' }}\n\nConclusion :-\n{{ $json.output.conclusion }}",
        "chatId": "YOUR_TELEGRAM_CHAT_ID",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b298d586-8ac3-45ef-8641-f85012030047",
      "name": "Obtener ID de Chat (Configuración Única)",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        5120,
        3168
      ],
      "webhookId": "YOUR_WEBHOOK_ID_3",
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "51fc689f-76a9-4bb1-9f35-13ba9e76542e",
      "name": "Marcar en JotForm",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        6368,
        2896
      ],
      "parameters": {
        "url": "=https://api.jotform.com/submission/{{ $('Trigger: When Form Submitted').item.json.submissionID }}",
        "method": "POST",
        "options": {},
        "jsonBody": "{\n  \"flag\": \"1\"\n}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "APIKEY",
              "value": "YOUR_JOTFORM_API_KEY"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "ed9814fc-f444-4d7f-b9c6-7ce9d843737e",
      "name": "Eliminar Envío de Spam",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        6128,
        3088
      ],
      "parameters": {
        "url": "=https://api.jotform.com/submission/{{ $('Trigger: When Form Submitted').item.json.submissionID }}",
        "method": "DELETE",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "APIKEY",
              "value": "YOUR_JOTFORM_API_KEY"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "33fc143d-41ff-4b78-bd22-3028361dafcb",
      "name": "Nota Adhesiva2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4368,
        2480
      ],
      "parameters": {
        "width": 2192,
        "height": 880,
        "content": "# Smart Lead Qualification for JotForm Contact Forms\n\n## Overview\n\nThis n8n workflow automatically classifies incoming contact form submissions from JotForm into three categories (Hot Lead, Cold Lead, or Garbage/Spam) using AI. It then takes appropriate actions based on the classification: notifying via Telegram for hot leads, ignoring cold leads, and deleting spam submissions.\n\n---\n\n## Quick Links\n\n**Get JotForm:** [JotForm Website](https://www.jotform.com/?partner=roshanramanidev)\n\n\n## Basic Working Flow\n\n### Workflow Steps:\n\n1. **JotForm Trigger** - Receives new contact form submissions\n2. **Extract Submission Data** - Extracts and organizes submission data\n3. **Classify Lead Quality (AI Agent)** - Analyzes and classifies the lead using Google Gemini\n4. **Route by Lead Type** - Routes based on classification:\n   - **Cold Lead (0)** → No action taken\n   - **Hot Lead (1)** → Sends Telegram notification → Flags submission in JotForm\n   - **Garbage/Spam (2)** → Deletes submission from JotForm\n\n### Classification Logic:\n\n- **Hot Lead (1)**: Genuine inquiries about AI services, automation, collaboration, or project proposals\n- **Cold Lead (0)**: Legitimate but irrelevant inquiries (job applications, unrelated business queries)\n- **Garbage/Spam (2)**: Test submissions, spam, bots, gibberish, or incomplete data\n\n---\n\n"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "a1ad2b16-920e-411c-9b81-8e145abf82f1": {
      "main": [
        [
          {
            "node": "51fc689f-76a9-4bb1-9f35-13ba9e76542e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "62dc02a1-9c96-4011-84df-0d542da55ae2": {
      "main": [
        [
          {
            "node": "87909f86-aaa7-4afb-86ef-150457f99d8a",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "a1ad2b16-920e-411c-9b81-8e145abf82f1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "ed9814fc-f444-4d7f-b9c6-7ce9d843737e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0b0ba84c-d1e3-4234-a864-ef943f8b9f68": {
      "main": [
        [
          {
            "node": "62dc02a1-9c96-4011-84df-0d542da55ae2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "24dcca39-691a-442a-87eb-a08c317ed555": {
      "main": [
        [
          {
            "node": "0b0ba84c-d1e3-4234-a864-ef943f8b9f68",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "09144e8d-63e6-46f7-a39f-f7882d5a0a39": {
      "ai_languageModel": [
        [
          {
            "node": "0b0ba84c-d1e3-4234-a864-ef943f8b9f68",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "99757a2a-b7d4-43fa-8e4c-5df2f38b2f4b": {
      "ai_outputParser": [
        [
          {
            "node": "0b0ba84c-d1e3-4234-a864-ef943f8b9f68",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "54d6f3a4-f95e-48e4-bd2a-5bcdb6ca80c2": {
      "main": [
        [
          {
            "node": "24dcca39-691a-442a-87eb-a08c317ed555",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Preguntas frecuentes

¿Cómo usar este flujo de trabajo?

Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.

¿En qué escenarios es adecuado este flujo de trabajo?

Intermedio

¿Es de pago?

Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.

Información del flujo de trabajo
Nivel de dificultad
Intermedio
Número de nodos12
Categoría-
Tipos de nodos11
Descripción de la dificultad

Adecuado para usuarios con experiencia intermedia, flujos de trabajo de complejidad media con 6-15 nodos

Autor
Roshan Ramani

Roshan Ramani

@rawsun007

I love building smart n8n automations that actually work reliably. My focus is on making everyday tasks like email, social media, and CRM workflows simpler using AI. I've shared templates in the n8n community, including a WhatsApp Expense Tracker that people really enjoy. What keeps me excited is constantly trying new things - testing fresh nodes, playing with AI tools like LangChain, and discovering creative ways to connect systems!

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34