AutomationFlowsAI & RAG › Lead Qualification and Scoring with Jotform, Gemini Ai, and Slack

Lead Qualification and Scoring with Jotform, Gemini Ai, and Slack

ByAtta @attakhalighi on n8n.io

Automate your lead qualification process by connecting Jotform to Gemini AI. This workflow instantly analyzes new form submissions, assigns a priority score, filters out spam, and routes legitimate leads for immediate action. Stop manually sorting through submissions and let…

Event trigger★★★★☆ complexityAI-powered17 nodesJot Form TriggerAgentOutput Parser StructuredGoogle Gemini ChatGmailSlack
AI & RAG Trigger: Event Nodes: 17 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #9650 — we link there as the canonical source.

This workflow follows the Agent → Gmail recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "9294603e-f9cd-4460-827c-c5279a04d3b8",
      "name": "JotForm Trigger",
      "type": "n8n-nodes-base.jotFormTrigger",
      "position": [
        -832,
        -32
      ],
      "parameters": {
        "form": "252856078065061"
      },
      "credentials": {
        "jotFormApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f2dbf370-4810-429c-9a23-731b94bb724b",
      "name": "AI Agent",
      "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": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -256,
        176
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "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": "Switch",
      "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
      ],
      "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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "c8898078-0270-44e3-80a3-b7a1b9319eff",
      "name": "Hot Reply",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2048,
        -224
      ],
      "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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "415d662d-2a9f-4ac4-a556-f88f89022601",
      "name": "Cold Reply",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2048,
        192
      ],
      "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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "e9d51ab2-b1b0-48e3-92ba-eb5324d0f766",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1104,
        -736
      ],
      "parameters": {
        "color": 5,
        "width": 640,
        "height": 864,
        "content": "## Step 1: The Front Door \ud83d\udeaa\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": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -416,
        -416
      ],
      "parameters": {
        "color": 3,
        "width": 576,
        "height": 752,
        "content": "## Step 2: The AI Brains \ud83e\udde0\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": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        208,
        -384
      ],
      "parameters": {
        "width": 432,
        "height": 560,
        "content": "## Step 3: The Spam Filter \ud83d\udee1\ufe0f\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": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        976,
        -384
      ],
      "parameters": {
        "color": 4,
        "width": 432,
        "height": 560,
        "content": "## Step 4: The Team Alert \ud83d\udce3\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": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1456,
        -384
      ],
      "parameters": {
        "color": 2,
        "width": 432,
        "height": 560,
        "content": "## Step 5: The Sorting Hat \ud83d\udd00\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": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2256,
        -240
      ],
      "parameters": {
        "color": 6,
        "width": 464,
        "height": 544,
        "content": "## Step 6: The Personalized Follow-Up \u2709\ufe0f\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
      ],
      "parameters": {
        "text": "=\ud83d\ude80 *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": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.3
    }
  ],
  "connections": {
    "Switch": {
      "main": [
        [
          {
            "node": "Hot Reply",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Warm Reply",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Cold Reply",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Spam": {
      "main": [
        [
          {
            "node": "Nothing to do for spams!",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send lead alert to sales",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "If Spam",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "JotForm Trigger": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Send lead alert to sales": {
      "main": [
        [
          {
            "node": "Switch",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Automate your lead qualification process by connecting Jotform to Gemini AI. This workflow instantly analyzes new form submissions, assigns a priority score, filters out spam, and routes legitimate leads for immediate action. Stop manually sorting through submissions and let…

Source: https://n8n.io/workflows/9650/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Turn raw feedback into actionable product insights. This workflow collects feedback from both customers and staff via a single Jotform, uses Gemini AI to analyze and categorize it, then intelligently

Jot Form Trigger, Agent, Output Parser Structured +5
AI & RAG

Stop drowning in job applications. This workflow transforms your hiring process from a manual, time-consuming data-entry task into an automated, intelligent screening system.

Jot Form Trigger, Google Gemini Chat, Output Parser Structured +5
AI & RAG

This blueprint details a highly efficient, AI-powered workflow designed to automate customer reward fulfillment. Leveraging the accessible interface of Jotform, this system delivers superior reliabili

Jot Form Trigger, Google Gemini Chat, HTTP Request +4
AI & RAG

Transform accounts payable from a manual bottleneck into an intelligent, automated system that reads invoices, detects fraud, and processes payments automatically—saving 20+ hours per week while preve

OpenAI, Agent, OpenAI Chat +6
AI & RAG

Workflow explaination video: https://youtu.be/z1grVuNOXMk

Jot Form Trigger, Agent, Google Gemini Chat +4