Send Telegram Photo

Action ID: telegram_send_photo

Description

Send a photo or image to a Telegram chat or channel. This node allows you to deliver images with optional captions, formatting, and interactive elements to any Telegram user, group, or channel.

Provider

Telegram

Connection

Name
Description
Required
Category

Telegram Bot Connection

The Telegram bot connection to use for sending the photo.

telegram

Input Parameters

Name
Type
Required
Default
Description

chat_id

string

-

Unique identifier for the target chat or username of the target channel (in the format @channelusername)

photo

string

-

Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data.

business_connection_id

string

-

-

Unique identifier of the business connection on behalf of which the message will be sent

message_thread_id

integer

-

-

Unique identifier for the target message thread (topic) of the forum; for forum supergroups only

caption

string

-

-

Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing

parse_mode

string

-

-

Mode for parsing entities in the photo caption. Can be 'Markdown', 'MarkdownV2', or 'HTML'

caption_entities

array

-

-

A JSON-serialized list of special entities that appear in the caption

show_caption_above_media

boolean

-

-

Pass True, if the caption must be shown above the message media

has_spoiler

boolean

-

-

Pass True if the photo needs to be covered with a spoiler animation

disable_notification

boolean

-

-

Sends the message silently. Users will receive a notification with no sound

protect_content

boolean

-

-

Protects the contents of the sent message from forwarding and saving

allow_paid_broadcast

boolean

-

-

Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee

message_effect_id

string

-

-

Unique identifier of the message effect to be added to the message; for private chats only

reply_parameters

object

-

-

Description of the message to reply to

reply_markup

object

-

-

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, etc.

View JSON Schema
{
  "description": "Telegram send photo node input.",
  "properties": {
    "chat_id": {
      "title": "Chat ID",
      "type": "string",
      "description": "Unique identifier for the target chat or username of the target channel (in the format @channelusername)"
    },
    "photo": {
      "title": "Photo",
      "type": "string",
      "description": "Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data."
    },
    "business_connection_id": {
      "title": "Business Connection ID",
      "type": "string",
      "description": "Unique identifier of the business connection on behalf of which the message will be sent"
    },
    "message_thread_id": {
      "title": "Message Thread ID",
      "type": "integer",
      "description": "Unique identifier for the target message thread (topic) of the forum; for forum supergroups only"
    },
    "caption": {
      "title": "Caption",
      "type": "string",
      "description": "Photo caption (may also be used when resending photos by file_id), 0-1024 characters after entities parsing"
    },
    "parse_mode": {
      "title": "Parse Mode",
      "type": "string",
      "description": "Mode for parsing entities in the photo caption. Can be 'Markdown', 'MarkdownV2', or 'HTML'"
    },
    "caption_entities": {
      "title": "Caption Entities",
      "type": "array",
      "description": "A JSON-serialized list of special entities that appear in the caption"
    },
    "show_caption_above_media": {
      "title": "Show Caption Above Media",
      "type": "boolean",
      "description": "Pass True, if the caption must be shown above the message media"
    },
    "has_spoiler": {
      "title": "Has Spoiler",
      "type": "boolean",
      "description": "Pass True if the photo needs to be covered with a spoiler animation"
    },
    "disable_notification": {
      "title": "Disable Notification",
      "type": "boolean",
      "description": "Sends the message silently. Users will receive a notification with no sound"
    },
    "protect_content": {
      "title": "Protect Content",
      "type": "boolean",
      "description": "Protects the contents of the sent message from forwarding and saving"
    },
    "allow_paid_broadcast": {
      "title": "Allow Paid Broadcast",
      "type": "boolean",
      "description": "Pass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee"
    },
    "message_effect_id": {
      "title": "Message Effect ID",
      "type": "string",
      "description": "Unique identifier of the message effect to be added to the message; for private chats only"
    },
    "reply_parameters": {
      "title": "Reply Parameters",
      "type": "object",
      "description": "Description of the message to reply to"
    },
    "reply_markup": {
      "title": "Reply Markup",
      "type": "object",
      "description": "Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, etc."
    }
  },
  "required": [
    "chat_id",
    "photo"
  ],
  "title": "TelegramSendPhotoInput",
  "type": "object"
}

