Get message Version 5 (Net)
Action group: Integrations
Description
The action returns a message.
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
Chatbot connection context | Chatbot connection context | Robin.Chatbot | Chatbot context | Yes |
Topic | Topic | Robin.String | Yes | |
Required variables | A string with the comma separated names of the required variables that must be contained in the message. | Robin.String | Yes | |
Timeout | Time to wait for message in milliseconds. Default value: 8000 | Robin.Numeric | No | |
Results | ||||
Result | Dictionary with values of required variables | Robin.Dictionary |
Special conditions of use
Example of a robot scheme for working with the Chatbots subgroup: _work_with_chatbot.robin-source
Example of use
Task
Receive a message from the chatbot (mandatory variable TIN), count the number of records in the message, if the records are greater than 0, then generate a random integer and send the result to the chatbot.
Solution
Use the actions "Open context", " Get message", "Get the number of elements in a dictionary", "Greater than", "If", "Get random number", "Number in String", "Join", "Send message".
Implementation
- Assemble a robot scheme consisting of actions: _work_with_chatbot.robin-source
- Set the parameters for the "Open context" action.
- Set parameters for the "Get message" action.
Topic - specify the same as in the chatbot. Also, in the "Required variables " field you should specify the names of variables that you want to read from Apache Kafka.
In the "Timeout" field it is desirable to specify a value greater than 10000 - Set the parameters for the "Get the number of elements in a dictionary" action.
- Set the parameters for the "Greater than" action.
- Set the parameters for the "If" action.
- Set the parameters for the "Get random number" action.
- Set the parameters for the "Number to String" action.
- Set the parameters for the "Join" action.
- Set the parameters for the "Send message" action.
- Click on the "Start" button in the top panel.
Result
The program robot completed successfully. The message was received from the chatbot and a response in the form of a randomly generated number was sent.
Обзор
Инструменты контента