# Creating the first script

In the future, you can use one of the ready-made templates:

![](/files/MkcMzmVdUtmVRsgQNw53)

But now for training, we will create our own:

![](/files/B5WMkTmO88YE8DXP1arG)

Let's create a bot in Telegram. It will respond to the start button or the "Hi" message:

![](/files/9tB1erYMIbebzLOLItm5)

The bot will respond to this with “Hello from the bot!”

![](/files/UX4mYgqt5obKf9I83n37)

To publish a script, you need to link a channel. Click on the "Publish" button at the top right and we get a message:

![](/files/CuQrg9w6LbePjlEYwnCo)

A channel is any VK community or a chat bot in Telegram, which must first be added to the system.&#x20;

If we click "Create a channel", we will see that so far the list of channels is empty. Let's create a new bot. To do this, follow the link in BotFather:

![](/files/T5xLeeoyVwkgzHOpI2WF)

A dialogue will open in Telegram. Here you need to execute the /newbot command, select a name and username and get a token from BotFather:

![](/files/nTD1FePVoEzJ1B9XJOZR)

Copy the token, paste it into the service window and click "Create":

![](/files/JJ2o49Z7W0M3HF96i9MD)

The channel is now bound to the script:

![](/files/4Vo6WQC3zsp6deaaLTEg)

Pay attention to the words "Account is linked". Now it's set to "No". You need to click "bind" and send a specific message to your bot:

![](/files/f3xwcKucDl2pFcXZalOd)

![](/files/bVFUtg9JwwBojYHPW6XL)

This will link your Telegram account to the service and confirm that you are an administrator. Now you can publish the script, go to the bot and test its work:

![](/files/dvSnpa0Xslicr0sb6RJO)

The administrator can also test unpublished scenarios, we will talk about this in more detail a little later.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.smartbotpro.io/mini-course/creating-the-first-script.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
