Telegram Source
Provided by: "Apache Software Foundation"
Support Level for this Kamelet is: "Stable"
Receive all messages that people send to your Telegram bot.
Dependencies
At runtime, the telegram-source
Kamelet relies upon the presence of the following dependencies:
-
camel:jackson
-
camel:kamelet
-
camel:telegram
-
camel:core
Camel JBang usage
Prerequisites
-
You’ve installed JBang.
-
You have executed the following command:
jbang app install camel@apache/camel
Supposing you have a file named route.yaml with this content:
- route:
from:
uri: "kamelet:telegram-source"
parameters:
.
.
.
steps:
- to:
uri: "kamelet:log-sink"
You can now run it directly through the following command
camel run route.yaml
Telegram Source Kamelet Description
Authentication
This Kamelet requires a Telegram Bot token for authentication. You need to create a Telegram bot through @BotFather and obtain the bot token.
Configuration
The Telegram Source Kamelet supports the following configurations:
-
Authorization Token: Telegram bot token (required)
-
Chat ID: Telegram chat ID to monitor (optional, can monitor all chats if not specified)
Output Format
The Kamelet outputs Telegram messages as JSON objects containing message content, sender information, chat details, and timestamp.
Bot Setup
-
Contact @BotFather on Telegram
-
Create a new bot with /newbot command
-
Follow the instructions to set bot name and username
-
Copy the provided bot token
-
Add the bot to your chat or channel
Usage Example
- route:
from:
uri: "kamelet:telegram-source"
parameters:
authorizationToken: "your-bot-token-here"
steps:
- to:
uri: "kamelet:log-sink"