Tutorials
Webhook Function to call an API
Tutorial: Creating a Webhook Function to Fetch the Latest News
This tutorial will guide you through setting up a simple webhook function that calls an API to retrieve information—specifically, the latest news based on a keyword using NewsAPI. Before you begin, make sure you have an account with NewsAPI and obtain your API key.
Define the Webhook Function
Start by defining a FunctionCall
for your webhook function via the Playground or our APIs. You’ll need to specify the name, description, webhook URL, headers, and parameters required to make the API call.
Example function definition:
To test the function, simply prompt the agent to tell you about the latest news on “some keyword”.