Get message Version 5 (Net) 

Action group: Integrations


Description

The action returns a message. 

Action icon

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
Chatbot connection contextChatbot connection contextRobin.ChatbotChatbot contextYes
TopicTopicRobin.String
Yes
Required variablesA string with the comma separated names of the required variables that must be contained in the message.Robin.String
Yes
TimeoutTime to wait for message in milliseconds. Default value: 8000Robin.Numeric
No
Results
ResultDictionary with values of required variablesRobin.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

  1. Assemble a robot scheme consisting of actions: _work_with_chatbot.robin-source

  2. Set the parameters for the "Open context" action. 

  3. 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


  4. Set the parameters for the "Get the number of elements in a dictionary" action. 


  5. Set the parameters for the "Greater than" action. 


  6. Set the parameters for the "If" action. 

  7. Set the parameters for the "Get random number" action. 

  8. Set the parameters for the "Number to String" action. 

  9. Set the parameters for the "Join" action. 

  10. Set the parameters for the "Send message" action. 

  11. 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. 

  • Нет меток