Custom Telegram Bot
Two-way messaging through your own Telegram bot connection.
Setup
- Create your Telegram bot
- Connect the required Telegram credential in AgentPMT
- Send
/startto your bot in Telegram - Use
get_updatesto read inbound messages and reply
Actions
send_message
Required: chat_id, text
send_photo
Required: chat_id
Provide one of:
photo(URL, Telegram file_id, or base64)photo_file_id(AgentPMT File Manager file_id)
send_document
Required: chat_id
Provide one of:
document(URL, Telegram file_id, or base64)document_file_id(AgentPMT File Manager file_id)
If using base64 document, filename is required.
get_updates
Optional:
offset,limit(1-100),timeout(0-60),allowed_updatesunread_only,cursor_offset,mark_as_readingest_files_to_manager,ingest_max_files,ingest_expiration_days
list_known_chat_ids
Returns chat IDs seen by this BYO bot within this budget scope.
Use get_updates first to discover chats.
File Manager Flows
- Send from File Manager: use
photo_file_idordocument_file_id - Save inbound Telegram media: set
ingest_files_to_manager: trueonget_updates - Ingested uploads are returned in
ingested_fileswith new File Managerfile_idvalues
Shared Optional Params (send actions)
parse_mode, caption, reply_markup, disable_notification, protect_content, message_thread_id






