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
Telegram Bot Connection
The Telegram bot connection to use for sending the chat action.
✓
telegram
Input Parameters
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
Output Parameters
success
boolean
Whether the chat action was sent successfully.
error
string
The error that occurred if the chat action was not sent successfully.
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: trueExample 2: Show Upload Photo Action
Input:
chat_id: "-1001234567890"
action: "upload_photo"Output:
success: trueExample 3: Show Recording Video Action with Thread
Input:
chat_id: "-1001234567890"
action: "record_video"
message_thread_id: 42Output:
success: trueExample 4: Show Find Location Action
Input:
chat_id: "@mychannel"
action: "find_location"Output:
success: trueExample 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
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
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?