This workflow corresponds to n8n.io template #8866 — we link there as the canonical source.
This workflow follows the Agent → OpenAI Chat recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"meta": {
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "96c107ed-4e96-411e-87dd-a931f9cabdaf",
"name": "OpenAI Chat Model4",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-480,
13184
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.2
},
{
"id": "404fd755-eb4f-470c-bbc2-09c69c72e72b",
"name": "Sticky Note57",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1488,
12256
],
"parameters": {
"color": 7,
"width": 2144,
"height": 1472,
"content": "# VAPI to n8n Integration Guide\n\n## Description\n\nThis guide demonstrates how to connect VAPI (Voice AI Platform) to n8n workflows using webhooks and function tools. By following these steps, you'll be able to capture user voice interactions from VAPI and process them through automated n8n workflows, enabling powerful voice-driven automation scenarios.\n\nThe integration uses VAPI's function tools to send session data and user queries to n8n via webhook, allowing you to build complex workflows that respond to voice commands and queries.\n"
},
"typeVersion": 1
},
{
"id": "a8078786-f91c-45d4-8993-735db61ebedb",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2000,
12256
],
"parameters": {
"width": 480,
"height": 1488,
"content": "# Connecting VAPI to n8n\n\n## Step 1: Create Function Tool in VAPI\n\n1. Go to your VAPI dashboard and create a new Function Tool\n2. Configure the tool with these settings:\n - **Name**: `send_to_n8n`\n - **Description**: `Send user query and session data to n8n workflow`\n - **Parameters**:\n - `session_id` (string, required) - Unique session identifier\n - `user_query` (string, required) - The user's question or request\n - **Server URL**: `https://your-n8n-instance.com/webhook/vapi-endpoint`\n\n## Step 2: Set up n8n Webhook\n\n1. Create a new workflow in n8n\n2. Add a **Webhook** node as the trigger\n3. Set the webhook path to `/webhook/vapi-endpoint`\n4. Set HTTP method to `POST`\n5. Save and activate the workflow\n6. Copy the webhook URL and use it as your VAPI server URL\n\n## Step 3: Create VAPI Assistant\n\n1. Create a new Assistant in VAPI\n2. Add the `send_to_n8n` function tool to the assistant\n3. Configure the assistant to call the tool when processing user requests\n4. Test the integration by making a call\n\n## Expected Data Flow\n\nWhen a user makes a request:\n1. VAPI receives the user query\n2. Assistant calls the `send_to_n8n` function\n3. Function sends POST request to n8n webhook with:\n\njson\n {\n \"session_id\": \"unique-session-id\",\n \"user_query\": \"user's question\"\n }\n\n\n--\n## \ud83d\udcec Contact \nNeed help customizing this (e.g., filtering by campaign, sending reports by email, or formatting your PDF)? \n\n- \ud83d\udce7 **rbreen@ynteractive.com** \n- \ud83d\udd17 **https://www.linkedin.com/in/robert-breen-29429625/** \n- \ud83c\udf10 **https://ynteractive.com**\n"
},
"typeVersion": 1
},
{
"id": "542ddc65-78e5-45f6-bf83-fab5dbb8c551",
"name": "Simple Memory1",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
-224,
13216
],
"parameters": {
"sessionKey": "={{ $json.id }}",
"sessionIdType": "customKey"
},
"typeVersion": 1.3
},
{
"id": "67ebdd0d-7bce-44fb-9c8e-2baeb11cdd43",
"name": "Webhook for vapi",
"type": "n8n-nodes-base.webhook",
"position": [
-1216,
12832
],
"parameters": {
"path": "28ac7c53-7476-4e78-a97a-daef3c842c20",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2.1
},
{
"id": "cf474dce-1b20-4026-83dc-953aceecc6b8",
"name": "Keep Session id & Query",
"type": "n8n-nodes-base.set",
"position": [
-784,
12816
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "9e73860b-9673-4996-8893-f362cef17089",
"name": "id",
"type": "string",
"value": "={{ $json.body.message.toolCalls[0].id }}"
},
{
"id": "bc8b5bed-1f00-49be-a000-1ba125f1d95b",
"name": "question",
"type": "string",
"value": "={{ $json.body.message.toolCalls[0].function.arguments.user_query }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "118de037-1b00-4106-98ac-564245c32b0c",
"name": "Resume Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-416,
12704
],
"parameters": {
"text": "={{ $json.question }}\n",
"options": {
"systemMessage": "keep answers short and conversational. \n\nYou are Robert Breen, an AI Agent Developer and Low-Code Automation Expert. You are the founder of Ynteractive, based in Palmyra, PA, where you design and deploy custom AI-powered agents and automated workflows that save time, eliminate manual work, and help businesses scale without adding headcount.\n\nYour expertise lies in n8n, OpenAI, and API integrations, where you build intelligent automations that go far beyond simple triggers and actions. You design agents that think, decide, and act using business rules, context, and memory.\n\nYou are known for:\n\nBuilding AI agents with personality and purpose (e.g., lead qualification bots, scheduling assistants, back-office automations).\n\nDesigning data pipelines that connect CRMs, databases, and SaaS tools (HubSpot, Google Workspace, Notion, Airtable, Salesforce, etc.).\n\nCreating autonomous assistants that manage repetitive processes, send reports, update systems, and support sales/marketing teams.\n\nDelivering production-ready solutions that are secure, scalable, and reliable.\n\nYour clients range from solopreneurs to startups and enterprise teams. They turn to you when they want to scale operations without scaling payroll, eliminate manual busywork, or connect a fragmented tech stack.\n\nYour background includes over a decade of experience in analytics and business intelligence (Tableau Ambassador, BI Developer, Analytics Manager) before transitioning into AI consulting full-time in 2022. You hold a degree in Finance and Economics from Slippery Rock University.\n\nYour voice should be practical, expert, and results-focused, showing credibility in both data-driven decision-making and AI automation. You should emphasize how your approach goes beyond chatbots to build real AI agents that deliver measurable business value.\n\nnever use quotes in your response. "
},
"promptType": "define"
},
"typeVersion": 2.2
},
{
"id": "a4d7a79b-c5e5-45c3-950b-51d731845e12",
"name": "Respond to Vapi",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
240,
12944
],
"parameters": {
"options": {},
"respondWith": "json",
"responseBody": "={\n \"results\": [\n {\n \"toolCallId\": \"{{ $('Keep Session id & Query').item.json.id }}\",\n \"result\": \"{{ $json.output }}\"\n }\n ]\n}\n"
},
"typeVersion": 1.4
}
],
"connections": {
"Resume Agent": {
"main": [
[
{
"node": "Respond to Vapi",
"type": "main",
"index": 0
}
]
]
},
"Simple Memory1": {
"ai_memory": [
[
{
"node": "Resume Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Webhook for vapi": {
"main": [
[
{
"node": "Keep Session id & Query",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model4": {
"ai_languageModel": [
[
{
"node": "Resume Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Keep Session id & Query": {
"main": [
[
{
"node": "Resume Agent",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
openAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
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…
Source: https://n8n.io/workflows/8866/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow automates multi-robot swarm coordination for robotics engineers, autonomous systems researchers, and industrial automation teams managing fleets of robots in real time. It solves the pro
Respondtowebhook Stickynote. Uses lmChatOpenAi, respondToWebhook, toolWorkflow, chatTrigger. Webhook trigger; 28 nodes.
This workflow automates real-time energy grid telemetry ingestion, compliance validation, and multi-channel reporting for grid operators, energy managers, and compliance teams. Telemetry data arrives
This workflow automates Identity and Access Management (IAM) event governance using an AI agent, targeting security operations teams, compliance officers, and IT governance teams managing cloud or ent
Businesses and developers who want to automate customer support or engagement on Facebook Messenger using AI-powered responses.