Telegram Send Photo

A guide to the Telegram Send Photo action for sending images to a Telegram chat.

The Telegram Send Photo Action allows you to send photos to a specified Telegram chat or channel. This is perfect for sharing images, visual updates, or other graphic content.

Connection Setup

You will need a Telegram Bot and its API token.

  1. Create a new bot by talking to the BotFather on Telegram.

  2. The BotFather will provide you with an API token.

  3. In AgenticFlow, navigate to Settings > Connections and add a new Telegram Bot Connection, providing your API token.

Configuration

Input Parameters

Parameter
Type
Description

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).

Photo

Text

The photo 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 photo (0-1024 characters).

Parse Mode

Select

Choose how to parse entities in the caption. Options are Markdown, MarkdownV2, or HTML.

Has Spoiler

Boolean

If true, the photo will be covered with a spoiler animation.

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

Parameter
Type
Description

message

Object

An object containing the details of the sent message, including message_id.

Example: Sending an Image from a URL

This example demonstrates how to send a photo from a URL to a Telegram chat.

  1. Get the Image URL: Use a Web Scraping Action or a Code Action to get the URL of an image.

  2. Configure the Telegram Send Photo Action:

    • Connection: Select your Telegram Bot connection.

    • Chat ID: 123456789 (example user chat ID)

    • Photo: {{web_scraping_action.image_url}}

    • Caption: Check out this cool image I found!

    • Has Spoiler: false

This workflow makes it easy to share images from the web directly to a Telegram chat.

Last updated

Was this helpful?