Actions17
Send Animation
AI-generatedSummary
Sends an animated GIF or other animation file to a specified Telegram chat via the Grammy API.
Inputs
- botToken (required) — Bot token (from input or credentials).
- chatId (required) — Target Telegram chat ID.
- mediaSource — Source of the animation: 'url' (URL or file_id) or 'binary' (n8n Binary Data).
- media — URL or Telegram file_id (when mediaSource is 'url').
- binaryPropertyName — Name of the binary property containing the animation data (when mediaSource is 'binary').
- caption — Optional text caption for the animation.
- captionEntities — Optional array of formatting entities for the caption.
- hasSpoiler — Whether the animation should be marked as a spoiler.
- replyToMessageId — ID of the message to reply to.
- replyMarkup — Optional reply markup (inline or reply keyboard) as JSON.
- useRateLimit — If true, enables Redis-based rate limiting to avoid 429 errors.
Output shape
A single message object (JSON) returned by the Telegram API for the sent animation.
Returns the full API response (message object). If the user blocks the bot, the item routes to the 'User Blocked (403)' output. Other errors route to the 'Error' output or fail execution depending on node settings.
Examples
Example 1: Send an animation GIF from a URL to a group chat.
Set mediaSource to 'url', provide the GIF URL in 'media', and specify the group chat ID in 'chatId'.
Example 2: Send an animation from n8n binary data with a caption and spoiler.
Set mediaSource to 'binary', map the binary property to 'binaryPropertyName', add a caption, and enable 'hasSpoiler'.