Send Telegram messages via REST API
Recipe ToolsDeveloper ToolMarketingAPI Integration
What it does
When someone calls this automation through a function, it prepares the message payload and signature. The automation logs each step, sends the request to Telegram via REST, and returns the result to the caller.
Who it's for
Engineering teams who need to integrate Telegram notifications into their workflows without building custom code.
How teams use this
Notify teams of critical alerts
Call this function when a system alert fires so the team gets a Telegram notification in real time. The message includes the alert details and severity level.
Send alerts to a security channel
Route security events to a dedicated Telegram group by calling this function with the event payload. The same logic applies, only the recipient changes.
Include rich formatting in messages
Extend the Ruby code to add markdown formatting, buttons, or inline keyboards to the Telegram message sent via REST. The function signature and REST call remain the same.
How it works
- Receive the function call. Someone calls this automation as a function with the message details needed to send to Telegram.
- Build the message and signature. Create variables for the message body, timestamp, and login credentials, then execute Ruby code to generate the authentication signature in Workato Custom Code.
- Send the REST request. Send the prepared request to Telegram via REST with the message payload and signature included in the headers so the message reaches Telegram.
- Return the result. Send the response back to the caller so they know whether the Telegram message was sent successfully.