A Blue Prism Release Package containing an example Visual Business Object (VBO) and Process to demonstrate sending messages to a Telegram Channel using the Telegram BOT Api from Blue Prism.
This repository is a companion to the LinkedIn article: https://www.linkedin.com/pulse/sending-messages-telegram-channel-using-blue-prism-christian-pacella
The Release Package was created with Blue Prism 6.4.
In order to send messages to Telegram from Blue Prism, the following steps must first be completed:
- Download and install Telegram on your preferred device
- Create a Telegram public channel
- Create a Telegram BOT via BotFather
- Obtain your BOT Api Key
- Set the bot as administrator in your channel
- Obtain your channel Chat Id
Obtaining your channel Chat Id can be tricky, but the following article was useful: https://tutorials.botsfloor.com/creating-a-bot-using-the-telegram-bot-api-5d3caed3266d
If you completed the steps above, you can now send a message to your channel by issuing an HTTP GET request to the Telegram BOT API at the following URL:
where:
- BOT_API_KEY is the API Key generated by BotFather when you created your bot
- MY_CHANNEL_CHAT_ID is the Chat Id of your channel
- MY_MESSAGE_TEXT is the message you want to send (URL-encoded)
If you are able to send a test message to your Telegram channel, you are ready to continue with the Blue Prism implementation.
Download the Example Blue Prism Package
- Launch Blue Prism
- Click File -> Import
- Select the 'ShmoopySoftBluePrismTelegramMessageExample.bprelease' Release Package
- Follow the Blue Prism import wizard to install the package
- In Process Studio, open the process named 'Telegram Process'
- Edit the 'vBotAPIKey' and 'vChannelChatId' data items with your BOT Api Key and Channel Chat Id
- Edit the 'vMessageText' data item to set the message text you want to send
- Click the Run button, or press F5
This project is licensed under the MIT License - see the LICENSE.md file for details
- https://tutorials.botsfloor.com/creating-a-bot-using-the-telegram-bot-api-5d3caed3266d
- https://programmingistheway.wordpress.com/2015/12/03/send-telegram-messages-from-c/
- https://medium.com/@xabaras/sending-a-message-to-a-telegram-channel-the-easy-way-eb0a0b32968
- https://stackoverflow.com/questions/31271355/how-to-use-telegram-api-in-c-sharp-to-send-a-message