Send Telegram Chat Action

Action ID: telegram_send_chat_action

Description

Send a chat action to a Telegram chat to indicate what the bot is doing. Chat actions show users that the bot is actively processing, typing, uploading, or performing some other action. This improves user experience by providing visual feedback during long operations.

Provider

Telegram

Connection

Name
Description
Required
Category

Telegram Bot Connection

The Telegram bot connection to use for sending the chat action.

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)

action

dropdown

-

Type of action to broadcast. Choose one, depending on what the user is about to receive: typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_voice or upload_voice for voice notes, upload_document for general files, choose_sticker for stickers, find_location for location data, record_video_note or upload_video_note for video notes.

business_connection_id

string

-

-

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

message_thread_id

integer

-

-

Unique identifier for the target message thread; for supergroups only

View JSON Schema
{
  "description": "Telegram send chat action 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)"
    },
    "action": {
      "title": "Action",
      "type": "string",
      "enum": [
        "typing",
        "upload_photo",
        "record_video",
        "upload_video",
        "record_voice",
        "upload_voice",
        "upload_document",
        "choose_sticker",
        "find_location",
        "record_video_note",
        "upload_video_note"
      ],
      "description": "Type of action to broadcast. Choose one, depending on what the user is about to receive: typing for text messages, upload_photo for photos, record_video or upload_video for videos, record_voice or upload_voice for voice notes, upload_document for general files, choose_sticker for stickers, find_location for location data, record_video_note or upload_video_note for video notes."
    },
    "business_connection_id": {
      "title": "Business Connection ID",
      "type": "string",
      "description": "Unique identifier of the business connection on behalf of which the action will be sent"
    },
    "message_thread_id": {
      "title": "Message Thread ID",
      "type": "integer",
      "description": "Unique identifier for the target message thread; for supergroups only"
    }
  },
  "required": [
    "chat_id",
    "action"
  ],
  "title": "TelegramSendChatActionInput",
  "type": "object"
}

Output Parameters

Name
Type
Description

success

boolean

Whether the chat action was sent successfully.

error

string

The error that occurred if the chat action was not sent successfully.

View JSON Schema
{
  "description": "Output from a Telegram send chat action.",
  "properties": {
    "success": {
      "title": "Success",
      "type": "boolean",
      "description": "Whether the chat action was sent successfully."
    },
    "error": {
      "title": "Error",
      "type": "string",
      "description": "The error that occurred if the chat action was not sent successfully."
    }
  },
  "required": [
    "success"
  ],
  "title": "TelegramSendChatActionOutput",
  "type": "object"
}

How It Works

This node sends a chat action indicator to notify users that the bot is performing a specific activity. Common actions include "typing" (shows typing indicator), "upload_photo" (shows uploading animation), "record_video" (shows recording indicator), and others. The action is displayed for a few seconds. Chat actions are especially useful for long operations where you want to show progress to the user before sending the actual content.

Usage Examples

Example 1: Show Typing Indicator

Input:

chat_id: "123456789"
action: "typing"

Output:

success: true

Example 2: Show Upload Photo Action

Input:

chat_id: "-1001234567890"
action: "upload_photo"

Output:

success: true

Example 3: Show Recording Video Action with Thread

Input:

chat_id: "-1001234567890"
action: "record_video"
message_thread_id: 42

Output:

success: true

Example 4: Show Find Location Action

Input:

chat_id: "@mychannel"
action: "find_location"

Output:

success: true

Example 5: Failed Chat Action

Input:

chat_id: "invalid_id"
action: "typing"

Output:

success: false
error: "Bad Request: chat not found"

Common Use Cases

  • Long Processing: Show "typing" while processing complex queries

  • File Upload: Show "upload_photo" or "upload_video" while generating media

  • Search Operations: Show "find_location" while searching for information

  • Document Generation: Show "upload_document" while creating files

  • Video Processing: Show "record_video" while encoding or processing videos

  • User Feedback: Provide visual feedback during any long operation

  • Better UX: Improve user experience by reducing perceived wait time

Supported Actions

Action
Meaning
Best Used When

typing

Bot is typing a message

Generating text responses

upload_photo

Bot is uploading a photo

Processing image requests

record_video

Bot is recording a video

Capturing or processing video

upload_video

Bot is uploading a video

Encoding or transferring video

record_voice

Bot is recording a voice message

Processing audio input

upload_voice

Bot is uploading a voice message

Sending audio files

upload_document

Bot is uploading a document

Creating or processing files

choose_sticker

Bot is choosing a sticker

Selecting from sticker library

find_location

Bot is finding a location

Searching maps or location data

record_video_note

Bot is recording a video note

Processing short videos

upload_video_note

Bot is uploading a video note

Sending short video files

Error Handling

Error Type
Cause
Solution

Invalid Chat ID

Chat ID doesn't exist or bot doesn't have access

Verify chat ID and ensure bot is member of chat

Invalid Action

Action value is not recognized

Use one of the supported action types

Authentication Error

Bot token is invalid or expired

Verify Telegram connection configuration

Permission Denied

Bot lacks permission to send actions

Check bot permissions in chat

User Blocked Bot

User has blocked the bot

User needs to unblock bot first

Chat Not Found

Chat has been deleted or is inaccessible

Verify chat still exists

Timeout Error

Request took too long to complete

Try again or check connection

Notes

  • Duration: Chat actions are displayed for approximately 5 seconds. If the operation takes longer, send the action again.

  • Timing: Send the action just before starting the operation so the indicator appears immediately.

  • Refresh: For long operations, resend the action every 3-5 seconds to keep the indicator visible.

  • Selection: Choose the action that best matches what the user will receive for consistency.

  • User Experience: Chat actions provide important feedback that reduces user frustration during waits.

  • Channel vs Private: Chat actions work in both private chats and groups/channels.

  • Message Threads: For supergroup topics/threads, use message_thread_id to show action in specific thread.

  • Quiet Operation: Chat actions are subtle indicators that don't generate notifications.

Last updated

Was this helpful?