CRM Bot
A CRM bot automatically creates contacts and deals in Bitrix24 or AmoCRM when a customer reaches out via Telegram. Managers receive leads without manual data entry.
Scenario
Customer messages bot → bot collects data → creates lead in CRM → notifies manager
Building It
1. Prepare the Project
Create a project with a Telegram trigger.
2. Collect Customer Data
Use a multi-step dialog:
Step 1: Ask for name
Hello! What's your name?
register_next_step → 2
Step 2: Save name and ask for phone
add_var: client_name = {=message=}
send_message: Your phone number?
register_next_step → 3
Step 3: Save phone and create lead
add_var: client_phone = {=message=}
3. Send Data to CRM
Add a CRM block with Bitrix24 type:
url: https://your-portal.bitrix24.ru/rest/crm.lead.add
method: POST
body: {
"fields": {
"TITLE": "Telegram Lead",
"NAME": "{=client_name=}",
"PHONE": [{"VALUE": "{=client_phone=}"}],
"SOURCE_ID": "TELEGRAM"
}
}
save_as: crm_result
4. Confirm to Customer
Thank you, {=client_name=}! Your request has been received. A manager will contact you shortly.
Use Cases
- Collecting leads from Telegram and WhatsApp
- Automatic contact creation in CRM
- Updating deal statuses via triggers
- Manager notifications about new requests