Voice-Driven AI Assistant using VAPI and GPT-4.1-mini with Memory
Send VAPI voice requests into n8n with memory and OpenAI for conversational automation
This template shows how to capture voice interactions from VAPI (Voice AI Platform), send them into n8n via a webhook, process them with OpenAI, and maintain context with memory. The result is a conversational AI agent that responds back to VAPI with short, business-focused answers.
โ
What this template does
Listens for POST requests from VAPI containing the session ID and user query
Extracts session ID and query for consistent conversation context
Uses OpenAI (GPT-4.1-mini) to generate conversational replies
Adds Memory Buffer Window so each VAPI session maintains history
Returns results to VAPI in the correct JSON response format
๐ค Whoโs it for
Developers and consultants building voice-driven assistants
Businesses wanting to connect VAPI calls into automation workflows
Anyone who needs a scalable voice โ AI โ automation pipeline
โ๏ธ How it works
Webhook node catches incoming VAPI requests
Set node extracts session_id and user_query from the request body
OpenAI Agent generates short, conversational replies with your business context
Memory node keeps conversation history across turns
Respond to Webhook sends results back to VAPI in the required JSON schema
๐ง Setup instructions
Step 1: Create Function Tool in VAPI
In your VAPI dashboard, create a new Function Tool
Name: send_to_n8n
Description: Send user query and session data to n8n workflow
Parameters:
session_id (string, required) โ Unique session identifier
user_query (string, required) โ The userโs question
Server URL: https://your-n8n-instance.com/webhook/vapi-endpoint
Step 2: Configure Webhook in n8n
Add a Webhook node
Set HTTP method to POST
Path: /webhook/vapi-endpoint
Save, activate, and copy the webhook URL
Use this URL in your VAPI Function Tool configuration
Step 3: Create VAPI Assistant
In VAPI, create a new Assistant
Add the send_to_n8n Function Tool
Configure the assistant to call this tool on user requests
Test by making a voice query โ you should see n8n respond
๐ฆ Requirements
An OpenAI API key stored in n8n credentials
A VAPI account with access to Function Tools
A self-hosted or cloud n8n instance with webhook access
๐ Customization
Update the system prompt in the OpenAI Agent node to reflect your brandโs voice
Swap GPT-4.1-mini for another OpenAI model if you need longer or cheaper responses
Extend the workflow by connecting to CRMs, Slack, or databases
๐ฌ Contact
Need help customizing this (e.g., filtering by campaign, connecting to CRMs, or formatting reports)?
๐ง rbreen@ynteractive.com
๐ https://www.linkedin.com/in/robert-breen-29429625/
๐ https://ynteractive.com
Related Templates
Bulk Automated Google Drive Files Sharing and Direct Download Link Generation
This N8N workflow automates the process of sharing files from Google Drive. It includes OAuth2 authentication, batch pro...
USDT And TRC20 Wallet Tracker API Workflow for n8n
Overview This n8n workflow is specifically designed to monitor USDT TRC20 transactions within a specified wallet. It u...
Add product ideas to Google Sheets via a Slack
Use Case This workflow is a slight variation of a workflow we're using at n8n. In most companies, employees have a lot o...
๐ Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments