Webhooks & external services
How data flows in and out of your bot, and how to connect other services.
A common question: “Can my bot receive a webhook?” Here’s how dev>nulll connects to the outside world.
How the bot talks to Telegram
Your bot uses long-polling — it reaches out to Telegram to fetch updates. That means the bot makes outbound connections only and needs no public URL or inbound webhook of its own. This is why a bot can run on your laptop (while open) or 24/7 on the server with nothing to expose.
Connecting external services (outbound)
To integrate another service, your bot calls out to it:
- HTTP request — call any REST API: CRMs, sheets, payment checks, your own backend.
- Code (JS) — shape data and decide what to do with it.
Receiving events from the outside
There’s no per-bot inbound webhook endpoint. Instead, poll or push through Telegram:
- Have your bot periodically call your API (e.g. on
/status) with an HTTP request. - From your own server, send a message into Telegram (your backend → Telegram Bot API), and catch it with a Text or Command trigger.
Notifying a team / channel
Use Message to chat to push a composed alert to an admin group or channel — e.g. a new-lead notification — without leaving the flow.