Calificación y puntuación de leads con JotForm, Gemini AI y Slack

Avanzado

Este es unautomatización que contiene 17 nodos.Utiliza principalmente nodos como If, Gmail, Slack, Switch, JotFormTrigger. Calificación y puntuación de prospectos con JotForm, Gemini AI y Slack

Requisitos previos
  • Cuenta de Google y credenciales de API de Gmail
  • Bot Token de Slack o URL de Webhook
  • 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": "51295e4a2441063c8b3c5b0c823451e48c57f5baaf713c6f2f9d792402274528",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "9294603e-f9cd-4460-827c-c5279a04d3b8",
      "name": "JotForm Trigger",
      "type": "n8n-nodes-base.jotFormTrigger",
      "position": [
        -832,
        -32
      ],
      "webhookId": "728a5fa4-29b1-4da2-b2e6-4022c4c8604f",
      "parameters": {
        "form": "252856078065061"
      },
      "credentials": {
        "jotFormApi": {
          "id": "0rXRUH1s8t1hYA56",
          "name": "JotForm account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f2dbf370-4810-429c-9a23-731b94bb724b",
      "name": "Agente IA",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -224,
        -32
      ],
      "parameters": {
        "text": "=You are an expert lead qualification assistant. Analyze the form submission message below to check for spam and calculate a lead score.\n\nAnalyze this data:\n- Message: {{ $json['How can we help?'] }}\n\nProvide your response ONLY in a valid JSON format with two keys:\n1. \"is_spam\": A boolean (true or false).\n2. \"lead_score\": An integer from 1 to 10, where 10 is a high-quality lead with a clear, specific request.\n\nDo not include any text outside of the JSON object.",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "958d5771-f3b6-4ca7-b588-b2f578bfd69f",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -48,
        176
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"is_spam\": false,\n  \"lead_score\": 9\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "39fd7c5a-6856-4d98-a274-cba96e05f85f",
      "name": "Modelo de chat Google Gemini",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -256,
        176
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "id": "mzeuL0IEjP3FgRof",
          "name": "Google Gemini(PaLM) Api account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8e6004c0-470c-48ee-be04-1dde41ad242b",
      "name": "If Spam",
      "type": "n8n-nodes-base.if",
      "position": [
        368,
        -32
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "7fbea884-b17a-4c3d-ae88-df1bc69b93cd",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.output.is_spam }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "0cb769ad-e691-4f9a-b396-59cf04c1e474",
      "name": "Interruptor",
      "type": "n8n-nodes-base.switch",
      "position": [
        1632,
        -32
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Hot Lead",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "5a5d565e-d9c9-4a67-a160-aa272893a343",
                    "operator": {
                      "type": "number",
                      "operation": "gte"
                    },
                    "leftValue": "={{ $('AI Agent').item.json.output.lead_score }}",
                    "rightValue": 8
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Warm Lead",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "366c473c-e5e1-42fd-bd97-c9eb5893fe0d",
                    "operator": {
                      "type": "number",
                      "operation": "gte"
                    },
                    "leftValue": "={{ $('AI Agent').item.json.output.lead_score }}",
                    "rightValue": 5
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Cold Lead",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "6618605e-c6db-40f0-9661-d345e0939e40",
                    "operator": {
                      "type": "number",
                      "operation": "lte"
                    },
                    "leftValue": "={{ $('AI Agent').item.json.output.lead_score }}",
                    "rightValue": 4
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.3
    },
    {
      "id": "b008b7b3-9423-46f3-bc40-1b35f3cab53f",
      "name": "Warm Reply",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2048,
        -16
      ],
      "webhookId": "b5a19446-4cb2-4c27-84b5-13ce88cbaed0",
      "parameters": {
        "sendTo": "={{ $('JotForm Trigger').item.json['Work Email'] }}",
        "message": "=Hi {{ $('JotForm Trigger').item.json['Full Name'] }},\n\nWe've received your request and are reviewing it now. While you wait, you might find this case study on [Relevant Topic] helpful: [Link to a resource or case study]\n\nOur team will be in touch within one business day.\n\nBest regards,\nThe Team",
        "options": {
          "appendAttribution": false
        },
        "subject": "Thanks for contacting us",
        "emailType": "text"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "8kdHW2rLvRIwn673",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "c8898078-0270-44e3-80a3-b7a1b9319eff",
      "name": "Hot Reply",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2048,
        -224
      ],
      "webhookId": "b5a19446-4cb2-4c27-84b5-13ce88cbaed0",
      "parameters": {
        "sendTo": "={{ $('JotForm Trigger').item.json['Work Email'] }}",
        "message": "=Hi {{ $('JotForm Trigger').item.json['Full Name'] }},\n\nThanks for your detailed message. It sounds like we can definitely help.  An expert will reach out to you personally within the next few hours. If you'd like to book a time directly on our calendar, you can use this link:\n[Your Calendly/Booking Link]\n\nBest regards,\nThe Team",
        "options": {
          "appendAttribution": false
        },
        "subject": "Following up on your request",
        "emailType": "text"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "8kdHW2rLvRIwn673",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "415d662d-2a9f-4ac4-a556-f88f89022601",
      "name": "Cold Reply",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2048,
        192
      ],
      "webhookId": "b5a19446-4cb2-4c27-84b5-13ce88cbaed0",
      "parameters": {
        "sendTo": "={{ $('JotForm Trigger').item.json['Work Email'] }}",
        "message": "=Hi {{ $('JotForm Trigger').item.json['Full Name'] }},\n\nThank you for your interest. We've received your message and will review it as soon as possible.\n\nBest regards,\nThe Team\n",
        "options": {
          "appendAttribution": false
        },
        "subject": "We've received your message",
        "emailType": "text"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "8kdHW2rLvRIwn673",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "e9d51ab2-b1b0-48e3-92ba-eb5324d0f766",
      "name": "Nota adhesiva",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1104,
        -736
      ],
      "parameters": {
        "color": 5,
        "width": 640,
        "height": 864,
        "content": "## Step 1: The Front Door 🚪\n### What this step does:\nThis node is the official start of your workflow. It patiently waits for a new person to fill out your Jotform. As soon as someone hits \"Submit,\" this trigger grabs all their information (name, email, message, etc.) and kicks off the entire qualification process.\n\nThis workflow starts with a submission from a \"Talk to an Expert\" sales lead form.\n\n## Jotform Form Configuration\n\nFirst, you'll need a Jotform account. You can sign up and create your form here:\n**[Get Started with Jotform](https://www.jotform.com/?partner=atakhalighi)**\n\n### Required Form Fields\n\nFor this template to work correctly, your form **must** include the following fields. The names below are used in the workflow's expressions.\n\n  * **Full Name:** Used to personalize the follow-up email.\n  * **Work Email:** The address where the automated reply will be sent.\n  * **Role:** Provides important context for your sales team.\n  * **Number of Employees:** Helps segment and qualify the lead.\n  * **How can we help you?:** **CRITICAL.** This is the text area that provides the message for the AI to analyze for spam checking and lead scoring.\n\n*Note: If you use different names for your fields in Jotform, make sure to update the expressions in the downstream nodes to match.*"
      },
      "typeVersion": 1
    },
    {
      "id": "9e2b8489-1d63-4615-8253-11109805c5d9",
      "name": "Nothing to do for spams!",
      "type": "n8n-nodes-base.noOp",
      "position": [
        752,
        -192
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "e1e480ef-c263-4fc0-920f-743969b06f04",
      "name": "Nota adhesiva1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -416,
        -416
      ],
      "parameters": {
        "color": 3,
        "width": 576,
        "height": 752,
        "content": "## Step 2: The AI Brains 🧠\n### What this step does:\nThis is the core of our automation! It takes the message from the Jotform submission and asks Gemini AI two simple questions:\n1. Is this message spam?\n2. On a scale of 1-10, how interested does this person seem?\n\nThis gives us the `is_spam` and `lead_score` values we need to make smart decisions in the next steps.\n\n### Your To-Do:\n1. Connect your **Google AI credentials**.\n2. In the **Prompt**, double-check that the field name inside the `{{ }}` matches the name of your message field in Jotform (e.g., `How can we help you?`).\n"
      },
      "typeVersion": 1
    },
    {
      "id": "36150c93-74f0-43e4-80cf-5b2bdcb970d9",
      "name": "Nota adhesiva2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        208,
        -384
      ],
      "parameters": {
        "width": 432,
        "height": 560,
        "content": "## Step 3: The Spam Filter 🛡️\n### What this step does:\nThis node acts as a security guard for your workflow. It looks at the \"is_spam\" answer from the AI. If the answer is `true`, it stops the process immediately, ensuring your team is never bothered by junk submissions. Only legitimate leads are allowed to pass.\n\n### Your To-Do:\nNo action needed! This step is pre-configured to protect your sales team's time and focus.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "5468b5f2-5d69-49f4-b052-84b73b7499ae",
      "name": "Nota adhesiva3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        976,
        -384
      ],
      "parameters": {
        "color": 4,
        "width": 432,
        "height": 560,
        "content": "## Step 4: The Team Alert 📣\n### What this step does:\nThe moment a lead passes the spam filter, this node sends a clean, easy-to-read notification to a Slack channel. This allows your team to see new opportunities in real-time and act on them quickly.\n\n### Your To-Do:\n1.  Connect your **Slack credentials**.\n2.  In the **Channel** field, choose the specific channel for your sales team (e.g., `#sales-leads`).\n3.  (Optional) Feel free to edit the message text to better suit your team's needs!\n"
      },
      "typeVersion": 1
    },
    {
      "id": "0edf587b-3bb1-4cf9-85b4-1b5cc5f8497c",
      "name": "Nota adhesiva4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1456,
        -384
      ],
      "parameters": {
        "color": 2,
        "width": 432,
        "height": 560,
        "content": "## Step 5: The Sorting Hat 🔀\n### What this step does:\nThis is where the real prioritization happens! The Switch node looks at the `lead_score` from the AI and directs the lead down the correct path: \"Hot,\" \"Warm,\" or \"Cold.\" This is how we decide which personalized email the lead should receive.\n\n### Your To-Do:\nYou can easily adjust the scoring rules here to match what a \"Hot\" lead means to you. Just click on a rule to change the numbers.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "382296e1-4816-463e-bee1-a2de2bbb32c5",
      "name": "Nota adhesiva5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2256,
        -240
      ],
      "parameters": {
        "color": 6,
        "width": 464,
        "height": 544,
        "content": "## Step 6: The Personalized Follow-Up ✉️\n### What this step does:\nThis is the final, customer-facing step. Based on the path chosen by the Switch node, the correct email template is sent to the lead. Hot leads get a prompt to book a meeting, while colder leads receive more general information.\n\n### Your To-Do (This is very important!):\n1.  Connect your **Gmail credentials** to **all three** of these nodes.\n2.  **Customize each email!** The text is just a template. You **must** rewrite the content to match your company's voice and update placeholder links like `[Your Calendly/Booking Link]` with your real URLs."
      },
      "typeVersion": 1
    },
    {
      "id": "bdf076a3-46cc-4fc2-83ca-78b5298f8417",
      "name": "Send lead alert to sales",
      "type": "n8n-nodes-base.slack",
      "position": [
        1136,
        -16
      ],
      "webhookId": "1c3bcca7-8201-4283-b446-dba36e016a57",
      "parameters": {
        "text": "=🚀 *New Lead Qualified! (Score: {{ $json.output.lead_score }} /10)*\n\n*Name:* {{ $('JotForm Trigger').item.json['Full Name'] }}\n*Company Size:* {{ $('JotForm Trigger').item.json['Number of Employees'] }}\n*Inquiry:* {{ $('JotForm Trigger').item.json['How can we help?'] }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "C09M7DZFLQY",
          "cachedResultName": "sales-leads"
        },
        "otherOptions": {
          "includeLinkToWorkflow": false
        }
      },
      "credentials": {
        "slackApi": {
          "id": "yP6Hr4wJ20zxMNey",
          "name": "Slack account"
        }
      },
      "typeVersion": 2.3
    }
  ],
  "pinData": {},
  "connections": {
    "Switch": {
      "main": [
        [
          {
            "node": "c8898078-0270-44e3-80a3-b7a1b9319eff",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "b008b7b3-9423-46f3-bc40-1b35f3cab53f",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "415d662d-2a9f-4ac4-a556-f88f89022601",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8e6004c0-470c-48ee-be04-1dde41ad242b": {
      "main": [
        [
          {
            "node": "9e2b8489-1d63-4615-8253-11109805c5d9",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "bdf076a3-46cc-4fc2-83ca-78b5298f8417",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "8e6004c0-470c-48ee-be04-1dde41ad242b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9294603e-f9cd-4460-827c-c5279a04d3b8": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "bdf076a3-46cc-4fc2-83ca-78b5298f8417": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "958d5771-f3b6-4ca7-b588-b2f578bfd69f": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "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?

Avanzado

¿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
Avanzado
Número de nodos17
Categoría-
Tipos de nodos10
Descripción de la dificultad

Adecuado para usuarios avanzados, flujos de trabajo complejos con 16+ nodos

Autor

Hi 👋 I design automation workflows with n8n, AI, and custom APIs. My focus is on building reliable systems that save time and boost productivity. Always happy to answer questions about my templates.

Enlaces externos
Ver en n8n.io

Compartir este flujo de trabajo

Categorías

Categorías: 34