# 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                                                                                                                                                                                                                                                                                                                                   |

<details>

<summary>View JSON Schema</summary>

```json
{
  "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"
}
```

</details>

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

<details>

<summary>View JSON Schema</summary>

```json
{
  "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"
}
```

</details>

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.agenticflow.ai/reference/nodes/telegram_send_chat_action.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
