A GET from Remote Command allows a chat to execute a GET request to get data from a server.
Read related article: POST to Remote Command
Adding a GET from Remote Command node
Add a New Command node by clicking on the last node to access the contextual menu and choose “New Command” to open up the Edit form.
This is the “Edit” form where you can modify the content of this node.
(Q1): Command Type. Choose “GET from Remote” for this command node.
(Q2): URL. Enter the URL of the endpoint you wish to query. If you wish to include a variable in the URL, please use double curly brackets to ensure proper URL escaping.
(Q3): Persist. The data fetched from the endpoint will be available in the selected Variable across sessions.
(Q4): Variable name. Enter a name for this variable. The destination container where the fetched data is stored.
(Q5): Token. An optional token to be sent over to the endpoint for authentication. This must be implemented on the server side to be functional.
(Q6): Add a Label. Labels are used to reference nodes in various functions of the chat builder.
The GET from Remote Command node has automatically generated 2 answer nodes: [Failure], [Success]
The 2 answer nodes begin 2 new branches in the flow.
- [Failure] branch – When the GET request fails, the flow directs to this branch.
- [Success] branch – When the GET request is successful, the flow directs to this branch.
You may add more nodes to extend both branches by clicking one of the answer nodes to access the contextual menu which contains all the actions that you can perform on the selected node.
To edit nodes, click on a node to access the contextual menu and choose “Edit” to open up the Edit form.
To add nodes, click on the last node to access the contextual menu which contains all the actions that you can perform on the selected node.
The actions include:
- New Question
- New Text
- New Image
- New Video embed
- New Command
- Connect to another chat
- Go to this element