Skip to content

Trigger Receive Telegram

The telegramReceive module is a trigger that initiates the workflow when a message is received on a Telegram bot. It processes multiple content types: text, commands, photos, voice, documents, audio, video, location, contacts, stickers, polls, venues, and callback queries (inline buttons). For each content type, it extracts the relevant information and structures it uniformly with type, chatId, content, from, chat, and metadata fields. It also detects forwarded messages, replies, and text entities.

For the bot to receive messages you need two things: the bot token and a webhook registered with Telegram pointing to Floogos.

  1. Create the bot in Telegram. Open a chat with @BotFather, send /newbot, choose a name and a username. When done, BotFather gives you the token (format 123456:ABC-DEF...). Save it.

  2. Paste the token into the node. In the Trigger Receive Telegram node, fill the Bot token field with that token.

  3. Generate the webhook URL. In the same node, generate the Webhook URL: Floogos creates the public endpoint that will receive Telegram updates.

  4. Register the webhook with Telegram. Once, tell Telegram to send messages to that URL. Paste this in your browser (or use curl), replacing <TOKEN> and <WEBHOOK_URL>:

    https://api.telegram.org/bot<TOKEN>/setWebhook?url=<WEBHOOK_URL>

    Expected response: {"ok":true,"result":true,"description":"Webhook was set"}.

  5. Verify. Check https://api.telegram.org/bot<TOKEN>/getWebhookInfo: it should show your url. Message the bot from Telegram — the workflow fires.

  6. Activate the workflow. Set it to Active so it keeps listening.

To reply to the user who wrote, add a Telegram node afterwards and use {{data.chatId}} as the destination (the trigger leaves the chatId in its output).

ParameterTypeRequiredDescription
tokentextYesTelegram bot token (botToken). Obtained from BotFather.
url_webhookwebhook_generatorNoAutomatically generated webhook URL to receive Telegram updates.
{
"nextModule": "siguiente_modulo",
"data": {
"type": "text",
"chatId": 123456789,
"from": { "id": 123456789, "first_name": "Juan", "language_code": "es" },
"botToken": "123456:ABCdefGHIjklMNO",
"date": "2026-03-23T10:00:00.000Z",
"content": "Hola, necesito ayuda",
"chat": { "id": 123456789, "type": "private", "first_name": "Juan" },
"metadata": {
"message_id": 42,
"update_id": 987654321,
"is_edited": false
}
}
}
{
"label": "Trigger Receive Telegram",
"token": "123456789:ABCdefGHIjklMNOpqrSTUvwxYZ",
"url_webhook": {}
}

Telegram Bot API - Webhook updates. The webhook URL is registered at https://api.telegram.org/bot{token}/setWebhook.

  • Supported message types: text, command, photo, voice, document, audio, video, location, venue, contact, sticker, poll, callback_query.
  • For commands (messages starting with /), the type is set to command and the command and its parameters are extracted in metadata.command and metadata.command_params.
  • For photos, the highest resolution version is automatically selected.
  • The content field contains the main content depending on the type: message text, file_id for files, coordinates for locations, etc.
  • The botToken is included in the output so that subsequent nodes can send responses to the user.
  • Supports callback queries (inline buttons), returning the callback_query_id in metadata to confirm the interaction.
  • Forwarded message, reply, and entity metadata is automatically added when present.
  • telegramVoiceToText (Telegram audio transcription)
  • Webhook (generic trigger)
  • decision (to evaluate message type)