Telegram Send Document
A guide to the Telegram Send Document action for sending files to a Telegram chat.
The Telegram Send Document Action allows you to send documents to a specified Telegram chat or channel. This is useful for automating reports, sharing files, or integrating document delivery into your workflows.
Connection Setup
You will need a Telegram Bot and its API token.
Create a new bot by talking to the BotFather on Telegram.
The BotFather will provide you with an API token.
In AgenticFlow, navigate to Settings > Connections and add a new Telegram Bot Connection, providing your API token.
Configuration
Input Parameters
Connection
Connection
Select the Telegram Bot connection you created.
Chat ID
Text
The unique identifier for the target chat or channel (e.g., @channelusername
or a chat ID).
Document
Text
The file to send. You can provide a file path, an HTTP URL, or a file ID from Telegram's servers.
Caption
Text
An optional caption for the document (0-1024 characters).
Parse Mode
Select
Choose how to parse entities in the caption. Options are Markdown
, MarkdownV2
, or HTML
.
Disable Notification
Boolean
If true
, the message will be sent silently.
Protect Content
Boolean
If true
, the content of the sent message will be protected from forwarding and saving.
Output Parameters
message
Object
An object containing the details of the sent message, including message_id
.
Example: Sending a Daily Report
This example demonstrates how to automatically send a generated PDF report to a Telegram channel every day.
Generate the Report: Use an action like Puppeteer to generate a PDF from a webpage or a Code Action to create a report and save it as a file.
Configure the Telegram Send Document Action:
Connection: Select your Telegram Bot connection.
Chat ID:
@my_reports_channel
Document:
{{puppeteer_action.file_path}}
Caption:
Here is the daily sales report for {{TODAY}}.
Disable Notification:
false
This workflow automates the distribution of a daily report, ensuring stakeholders receive it promptly in their Telegram channel.
Last updated
Was this helpful?