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. Scripts
  2. Integrations

http request

PreviousGoogle-таблицыNextamoCRM

Last updated 2 years ago

The HTTP request integration allows you to send arbitrary HTTP requests to third-party servers. This allows you to integrate Smartbot with your website, CRM or online store.

Please note that in order to submit requests to any site, you must verify that you are the owner of the site. The easiest way: write to Smartbot Pro technical support.

To set up an http request, let's create an appropriate block on the script screen. This can be done through the right additional menu ("integration" section), or by right-clicking on a free area.

The new block will appear on the screen, and its menu will automatically open on the right.

If you are integrating with an existing service, then you can find all the necessary information to configure this step in the official API documentation for this service, or contact the developers of your site.

A brief reference on the step fields:

  • Request type (http method): GET/POST/...

  • URL address: the page (endpoint) that Smartbot should access, you can immediately specify query query parameters, for example: https://some.site/some_endpoint?key1=value1&key2=value2

  • Request body: payload, can be given in three different formats:

    • Form: the body of the request is a form (list of key-value pairs), the request will be sent with a header Content-Type: application/x-www-form-urlencoded (unless this header is explicitly set differently)

    • JSON: The request body is a JSON document. The request will be sent with the header Content-Type: application/json (unless this header is explicitly set differently)

    • Text: data is sent as-is, no additional headers are added

  • Headers: additional information, such as authorization data: Authorization: Bearer [token]

Below, after setting the request parameters, variables are set in which the server response will be saved:

  • Response Body: The data sent by the server in response. If Content-Type is application/json, then the type of this variable will be Dictionary, otherwise String

  • Response status: number, such as 200, 400, or 500 you can check the response status to see if the request completed successfully

  • Response headers: the server can also send some additional information in the form of headers, they will be stored in a Dictionary type variable

By default, all this data is stored in temporary variables: %body%, %status% and %headers% respectively.

Меню блока