Chatbot Flow: HTTP request
Using the HTTP Element:
Creating the HTTP request element
Your bot might need to access an external service, on behalf of the user or as part of your business logic. For example, you are looking to generate leads through the UserInput and need to send data to your server. Or you need to get data from the server and send it through chatbot flow.
In this case, the HTTP requests will help you achieve your goals.
Let's create an Inspirational Quotes bot using the HTTP request element.
Custom Variable: Go to Facebook & Instagram > Chat Flow Builder > Custom Variables > Create New Custom Variable > Enter Variable Name and click Confirm
Create a new GMB Flow > Right-click and select an HTTP element > Add a Trigger element > enter a keyword to trigger the flow and click OK
Click on the HTTP element > Add request URL > Click on Test Request Button
Now, you need to map the response
Please click on the Map Response button > Select correct response value and map it with the custom variable which you have created > click on "+" button and click on "Confirm Changes"
Make sure you have clicked "+" button otherwise mapping will not work.
HTTP input is done, now we need to add a text element to send the inspirational quote.
Add a Text element > enter a Message > select Custom variable and click on Confirm Changes.
Save the flow > Our inspiration quote bot is ready.