Skip to main content
Call an External API Block
Updated over a week ago

The Call an External API Block is a powerful feature that enables you to integrate with external APIs and use their responses in your chatflow. This block is great for automating tasks, fetching data, and performing other operations on third-party platforms.

Prerequisite to use the External API block

To get started with the Call an External API Block, you need to have the following information:

  • The method and URL of the external API you want to call

  • The authentication credentials required to access the API (if any)

  • The parameters required to make the API call (if any)

How to use the External API block

Once you have all the necessary information, follow these steps to create a Call an External API Block:

  • Click on Action > Call External API block

  • Select the method from the dropdown menu.

  • Enter the API URL in the field.

  • The authentication credentials required to access the API (if any)

  • Add parameters to the request body (only JSON support currently)

    • add Key on the left input fields

    • pick a variable or enter a string to the value you want to pass in the body on the right input fields

  • Configure the response by entering the path and adding a label for it

  • You will be able to use this value further in the chatflow. It will be available as a variable from the variable picker


FAQs

What response types are supported? Do you support nested values in the request body?

No, we do not support nested values in the request body yet. However, nesting in response is supported.

What all information can I receive from the chatbot?

All of the variables present in the chatflow, including local user responses can be passed.

What are some practical use cases for this block?

Some sample use cases are below:

  • Add to cart: you can receive cart information in this format by using {{checkout.items}} and respond with a Cart URL to be sent to the customer.

  • Track order: you can call an API in real-time to return an order status against a phone number.

  • Lead qualification: you can send lead information like name, number, email onto your CRM

  • Rewards: you can generate a discount code in run-time by placing this block in the middle of a chatflow, sending necessary variables and using a discount code from the response.

Did this answer your question?