How to Connect Vapi to n8n AI Agents
This video is a tutorial on how to connect a Vapi AI voice agent to n8n workflows. The creator demonstrates how this integration allows a voice assistant to perform real-world operations, such as calling an external API to retrieve information. The primary goal is to show how you can build and use an AI agent that can both speak to a user and trigger complex automations seamlessly.
The tutorial walks through the following steps:
- Live Demo: A demonstration of an AI agent that retrieves the weather for a specific city from an API.
- Vapi Setup: How to create a new assistant in the Vapi dashboard and configure its first message and system prompt to instruct it to use a specific tool.
- Creating a Vapi Tool: A step-by-step guide on how to create a "Function" tool in Vapi, defining its name and parameters.
- n8n Workflow Setup: How to build an n8n workflow that uses a webhook to listen for the Vapi tool call and connect to a service like the OpenWeatherMap API.
- Handling the API Response: The video explains a common pitfall—the need to format the n8n response in a specific JSON format that Vapi can read and speak back to the user.
- Final Test: A live test of the complete workflow, showing the AI agent correctly retrieving and speaking the weather information.
This tutorial is a practical guide for developers and automators who want to build custom, AI-driven conversational experiences that leverage the power of external workflows.