AI Actions with Custom Webhooks
Webhooks AI Action is a powerful feature that allows you to connect your AI chatbot with external systems through API calls. This enables seamless data exchange and workflow automation, extending the capabilities of your AI agent.
With this feature, you can configure specific triggers and conditions, send and receive data, and verify API responses, making your AI chatbot more dynamic and efficient.
How to Use Webhooks AI Action
1. Setup
In this section, you will define the foundational aspects of your webhook.
- Name Your Action: Provide a descriptive name for your webhook action to easily identify it later.
- Set Conditions: Specify the condition that will trigger this webhook. This condition determines when your AI agent will execute the action.
- Collect Specific Data: If your webhook requires input data from the user or system, define which data points need to be collected. Examples include names, email addresses, or product IDs.
2. API Connection
This section lets you configure the technical aspects of the webhook connection.
- Configure URL: Enter the URL of the API endpoint you want to connect with.
Select Method: Choose the HTTP method for the API request. The available methods are:
POST
GET
PUT
DELETE
- Add Variables: Use system-provided variables or include specific data defined in the Setup section to customize the API request. These variables can dynamically populate fields such as user input or system-generated data.
- Include Parameters: Add any required parameters for the API request. These can be included as query strings, headers, or body parameters based on the API documentation of the endpoint you’re connecting to.
- Test the Response: Once you’ve configured the URL, method, variables, and parameters, you can test the webhook to ensure it functions correctly. This will display the response from the API, helping you verify that the integration works as intended.
Examples🌟
Example 1: Sending Form Data to an External CRM
Setup:
- Name: “Send CRM Data”
- Condition: Triggered when the user submits a form.
- Data to Collect: User name, email, and query.
API Connection:
- URL:
https://api.crmtool.com/submit
- Method:
POST
- Variables: Name, Email, Query (collected in Setup).
- Parameters: Authorization header with API key.
- Test Response: Confirm that the CRM API returns a success status.
Example 2: Updating Inventory in an E-commerce System
Setup:
- Name: “Update Inventory”
- Condition: Triggered when a product is marked as “Out of Stock.”
- Data to Collect: Product ID, Quantity.
API Connection:
- URL:
https://api.ecommerce.com/update_inventory
- Method:
PUT
- Variables: Product ID, Quantity (collected in Setup).
- Parameters: Authorization header with API key.
- Test Response: Confirm that the API returns a success status and updates the inventory correctly.
By following this documentation, you can easily configure Webhooks AI Action to suit your specific use case, automating processes and enhancing your AI chatbot’s functionality.