How to add an HTTP request chatbot block
An HTTP request block calls an HTTPS endpoint, for example to send chatbot data to another system. The chatbot then follows the Success or Failure path.
Before you start
You need the HTTPS URL of the endpoint to call.
Steps
- Go to Chatbots.
- Click the chatbot, or create one. The chatbot editor opens.
- Click Add step at the end of a path, or the + on a line between two blocks.
- Choose HTTP request.
- In Method, choose GET, POST, PUT, PATCH or DELETE.
- In URL, enter the endpoint's address, starting with
https://. - Optionally, open Headers and click Add header to add a header name and value.
- In Body, choose JSON to send data, or None.
- For JSON, enter the data in JSON body. To insert a variable, such as the contact's name, type
{{inside a quoted value. - In Timeout (seconds), enter how long to wait for a response, from 1 to 60 seconds.
- On the canvas, add the next blocks for the Success and Failure paths.
What happens next
When a conversation reaches this block, the chatbot sends the request and follows Success, or Failure if the request doesn't succeed. A later Split by condition block can check the response. Click Save draft to keep your changes.
Troubleshooting
URL must use HTTPS
Start the URL with https://.
JSON must be valid
Fix the syntax in JSON body.
Timeout must be between 1 and 60 seconds
Enter a number from 1 to 60 in Timeout (seconds).