Skip to content

🎯 Lead Generation Action

The Lead Generation Action allows your AI Agent to collect customer information such as names, phone numbers, emails, project requirements, and other details.

Collected leads can be sent to:

  • Telegram
  • Google Sheets

This is useful for service businesses, agencies, clinics, consultants, and any company that wants to automatically capture potential customers.


📍 Creating a Lead Generation Action

Navigate to:

AI Agents → Select AI Agent → AI Actions → Create Action → Lead Generation

Step 1: Create the Action

Fill in the basic information:

FieldDescription
Action NameInternal name for your lead generation action
When To UseInstructions for AI explaining when this action should be triggered

Example:

  • Action Name: Web Development Lead
  • When To Use: Use this action when a customer wants to order website development services.

Create Lead Generation Action


📥 Step 2: Select Lead Destination

Choose where collected lead information should be delivered.

Available destinations:

Telegram

Send collected leads directly to a Telegram chat.

Required fields:

FieldDescription
Telegram Bot TokenYour Telegram bot token
Telegram Chat IDChat ID where leads will be sent

Telegram Destination

Google Sheets

Store leads automatically inside a Google Spreadsheet.

To use Google Sheets:

  1. Click Connect
  2. Authorize your Google account
  3. Select an existing spreadsheet using Google Picker

Google Sheets Destination


🧩 Step 3: Configure Variables

Open the Variables tab.

Variables define what information the AI should collect from customers.

Examples:

VariableDescription
fullnameCustomer full name
phone_numberCustomer phone number
emailCustomer email address
company_nameCompany name
project_detailsProject requirements

You can mark variables as Required.

The AI will continue asking questions until all required fields are collected.

Variables Configuration


⚙️ System Variables

Ainisa automatically provides several built-in variables.

Example:

VariableDescription
source_channelSource of the conversation (Website, Telegram, WhatsApp, Instagram, etc.)

These variables do not need to be collected from the user manually.


💬 Step 4: Configure Telegram Message Template

If Telegram is selected as the lead destination, open the Message Template tab.

This template defines the message that will be sent to Telegram after the AI collects lead information.

You can insert variables into the template.

Example:

text
A new lead has been received.

Full Name: {{fullname}}
Phone Number: {{phone_number}}
Source Channel: {{source_channel}}

The AI will automatically replace variables with collected values.

Message Template


📊 Google Sheets Mapping

If Google Sheets is selected as the destination, collected data will be added directly to the connected spreadsheet.

You can map variables to spreadsheet columns.

Example:

Spreadsheet ColumnVariable
Afullname
Bphone_number
Cemail
Dsource_channel

Google Sheets Mapping


💡 Example Workflow

  1. Customer visits your website
  2. Customer asks for a service
  3. AI detects that a lead should be created
  4. AI collects required information
  5. Lead is sent to Telegram or Google Sheets
  6. Your team receives the lead instantly

Example collected information:

  • Full Name
  • Phone Number
  • Service Needed
  • Budget
  • Source Channel

✅ Notes

  • Multiple Lead Generation Actions can be created for a single AI Agent.
  • Variables marked as required must be collected before submission.
  • Telegram destination requires a valid Bot Token and Chat ID.
  • Google Sheets destination requires Google account authorization.
  • System variables are automatically populated by Ainisa.