Output Parameters

Name
Type
Description

sent_message

object

The message that was sent (if successful)

success

boolean

Whether the photo was sent successfully

error

string

The error that occurred if the photo was not sent successfully

View JSON Schema
{
  "description": "Telegram send photo node output.",
  "properties": {
    "sent_message": {
      "title": "Sent Message if successful",
      "type": "object",
      "description": "The message that was sent."
    },
    "success": {
      "title": "Success",
      "type": "boolean",
      "description": "Whether the photo was sent successfully."
    },
    "error": {
      "title": "Error",
      "type": "string",
      "description": "The error that occurred if the photo was not sent successfully."
    }
  },
  "required": [
    "success"
  ],
  "title": "TelegramSendPhotoOutput",
  "type": "object"
}

How It Works

This node sends a photo to a specified Telegram chat or channel. You can provide the photo as a file_id (to reuse existing files), an HTTP URL (for Telegram to download), or upload new media. The node supports optional captions, formatting, and interactive elements, then returns the sent message and success status.

Usage Examples

Example 1: Send Photo with Caption

Input:

chat_id: "123456789"
photo: "https://example.com/photo.jpg"
caption: "Check out this beautiful sunset!"
parse_mode: "HTML"

Output:

success: true
sent_message: {
  "message_id": 12345,
  "chat": {"id": 123456789},
  "date": 1699564800,
  "photo": [{"width": 1024, "height": 768}],
  "caption": "Check out this beautiful sunset!"
}

Example 2: Reuse Photo File ID

Input:

chat_id: "@my_channel"
photo: "AgADBAADJL5kABC1234567890ABCDEF"
caption: "Previously shared photo"

Output:

success: true
sent_message: {
  "message_id": 12346,
  "chat": {"id": -1001234567890},
  "date": 1699564801,
  "photo": [{"file_id": "AgADBAADJL5kABC1234567890ABCDEF"}],
  "caption": "Previously shared photo"
}

Example 3: Photo with Spoiler

Input:

chat_id: "987654321"
photo: "https://example.com/spoiler.jpg"
caption: "Spoiler warning!"
has_spoiler: true

Output:

success: true
sent_message: {
  "message_id": 12347,
  "chat": {"id": 987654321},
  "date": 1699564802,
  "photo": [{"has_spoiler": true}],
  "caption": "Spoiler warning!"
}

Common Use Cases

  • Image Sharing: Share charts, graphs, or screenshots generated by your workflow

  • Report Distribution: Send visual reports or data visualizations to teams

  • Product Showcases: Share product images or promotional content

  • Documentation: Send instructional or reference images to users

  • Social Media Publishing: Automatically post images to Telegram channels

  • Media Alerts: Send time-sensitive image alerts or notifications

  • Content Curation: Share curated images or memes with your audience

Error Handling

Error Type
Cause
Solution

Invalid Chat ID

The chat_id doesn't exist or bot doesn't have access

Verify the chat_id is correct and the bot has been added to the chat

Invalid Photo URL

Photo URL is broken or unreachable

Check the URL is valid and publicly accessible

File Not Found

File ID doesn't exist or has expired

Use a valid file_id or provide a fresh URL

File Too Large

Photo exceeds size limits

Compress the photo before sending

Bot Lacks Permission

Bot cannot send photos in this chat

Verify bot has media sending permissions

Caption Too Long

Caption exceeds 1024 characters

Shorten the caption text

Notes

  • File IDs: Telegram provides file_id values for previously sent files. Reusing file_ids is faster and saves bandwidth.

  • URL Photos: When using HTTP URLs, Telegram will download the image, so the URL must remain valid during transmission.

  • Caption Length: Captions are limited to 1024 characters after entity parsing.

  • Photo Quality: Telegram will automatically optimize photos for different devices and connection speeds.

  • Spoiler Animation: The spoiler animation is useful for content warnings or preview images.

  • Reply Markup: Use reply_markup to add interactive buttons or keyboards below photo messages.

Last updated

Was this helpful?