Skip to main content


This package makes creating Telegram bots so simple!

Official Website

Credential configuration

To configure this credential, you need the token from your Telegram Bot. You can create a bot or create a token for an existing bot using Telegram's BotFather.

Optionally, you can set any of the extra config parameters you can see here.

Here is an example of a filled credential configuration form in YepCode:

Telegram Snippets available in Editor


The title is the triggering text for YepCode to autocomplete the script.


New integration from credential
const telegram = yepcode.integration.telegram('credential-slug');
New integration from plain authentication data
const { Bot } = require('grammy');

const telegram = new Bot("your-bot-token");

Set Webhook

You may want to receive messages to your bot using a webhook to a YepCode process which handles them. You can do this using this snippet:

Set webhook
await telegram.api.setWebhook("webhook-url");

You can also set the webhook by doing a request to this URL with your bot token and your webhook URL:<your-bot-token>/setWebhook?url=<your-team-name>/webhooks/<processId>

Set Bot Commands

Set bot commands
await telegram.api.setMyCommands([
{ command: "commandName", description: "Command description" },
{ command: "commandName", description: "Command description" },

Send Message

Send message
await telegram.api.sendMessage(chatId, "message-content");

Send HTML Message

Send HTML message
await telegram.api.sendMessage(
"<b>Hi</b> from <a href="">YepCode</a>!",
{ parse_mode: "HTML" }

Send Markdown Message

Send Markdown message
await telegram.api.sendMessage(
"*Hi* from [YepCode](\\!",
{ parse_mode: "MarkdownV2" }