JotForm + Telegram: get hot leads, ditch spam
Your contact form should create conversations. Instead, it creates clutter: bot junk, “just checking” tests, and vague inquiries that steal attention from the leads who are actually ready to talk.
This JotForm lead scoring automation hits marketing managers first, but sales reps and agency owners feel it too. You get a clean, triaged inbox where hot leads go to Telegram right away and spam gets deleted before it becomes a problem.
Below, you’ll see exactly how the workflow classifies every submission, what gets routed where, and how to adapt the rules to match your business.
How This Automation Works
See how this solves the problem:
n8n Workflow Template: JotForm + Telegram: get hot leads, ditch spam
flowchart LR
subgraph sg0["Trigger: When Form Submitted Flow"]
direction LR
n0@{ icon: "mdi:robot", form: "rounded", label: "Structured Output Parser", pos: "b", h: 48 }
n1@{ icon: "mdi:brain", form: "rounded", label: "Google Gemini Chat Model", pos: "b", h: 48 }
n2["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/jotform.dark.svg' width='40' height='40' /></div><br/>Trigger: When Form Submitted"]
n3@{ icon: "mdi:swap-vertical", form: "rounded", label: "Parse AI Classification", pos: "b", h: 48 }
n4@{ icon: "mdi:robot", form: "rounded", label: "Classify Lead Quality", pos: "b", h: 48 }
n5@{ icon: "mdi:swap-horizontal", form: "rounded", label: "Route by Lead Type", pos: "b", h: 48 }
n6@{ icon: "mdi:cog", form: "rounded", label: "Ignore Cold Lead", pos: "b", h: 48 }
n7["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/telegram.svg' width='40' height='40' /></div><br/>Notify Hot Lead"]
n9["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Flag in JotForm"]
n10["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/httprequest.dark.svg' width='40' height='40' /></div><br/>Delete Spam Submission"]
n7 --> n9
n5 --> n6
n5 --> n7
n5 --> n10
n4 --> n5
n3 --> n4
n1 -.-> n4
n0 -.-> n4
n2 --> n3
end
subgraph sg1["Get Chat ID (One-Time Setup) Flow"]
direction LR
n8["<div style='background:#f5f5f5;padding:10px;border-radius:8px;display:inline-block;border:1px solid #e0e0e0'><img src='https://flowpast.com/wp-content/uploads/n8n-workflow-icons/telegram.svg' width='40' height='40' /></div><br/>Get Chat ID (One-Time Setup)"]
end
%% Styling
classDef trigger fill:#e8f5e9,stroke:#388e3c,stroke-width:2px
classDef ai fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef aiModel fill:#e8eaf6,stroke:#3f51b5,stroke-width:2px
classDef decision fill:#fff8e1,stroke:#f9a825,stroke-width:2px
classDef database fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef api fill:#fff3e0,stroke:#e65100,stroke-width:2px
classDef code fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef disabled stroke-dasharray: 5 5,opacity: 0.5
class n2,n8 trigger
class n0,n4 ai
class n1 aiModel
class n5 decision
class n9,n10 api
classDef customIcon fill:none,stroke:none
class n2,n7,n9,n10,n8 customIcon
The Challenge: Sorting real leads from form noise
JotForm makes it easy for people to reach you. It also makes it easy for bots, competitors, and bored browsers. The worst part is the context switching: you open each submission, scan it, decide if it’s worth a response, then try to remember to follow up later. Do that for 20 submissions in a day and you’ve burned a chunk of time, plus you’ve trained your brain to treat every new form alert like a false alarm. Honestly, that’s how hot leads get missed.
It adds up fast. Here’s where it breaks down in real life.
- You read every message manually because the subject line and fields rarely tell the whole story.
- Hot inquiries sit in the same pile as “job seeker” and “student project” submissions, so your response time slips.
- Spam submissions pollute your records, which means future reporting and retargeting lists get messy.
- Even when you do spot a great lead, there’s no consistent process to flag it and make sure it gets handled.
The Fix: AI qualification that alerts you in Telegram
This workflow watches your JotForm contact form for every new submission, then packages the important fields into a clean prompt for an AI classifier. The AI agent scores the message and labels it as a hot lead, a cold (but legitimate) inquiry, or straight-up garbage/spam. From there, routing is automatic. Hot leads trigger a Telegram message so you (or your team) can respond while the prospect is still engaged. Cold leads get quietly skipped so your day stays focused. Spam gets deleted in JotForm, which keeps your form data and downstream lists clean.
The workflow begins at the moment a submission lands in JotForm. Next, it normalizes the data and asks Google Gemini to classify intent and quality. Finally, a router sends the right action: notify Telegram and flag the submission, do nothing, or delete spam via the JotForm API.
What Changes: Before vs. After
| What This Eliminates | Impact You’ll See |
|---|---|
|
|
Real-World Impact
Say your site gets about 25 JotForm submissions a week. If you spend only 4 minutes opening, reading, and deciding what to do with each one, that’s roughly 100 minutes of pure triage. With this automation, the “decision” happens automatically and hot leads go to Telegram instantly, while spam is deleted. You still answer the best ones, but you stop wasting about 1–2 hours a week just sorting.
Requirements
- n8n instance (try n8n Cloud free)
- Self-hosting option if you prefer (Hostinger works well)
- JotForm to capture new contact form submissions.
- Telegram to receive hot lead notifications.
- Google Gemini API key (get it from Google AI Studio).
Skill level: Beginner. You’ll connect accounts, paste a few API keys, and test with sample submissions.
Need help implementing this? Talk to an automation expert (free 15-minute consultation).
The Workflow Flow
A new JotForm submission comes in. The workflow starts from the JotForm trigger the moment someone hits submit on your contact form.
The submission gets cleaned up for AI. n8n maps the raw form fields into a structured, readable format, so the classifier isn’t guessing which text matters.
Gemini classifies the lead. The AI agent reviews the message and assigns a category (hot, cold, or spam) based on intent and quality, then passes that classification forward.
Routing happens automatically. A switch sends hot leads to Telegram and then flags the original submission in JotForm via an HTTP request. Cold leads hit a “do nothing” node, while spam gets deleted from JotForm using the API.
You can easily modify the classification rules and notification format to match your offer, your service area, or even how strict you want “hot” to be. See the full implementation guide below for customization options.
Step-by-Step Implementation Guide
Step 1: Configure the JotForm Trigger
This workflow starts when a new submission arrives in JotForm, so configure the trigger first.
- Add and open JotForm Submission Trigger.
- Set Form to
252791935306463. - Set Only Answers to
falseto capture full payload data. - Credential Required: Connect your JotForm credentials (this node needs authentication even though none is configured yet).
Step 2: Connect and Map Incoming Data
Map the incoming submission data into a clean structure for the AI classifier.
- Open Map Classification Data.
- Add an assignment for submissionID with value
{{ $json.submissionID }}. - Add an assignment for Form_Data with value
{{ $json.rawRequest }}. - Verify that Map Classification Data is connected from JotForm Submission Trigger.
Step 3: Set Up the AI Lead Classifier
Use Gemini and the structured output parser to classify the lead as hot, cold, or spam.
- Open Evaluate Lead Quality and set Text to
contact us submission data :- {{ $json.Form_Data.toJsonString() }}. - Ensure Prompt Type is
defineand Has Output Parser is enabled. - Open Gemini Chat Engine and connect your Google Gemini credentials to enable the language model.
- Open Formatted Output Parser and confirm the schema matches:
{ "lead_classification": 1, "conclusion": "Brief explanation of why this is classified as hot/cold lead" }. - Make sure Gemini Chat Engine is linked to Evaluate Lead Quality as the language model.
Step 4: Configure Routing and Actions
The workflow routes by classification and triggers the appropriate action.
- Open Lead Type Router and confirm it evaluates
{{ $json.output.lead_classification }}with rules for0,1, and2. - Connect the cold lead route (value
0) to Skip Cold Prospect for a no-op outcome. - Connect the hot lead route (value
1) to Alert Hot Prospect. - In Alert Hot Prospect, set Chat ID to
[YOUR_ID]and keep the Text field as the provided expression. - Credential Required: Connect your Telegram credentials for Alert Hot Prospect.
- Connect the spam route (value
2) to Remove Spam Entry. - In Remove Spam Entry, set URL to
https://api.jotform.com/submission/{{ $('JotForm Submission Trigger').item.json.submissionID }}and keep Method asDELETE.
[CONFIGURE_YOUR_API_KEY] with your JotForm API key in both Mark JotForm Submission and Remove Spam Entry.Step 5: Mark Hot Submissions and Set Up Utility Tools
After alerting for hot leads, flag the submission in JotForm and optionally configure the Telegram chat ID helper.
- Confirm the execution flow: Alert Hot Prospect → Mark JotForm Submission.
- In Mark JotForm Submission, set URL to
https://api.jotform.com/submission/{{ $('JotForm Submission Trigger').item.json.submissionID }}. - Set Method to
POSTand JSON Body to{ "flag": "1" }. - Verify Send Headers and Send Body are enabled.
- Open Utility: Telegram Chat ID Setup and use it to retrieve your chat ID by sending a message to your bot.
- Credential Required: Connect your Telegram credentials for Utility: Telegram Chat ID Setup if you use it.
Step 6: Test and Activate Your Workflow
Validate the full path from JotForm submission to classification and actions.
- Click Execute Workflow and submit a test entry to your JotForm.
- Confirm Evaluate Lead Quality outputs
lead_classificationandconclusionin JSON. - Check that Lead Type Router sends hot leads to Alert Hot Prospect, cold leads to Skip Cold Prospect, and spam to Remove Spam Entry.
- For hot leads, verify a Telegram message arrives and Mark JotForm Submission flags the submission.
- When satisfied, toggle the workflow to Active for production use.
Watch Out For
- JotForm credentials can expire or need specific permissions. If things break, check your JotForm API key status and form access first.
- If you’re using Wait nodes or external rendering, processing times vary. Bump up the wait duration if downstream nodes fail on empty responses.
- Default prompts in AI nodes are generic. Add your brand voice early or you’ll be editing outputs forever.
Common Questions
Usually about 30 minutes if your JotForm and Telegram accounts are ready.
Yes. You won’t write code, but you will paste API keys and test a few sample submissions to confirm routing.
Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in Google Gemini API usage, which is often cheap on the free tier and low-volume usage.
Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.
Start with the AI Agent that evaluates lead quality and change the system prompt to reflect what “qualified” means for you (budget, location, services, timeline, industry). You can also tweak the Switch routing so “cold” leads get logged to Google Sheets, or so hot leads create a CRM task before the Telegram alert. If your form fields differ, update the Set node that maps classification data so the AI sees the right context.
Most of the time it’s an API key issue. Regenerate your JotForm API key, then update the HTTP Request nodes that mark submissions and delete spam. Also confirm the form ID is correct and the key has permission to access that form; JotForm will reject requests silently if access is limited. If you suddenly process a lot of spam, rate limiting can show up too, so throttling or batching helps.
On n8n Cloud Starter, you can run a healthy volume of executions each month, and self-hosting removes the execution cap entirely (your server becomes the limit). In practice, each submission is one execution, so the math is simple. AI calls and Telegram messages are lightweight; the slowest part is usually the AI response time. If you’re getting hundreds of submissions a day, consider self-hosting and adding basic rate limiting.
Often, yes, especially when you want more control over routing and prompts. n8n handles branching logic cleanly, and you can self-host for unlimited runs, which matters once your forms get noisy. It’s also easier to mix “do nothing,” “notify,” and “delete via API” behaviors in one workflow without awkward workarounds. Zapier or Make can be faster for a very simple two-step alert. If you want help choosing, Talk to an automation expert.
You don’t need more notifications. You need better ones. Set this up once, and your form starts behaving like a real lead channel again.
Need Help Setting This Up?
Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.