Send and receive data from external APIs using HTTP requests in your chatbot agent. Learn how to configure HTTP requests, handle responses, and display dynamic content in your agent dialogs.
An HTTP Request allows your chatbot to communicate with external services or APIs to fetch or send data. It is a standardized way to interact with web-based services by specifying:
In this example, we will use an HTTP GET
request to retrieve movie details from the OMDB API based on a movie title provided by the user.
Create a dialog to collect the movie name from the user.
Movie
Use the HTTP request block to call the OMDB API and retrieve movie details.
{{Movie}}
with the variable containing the user input:
GET
Movie
Indiana Jones
Map the relevant JSON keys from the API response to variables for use in subsequent steps.
API Response Key | Variable Name |
---|---|
data.Title | Title |
data.Year | Year |
data.Poster | Poster |
data.Title
Title
data.Year
Year
data.Poster
Poster
Create a dialog bubble to display the fetched movie details.
{{Poster}}
.You can integrate services like Make.com or Zapier for further processing by sending the collected data to a webhook URL.
https://hook.eu1.make.com/...
).Before deployment, ensure the following:
Movie
variable captures user input correctly.Title
, Year
, Poster
) are saved and mapped without errors.Note: Always secure your API key. Avoid exposing it in client-side environments.
Tip: Use fallback messages for cases where the movie is not found or the API request fails.
User Input:
User types “Shawshank Redemption”.
API Call:
Fetch data from http://www.omdbapi.com/?t=Shawshank%20Redemption&apikey=YOUR_API_KEY
.
Response Variables:
Title
: “The Shawshank Redemption”Year
: “1994”Poster
: URL to movie posterDynamic Output:
(Displays the poster image)
Send and receive data from external APIs using HTTP requests in your chatbot agent. Learn how to configure HTTP requests, handle responses, and display dynamic content in your agent dialogs.
An HTTP Request allows your chatbot to communicate with external services or APIs to fetch or send data. It is a standardized way to interact with web-based services by specifying:
In this example, we will use an HTTP GET
request to retrieve movie details from the OMDB API based on a movie title provided by the user.
Create a dialog to collect the movie name from the user.
Movie
Use the HTTP request block to call the OMDB API and retrieve movie details.
{{Movie}}
with the variable containing the user input:
GET
Movie
Indiana Jones
Map the relevant JSON keys from the API response to variables for use in subsequent steps.
API Response Key | Variable Name |
---|---|
data.Title | Title |
data.Year | Year |
data.Poster | Poster |
data.Title
Title
data.Year
Year
data.Poster
Poster
Create a dialog bubble to display the fetched movie details.
{{Poster}}
.You can integrate services like Make.com or Zapier for further processing by sending the collected data to a webhook URL.
https://hook.eu1.make.com/...
).Before deployment, ensure the following:
Movie
variable captures user input correctly.Title
, Year
, Poster
) are saved and mapped without errors.Note: Always secure your API key. Avoid exposing it in client-side environments.
Tip: Use fallback messages for cases where the movie is not found or the API request fails.
User Input:
User types “Shawshank Redemption”.
API Call:
Fetch data from http://www.omdbapi.com/?t=Shawshank%20Redemption&apikey=YOUR_API_KEY
.
Response Variables:
Title
: “The Shawshank Redemption”Year
: “1994”Poster
: URL to movie posterDynamic Output:
(Displays the poster image)