Telegram and amoCRM integration: bot messages become deals

The Telegram and amoCRM integration in nana800 turns a message to your bot into a deal: one amoCRM block creates it, a second one adds the customer text as a note, and the bot replies that the request was received. You need a bot token from @BotFather, the amoCRM address and a long-lived integration token, no code. The message and the reply cost as much as a basic block, each amoCRM request twice as much.

Build it in the builder

What you can automate

  • Create a deal for every message to the bot, with the customer name and username in the title and the message in a note
  • Reply to the customer in Telegram right after the deal is saved, for example "Thank you, a manager will contact you soon"
  • Give a manager a call-back task: the tasks section links the task to the new deal
  • Create a deal together with a contact in one request with the leads/complex section
  • Skip empty deals: the free condition block ignores the /start command that arrives when someone presses Start

How to set it up

  1. 1

    Get a long-lived amoCRM token

    In amoCRM open amoMarket, create an external or private integration, go to its Keys tab, press Generate token and pick a lifetime from 1 day to 5 years. The token is shown only once, so save it. The integration ID, secret key and redirect link are not needed. Kommo accounts work too.

  2. 2

    Add the incoming message trigger

    Create a scheme, add the Telegram message from user to bot trigger and paste the bot token from @BotFather. Choose message as the event type, so deals are created only from messages.

  3. 3

    Create a deal with the amoCRM request block

    Add the amoCRM request block: the account address (for example mycompany.amocrm.ru or mycompany.kommo.com), the token, POST as the request type and leads as the section. In the JSON data write [{"name": "Telegram request"}] and add the sender name and username from the trigger to the title.

  4. 4

    Save the customer text as a note

    Add a second amoCRM request block with POST and the leads/notes section. In its JSON data set entity_id to the new deal ID (item.id from the previous block), note_type to common, and params.text to the message text from the trigger.

  5. 5

    Reply to the customer and test

    Add the Telegram message send block with chat_id from the trigger and a text like "Thank you, we got your request". To test, connect the button trigger, temporarily replace the trigger data with test values and put your own chat ID from @getmyid_bot, then turn the scheme on and press the button: the deal shows up in amoCRM.

  6. 6

    Filter out /start and keep the scheme on

    Pressing Start sends the bot a /start message, which would also create a deal. Put the free condition block after the trigger: if the text equals /start, the bot only says hello, otherwise it creates the deal. Put the trigger data back instead of the test values and keep the scheme on. While it is on, it costs $0.0042 per hour.

Pricing

A run of a Telegram block costs $0.001, a run of a amoCRM block costs $0.002. Every month the balance is topped up to $3.50 for free, an enabled scheme costs $0.0042 per hour.

Services in this connection

  • Telegram

    Build a Telegram bot without code: reply to messages, add buttons, send leads and alerts to a chat, group or channel. Free balance every month, no card needed.

  • amoCRM

    Automate amoCRM without code: website and Telegram leads become deals, and tasks and notes are added for you. Free balance every month, no card needed.

Frequently asked questions

One lead in this scheme is the trigger and the customer reply at the basic block price ($1 per 1,000 runs) plus two amoCRM requests at twice that price each. The condition block is free. An enabled scheme costs $0.0042 per hour, and your balance is topped up to $3.50 for free every month. A scheme kept on around the clock spends most of that on hours.

In amoMarket create an external or private integration, open its Keys tab and press Generate token. The token is long, usually starts with eyJ and is shown only once. You can revoke it on the tab with the issued accesses.

The text goes into the JSON as is, and straight quotes or line breaks break it: the block fails with Input data must be valid JSON. The reliable way is to build the deal or the note in the free run custom script block with a few lines of JavaScript and insert its result into the JSON data, which the block then inserts as valid JSON.

Only if the customer types it in the message. The trigger passes the name, username, text and files, and a phone number is not among them. Ask customers to include their phone in the request text.

Open the result of the amoCRM block. With a wrong token, an unpaid account or a data error, success is false and error_message holds the amoCRM answer that names the field it rejected.

Build your first scheme for free

Sign-up is free and needs no card. Every month the balance is topped up to $3.50 for free, enough for about 3,500 runs of basic blocks.

Build it in the builder