Tutorial: Lead Generation Bot
Build a bot that collects user information for marketing or sales purposes.
What We're Building
A bot that:
- Greets new users
- Asks for their name, email, and phone
- Stores the information
- Thanks them and follows up
Step 1: Welcome Trigger
Create the starting point:
- Add a Command Trigger
- Set command to
/start - Add a Send Message node
- Connect them
Message:
👋 Welcome to [Your Company]!
I'll help you get started. First, I'll need a few details.
Step 2: Collect Name
- Add an Ask Question node
- Connect it to the welcome message
- Configure:
- Question:
What's your name? - Save to:
var.lead_name
- Question:
Step 3: Collect Email
- Add another Ask Question node
- Connect it after the name question
- Configure:
- Question:
Great, {{var.lead_name}}! What's your email address? - Save to:
var.lead_email
- Question:
Validation
For production, add email validation using a regex pattern!
Step 4: Collect Phone (Optional)
- Add an Ask Question node
- Configure:
- Question:
And your phone number? (or type "skip") - Save to:
var.lead_phone
- Question:
Step 5: Thank and Confirm
- Add a Send Message node
- Configure:
✅ Thanks, {{var.lead_name}}!
Here's what we have:
📧 Email: {{var.lead_email}}
📞 Phone: {{var.lead_phone}}
Our team will contact you within 24 hours.
Step 6: Mark as Lead
- Add a Set Variable node
- Set
var.is_leadtotrue - Set
var.lead_dateto{{date("2006-01-02")}}
This helps you track and segment users later.
Complete Flow
Enhancements
Add a Lead Magnet
Offer something in return:
🎁 As a thank you, here's our free guide!
[📥 Download Guide](https://your-link.com)
Admin Notification
Add a Forward Message or Send Message node to notify admins:
🔔 New Lead!
Name: {{var.lead_name}}
Email: {{var.lead_email}}
Phone: {{var.lead_phone}}
Follow-up Reminder
Use a Delay node to schedule a follow-up:
Tips
Quick Wins
- Use emojis to make messages friendly
- Keep questions short and focused
- Offer to skip optional fields
- Confirm what you collected
Next Steps
- Support Router → — Route inquiries
- Quiz Bot → — Engage users