YandexGPT Telegram bot without code or Yandex keys

You can build a YandexGPT Telegram bot without code in nana800 from three blocks: a trigger catches the message, YandexGPT writes the answer, and the send block returns it to the person. No Yandex Cloud account or key is needed: YandexGPT is paid from your nana800 balance, and you only need a bot token from @BotFather. The message and the reply cost as much as a basic block, a YandexGPT answer dozens of times more.

Build it in the builder

What you can automate

  • Answer customer questions about products, delivery and payment by the rules you wrote for the model
  • Help your team rewrite a reply to a customer more politely, shorten a long text or fix mistakes
  • Come up with post ideas, headlines and product descriptions from a short request in the bot chat
  • Translate messages sent to the bot into another language

How to set it up

  1. 1

    Create a bot with @BotFather

    Send /newbot to @BotFather, pick a name and copy the token that looks like 123456789:AAH... Two blocks need it: the trigger and the send block. You do not need any Yandex keys.

  2. 2

    Add the incoming message trigger

    Create a scheme in the builder and add the Telegram message from user to bot trigger. Paste the token and choose message as the event type, so the bot answers messages and ignores button presses.

  3. 3

    Set up the Yandex GPT text request block

    Add the Yandex GPT text request block. In the system context prompt describe the role and rules, for example "You are a flower shop assistant, keep answers short". Insert the message text from the trigger into the user prompt. Creativity takes a number from 0 to 1: the lower it is, the more precise the answer.

  4. 4

    Send the answer to Telegram

    Add the Telegram message send block with the same token. Put chat_id from the trigger into the chat ID field and result_text from the YandexGPT block into the message text. Pick the plain_text format so asterisks in the model answer do not break the message.

  5. 5

    Test it with the button trigger

    Connect the button trigger to the YandexGPT block, temporarily type a test question into the user prompt and your own ID from @getmyid_bot into the chat ID field. Turn the scheme on and press the button: the answer arrives in Telegram. If it does not, check error_text of the YandexGPT block.

  6. 6

    Keep the scheme on

    Put the trigger data back into the fields, keep the scheme on and message the bot yourself. Every new message now starts the scheme. While the scheme is on, it costs $0.0042 per hour.

Pricing

A run of a Telegram block costs $0.001, a run of a YandexGPT and YandexART block costs $0.04-$0.06. Every month the balance is topped up to $3.50 for free, an enabled scheme costs $0.0042 per hour.

Services in this connection

  • Telegram

    Build a Telegram bot without code: reply to messages, add buttons, send leads and alerts to a chat, group or channel. Free balance every month, no card needed.

  • YandexGPT and YandexART

    Use YandexGPT without code for posts, customer replies and daily digests, and YandexART for images. No Yandex Cloud key needed, free balance every month.

Frequently asked questions

Each message takes three runs: the trigger and the Telegram reply cost as much as a basic block ($1 per 1,000 runs), and a YandexGPT answer costs dozens of times more. There is nothing to pay Yandex directly. An enabled scheme costs $0.0042 per hour, and your balance is topped up to $3.50 for free every month. A bot kept on around the clock spends most of that on scheme hours.

No. The Yandex GPT text request block runs through the nana800 account, and requests are paid from your nana800 balance. All you need is a Telegram bot token.

No. Each message goes to YandexGPT on its own, together with the system prompt. Put everything the bot must always know, such as prices, addresses and rules, into the system context prompt.

The YandexGPT block works with text only. A photo caption arrives as the message text, but the model does not see the photo. For photos and voice messages use the OpenAI blocks with your own key: image analysis and speech to text.

Pick SHORT, MEDIUM, LONG or BIGGEST in the result length field and ask for short answers in the system context prompt. Telegram accepts up to 4096 characters in one message, and a longer answer will not be sent.

Check that the scheme is on and the trigger listens to messages. The reason for a model error is in error_text of the YandexGPT block, which waits up to a minute for an answer. If the same bot is connected to another service, that service takes its messages, so create a separate bot for nana800.

Build your first scheme for free

Sign-up is free and needs no card. Every month the balance is topped up to $3.50 for free, enough for about 3,500 runs of basic blocks.

Build it in the builder