Reading URLs
Last updated
Last updated
This feature is under improvement. Currently, reading regular web pages by the bot using the method below may work incorrectly and significantly increase the cost of the dialogue.
What is URL link reading?
URL link reading is the ability of the bot to retrieve the information you need from any web page of a website.
Tool Name
A display name by which you can easily identify the required tool in the general list
Function Name
Should describe the main idea of this action.
Only English alphabet characters and underscores (_
) are allowed
Function Description
A description of what this action will do
Error Message
What text will be returned to the bot in case of an error. We recommend writing something like "An error occurred"
Bot Response Rules
Within one action, several webhooks can be triggered, or several other functions can be executed. With this setting, we have the option to choose which step's response will be passed to the bot - from the first, the last, or from all.
Argument - since the argument for the function is any URL link by design, in the Argument field we write url_link
.
Argument Description - this field is optional and serves as a description to avoid confusion if there are multiple arguments.
Ensure that the argument is written in English and without spaces. You can use English alphabet characters and underscores (_
).
Name
The step name for display in the list. It can be anything
URL
The endpoint for the request. This value can be a specific link that the bot will follow upon request or a dynamic argument passed to the function.
Request Method
The HTTP method used when making the request (GET, POST, PATCH, etc.)
Parameters to be passed in the URL
The query parameters passed in the query string. For example
?phone=123&type=passport
Request Headers
HTTP request headers, such as content type or authorization token
Request Body
Data passed in the request (for all methods except GET). For example:
{"phone": 123, "type": "passport"}
Status codes that will return a webhook response
Response codes (200, 404, 500, and others) in which the webhook response will be considered successful and returned to the bot. If the webhook returns a code other than those specified, instead of the webhook response, the bot will receive the text from the "Error Message" setting. If no code is specified, all will be considered successful.
Maximum response length in characters
Limit on the response size. If the webhook returns a response with more than the specified number of characters, the bot will receive an error message. This is necessary to prevent accidentally using a large number of tokens.
Click on the "+" at the right end of the URL field
Select the previously set argument url_link
A correctly filled URL string should look like this (the color of the argument may vary, it's random and does not affect anything):
For correct operation of retrieving information by link, Request Method is left by default - GET.
Configuration is complete.