N8N Tools Telegram icon

N8N Tools Telegram

Interact with Telegram Bot API

Overview

The node "N8N Tools Telegram" integrates with the Telegram Bot API to perform various operations related to Telegram messaging, chats, bots, files, inline queries, callback queries, and updates. Specifically, for the Messages resource and the Send Location operation, this node allows users to send a geographic location message to a specified Telegram chat.

This is useful in scenarios where you want to share a physical location via a Telegram bot, such as sending the location of an event, a store, or a user’s current position automatically from workflows.

Example use case:

  • Automatically sending your business location to customers who request it through a Telegram bot.
  • Sharing live location updates or static locations in group chats or individual chats.

Properties

Name Meaning
Chat ID The unique identifier for the target Telegram chat where the location will be sent.
Location Data JSON object containing the Telegram location data to send. This typically includes latitude, longitude, and optional parameters like live_period, heading, proximity_alert_radius, etc.

Output

The output of the node is a JSON object representing the response from the Telegram Bot API after sending the location message. This usually contains details about the sent message, including message ID, chat information, date, and the location data that was sent.

If the operation fails, the output may contain an error message describing what went wrong.

The node does not output binary data for this operation.

Dependencies

  • Requires an active Telegram Bot API token (provided via credentials) to authenticate requests.
  • Requires a subscription and valid API key for the external "N8N Tools API" service, which validates usage before forwarding requests to Telegram.
  • The node uses HTTP POST requests to the Telegram Bot API endpoints via the helper class TelegramApi.

Troubleshooting

  • Invalid subscription or API key error: If the node throws an error indicating invalid subscription or API key, verify that the API key credential for the external validation service is correct and active.
  • Unknown operation error: Ensure the operation parameter is set correctly to "sendLocation" when using the Messages resource.
  • Malformed Location Data: The locationData property must be a valid JSON string representing the location object expected by Telegram. Invalid JSON or missing required fields (like latitude and longitude) will cause errors.
  • Chat ID issues: Make sure the Chat ID is correct and the bot has permission to send messages to that chat.
  • Network or API errors: Check network connectivity and Telegram Bot API status if requests fail unexpectedly.

Links and References

Discussion