SmartbotPro
  • Smartbot Pro – messenger marketing tool
  • Most important
  • Mini-course
    • Registration and personal account
    • Initial scripting tools
    • Creating the first script
    • Users and collection of information
    • Applications, variables and managers
    • Data validation
    • Collection of applications for a webinar within Telegram
    • Testing unpublished scripts
    • Newsletters
    • Template "Test with a set of points"
    • Statistics
    • Interface hacks
  • Beginning of work
    • Registration in the service
    • More about scripts
    • How to add messenger
      • Adding Telegram
        • Adding a bot to a group chat in Telegram
      • Adding ВК
      • Adding Viber
      • Connecting a channel to a script
      • Linking a social network account
  • Scripts
    • Basics
      • Create a script
      • Script templates
      • Editor interface
      • Publishing a script
      • Script testing
      • How the script is chosen
    • Script events
      • Message from user
      • No appropriate script
      • First message
      • VK Events
      • Webhook
    • Actions
      • Send a message
        • Buttons
      • Process message
      • Extract data
      • Change context
      • Write to statistics
      • Send Notification
      • Switching to another script
      • Working with the user
      • Set variable
      • Scheduled transitions
      • Run SmartQuery
    • Conditions
      • Condition
      • Condition with options
      • Conditions of VKontakte
    • Variables
      • Special Variables
      • User variables
      • Global variables
      • Variable %ref%
    • Acceptance of payment
    • Telegram bot menu
    • Integrations
      • Google-таблицы
      • http request
      • amoCRM
      • Get Course
      • Yukassa for receiving payments
    • Reactions
  • Newsletters
  • Settings
    • Projects
    • Cabinets
  • Information sections
    • Statistics
    • Users
  • SmartQuery
    • Introduction
    • Language syntax
    • Function Reference
  • The documents
    • Privacy Policy
    • Terms of service
    • Subscription and rates
Powered by GitBook
On this page
  1. Mini-course

Creating the first script

PreviousInitial scripting toolsNextUsers and collection of information

Last updated 2 years ago

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

But now for training, we will create our own:

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

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

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

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

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:

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:

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

The channel is now bound to the script:

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:

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:

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