Bitrix24 notifications in Telegram: leads, deals and tasks

Bitrix24 notifications in Telegram take no code in nana800: an outbound webhook of Bitrix24 tells the scheme about a new lead or deal, the Bitrix24 block reads the record by ID, and the bot sends it to Telegram. You need a bot from @BotFather and two Bitrix24 webhooks, with no server of your own. One notification is two runs at the basic block price plus a Bitrix24 request at twice that price.

Build it in the builder

What you can automate

  • Post every new lead to a team group: title, name, phone and amount
  • Report new deals with their amount and stage, with a button that opens the deal card in Bitrix24
  • Get new tasks in Telegram: the task creation event and the get_task operation of the Bitrix24 block
  • Watch deals by stage: the free condition block lets only the stage you need through, for example WON
  • Drop requests that did not come from your portal: the condition block checks the auth code Bitrix24 sends with every event

How to set it up

  1. 1

    Create an inbound webhook to read records

    An inbound webhook is a secret address through which nana800 reads your portal data. In Bitrix24 open Developer resources, Other, Inbound webhook. Tick the CRM permission (and Tasks if you need tasks), save and copy the address. The Bitrix24 block reads leads and deals through it. The address is secret, and nana800 hides it in logs and scheme exports.

  2. 2

    Add the webhook trigger to a scheme

    Create a scheme and add the webhook trigger with the POST method and a path such as /b24. Turn the scheme on: a disabled scheme answers webhooks with an error. Press the API button in the builder and copy the webhook address.

  3. 3

    Create an outbound webhook

    In Bitrix24, again in Developer resources and Other, choose Outbound webhook. Paste the nana800 address as the handler address and pick an event, for example a new lead or a new deal. Save the auth code from the webhook settings: Bitrix24 sends it with every event.

  4. 4

    Read the record with the Bitrix24 block

    Bitrix24 sends only the event and the record ID: for leads and deals these are event and data.FIELDS.ID in the trigger body. Add the Bitrix24 block, the get_lead operation (get_deal for deals), the inbound webhook address and the ID from the trigger. The record comes in record: TITLE, NAME, PHONE list and OPPORTUNITY amount.

  5. 5

    Send the message to Telegram

    Add the Telegram message send block: bot token, a chat ID from @getmyid_bot or the ID of a group the bot was added to. Put the record fields into the text and pick the plain_text format. A button built from the portal address (auth.domain in the trigger), /crm/lead/details/ and the ID opens the lead in Bitrix24.

  6. 6

    Test it with a test lead

    Create a test lead and open the run history of the scheme: it shows what Bitrix24 sent and what every block returned. Keep the scheme on, otherwise events are not processed. While it is on, it costs $0.0042 per hour.

Pricing

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

Services in this connection

  • Bitrix24

    Connect Bitrix24 without code: website leads become CRM leads and deals, and tasks are assigned to your team for you. Free balance every month, no card needed.

  • 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.

Frequently asked questions

One notification is a webhook trigger run and a Telegram send at the basic block price ($1 per 1,000 runs) plus a Bitrix24 block request at twice that price. The condition block is free. A webhook scheme stays on all the time, which is $0.0042 per hour. Your balance is topped up to $3.50 for free every month, and most of it goes to scheme hours.

The outbound webhook tells nana800 about the event by itself, but it sends only the record ID. The inbound webhook lets the Bitrix24 block read the lead or deal by that ID. If a short message like "lead 123 created" is enough, you can skip the block and the inbound webhook.

Pick the deal update event in the outbound webhook: it arrives on any change. Read the deal with get_deal and compare its STAGE_ID in the condition block, for example with WON. In other pipelines stages have a prefix, such as C1:WON. If the deal is changed again while in that stage, the message comes again.

With every event Bitrix24 sends the auth code of the outbound webhook, in the trigger data it is auth.application_token. Put the free condition block after the trigger and compare it with the code from the webhook settings: a request with another code never reaches the Telegram send.

Check that the scheme is on and the trigger uses POST. If the run history has the run, open the Bitrix24 block result: the insufficient_scope error means the inbound webhook has no CRM or Tasks permission. The Telegram block result shows the Telegram error, for example when the bot is not in the group.

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