This workflow corresponds to n8n.io template #6404 — we link there as the canonical source.
This workflow follows the Agent → Form Trigger 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 →
{
"id": "gMyUGRPsQU2AnmvH",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Heygen Inbound Agent",
"tags": [],
"nodes": [
{
"id": "f4baf2d1-80fa-49a8-9b1c-c6577061b59e",
"name": "On form submission",
"type": "n8n-nodes-base.formTrigger",
"position": [
480,
60
],
"parameters": {
"options": {},
"formTitle": "Inbound Form",
"formFields": {
"values": [
{
"fieldLabel": "Name",
"requiredField": true
},
{
"fieldType": "email",
"fieldLabel": "Email Address",
"requiredField": true
},
{
"fieldType": "number",
"fieldLabel": "Phone Number"
},
{
"fieldLabel": "Business URL"
},
{
"fieldType": "dropdown",
"fieldLabel": "What's your biggest pain point (marketing wise)?",
"fieldOptions": {
"values": [
{
"option": "Performance Marketing"
},
{
"option": "Content Marketing"
},
{
"option": "Product Marketing"
},
{
"option": "I don't know"
}
]
}
}
]
},
"formDescription": "Fill Up This Form to Get Personalized Marketing Services"
},
"typeVersion": 2.2
},
{
"id": "3c5f901b-9409-4a60-92e6-398ed64553f2",
"name": "HeyGen Post",
"type": "n8n-nodes-base.httpRequest",
"position": [
1080,
60
],
"parameters": {
"url": "https://api.heygen.com/v2/video/generate",
"method": "POST",
"options": {},
"jsonBody": "={\n \"caption\": false,\n \"dimension\": {\n \"width\": 1280,\n \"height\": 720\n },\n \"video_inputs\": [\n {\n \"character\": {\n \"type\": \"avatar\",\n \"avatar_id\": \"5ecf0af57a104efe98029940d33381de\",\n \"scale\": 1,\n \"avatar_style\": \"normal\"\n },\n \"voice\": {\n \"type\": \"text\",\n \"voice_id\": \"63dff8b32aeb43a39620c74345ce0652\",\n \"input_text\": \"{{ $json.output }}\",\n \"speed\": 1.2\n }\n }\n ]\n}\n",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"headerParameters": {
"parameters": [
{
"name": "accept",
"value": "application/json"
}
]
}
},
"credentials": {},
"typeVersion": 4.2
},
{
"id": "ee64bc0d-8014-45a5-8a10-ed5211544cf3",
"name": "Wait",
"type": "n8n-nodes-base.wait",
"position": [
1240,
60
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "0a302a62-164a-47e8-8bed-c45ac16c81a1",
"name": "If1",
"type": "n8n-nodes-base.if",
"position": [
1740,
60
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "3ef3edd0-7a3a-41ba-9f6f-7acf11a00a3a",
"operator": {
"name": "filter.operator.equals",
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data.status }}",
"rightValue": "completed"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "910220b0-5ad7-4b75-9655-076808d70f97",
"name": "Wait1",
"type": "n8n-nodes-base.wait",
"position": [
1700,
320
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "2722ac49-7118-47cc-ac8d-79a5afbcf595",
"name": "Selfie Video Prompt Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
680,
60
],
"parameters": {
"text": "=Name: {{ $('On form submission').item.json.Name }}\nEmail Address:{{ $json['Email Address'] }}\nPhone Number:{{ $json['Phone Number'] }}\nBusiness URL:{{ $json['Business URL'] }}\nBiggest Pain Points:{{ $json['What\\'s your biggest pain point (marketing wise)?'] }}",
"options": {
"systemMessage": "You are an effective video prompt agent for Purple Unicorn Marketing Agency. Your job is to create an effective prompt to send to Heygen API to prompt a video avatar to say something impactful and personalized to the leads. Start the video with \" Hey this is Jason from Purpler Unicorn Marketing...\". The aim of the short 10 second video is to get them to get on a call with by booking a time on our Calendly link."
},
"promptType": "define"
},
"typeVersion": 2
},
{
"id": "56d37783-3047-4b61-bb5b-bb244e107f63",
"name": "OpenAI Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
740,
300
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"credentials": {},
"typeVersion": 1.2
},
{
"id": "eea5b39a-6f3f-4924-b9f6-64eeb4280265",
"name": "Get Video",
"type": "n8n-nodes-base.httpRequest",
"position": [
1500,
60
],
"parameters": {
"url": "https://api.heygen.com/v1/video_status.get",
"options": {},
"sendQuery": true,
"sendHeaders": true,
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"queryParameters": {
"parameters": [
{
"name": "video_id",
"value": "={{ $json.data.video_id }}"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "accept",
"value": "application/json"
}
]
}
},
"credentials": {},
"typeVersion": 4.2
},
{
"id": "c10dc728-c9fb-4742-98ac-214bda0f3390",
"name": "OpenAI",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
1960,
40
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1",
"cachedResultName": "GPT-4.1"
},
"options": {},
"messages": {
"values": [
{
"content": "=Prospect Information:\nName: {{ $('On form submission').item.json.Name }}\nEmail Address:{{ $('On form submission').item.json['Email Address'] }}\nLooking for a house in: {{ $('On form submission').item.json['Looking for a house in:'] }}\nHouse for: {{ $('On form submission').item.json['House For:'] }}\n\nThumbnail URL: {{ $json.data.thumbnail_url }}\nVideo Link: {{ $('Get Video').item.json.data.video_url }}"
},
{
"role": "system",
"content": "You're an email agent for Paradise Homes. Your job is to craft an impactful email based on the information you've received from a form submission, and to pass along a short intro video along with the email. The goal of the email is to ask the prospect to book a time with you on calendly.com/automatewithmarc.\n\nYou will also receive the video link and thumbnail to embed in the user input, please embed the video link on to the thumbnail instead of showing the entire long URL.\n\nOutput in HTML so that the thumbnail and video format is correct - only output the body of the email to the next node, as the next node is the gmail node."
}
]
}
},
"credentials": {},
"typeVersion": 1.8
},
{
"id": "f3015fb5-2e15-4dc1-9abd-6c178ab2af9a",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
360,
-160
],
"parameters": {
"width": 260,
"height": 740,
"content": "Form Submission Trigger"
},
"typeVersion": 1
},
{
"id": "62e8747a-8dec-4cc2-87cb-f951693d5802",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
640,
-160
],
"parameters": {
"color": 2,
"width": 360,
"height": 740,
"content": "Script Agent"
},
"typeVersion": 1
},
{
"id": "54b4da07-eff1-4b4a-b064-9ca10a2dfa46",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1020,
-160
],
"parameters": {
"color": 6,
"width": 360,
"height": 740,
"content": "Post & Wait"
},
"typeVersion": 1
},
{
"id": "e8cea2d7-f585-4e74-9f91-a1e978000b12",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1400,
-160
],
"parameters": {
"color": 4,
"width": 500,
"height": 740,
"content": "Get Video"
},
"typeVersion": 1
},
{
"id": "6d6cbf72-25b1-4a4a-a298-e2c964905dc3",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
1920,
-160
],
"parameters": {
"color": 3,
"width": 560,
"height": 740,
"content": "Send Outreach Email with Video"
},
"typeVersion": 1
},
{
"id": "e15716ce-3231-4a2e-9175-49117a466cb0",
"name": "Send Email & Video",
"type": "n8n-nodes-base.gmail",
"position": [
2280,
40
],
"parameters": {
"sendTo": "={{ $('On form submission').item.json['Email Address'] }}",
"message": "={{ $json.message.content }}",
"options": {},
"subject": "Hey from Paradise Homes"
},
"credentials": {},
"typeVersion": 2.1
},
{
"id": "a21ac9db-e705-412d-bc10-c37fa4b245a5",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-540,
-160
],
"parameters": {
"width": 880,
"height": 1440,
"content": "\ud83c\udfa5 AI-Powered Inbound Video Agent \u2013 Auto-Respond to Leads with Personalized Videos\nDescription:\nThis workflow helps you instantly respond to inbound leads with a hyper-personalized video and email\u2014fully automated using n8n, Heygen API, and OpenAI.\n\nWatch the step-by-step Tutorial Build here:\nhttps://www.youtube.com/@Automatewithmarc\n\nWhen a visitor submits a form on your website, this AI agent dynamically:\n\nCreates a video script tailored to the lead's input using an AI prompt agent\nGenerates a video using the Heygen API with a branded avatar\nCrafts a contextual follow-up email embedding the video\nSends it to the lead\u2019s inbox with a call-to-action\n\nThis is ideal for:\n\nMarketing agencies looking to impress new prospects\nSales teams aiming to boost inbound conversions\nFounders and freelancers building trust through instant video touchpoints\n\n\ud83d\udce5 How It Works:\n\nForm Trigger\n\u2003Captures user inputs like name, email, business URL, and marketing pain points.\n\nAI Video Prompt Agent\n\u2003Uses LangChain + OpenAI to write a short, personalized script (e.g., \u201cHey this is Jason from Purple Unicorn Marketing...\u201d).\n\nVideo Generation (Heygen API)\n\u2003Triggers a video using a selected avatar and voice style.\n\nVideo Status & Wait Logic\n\u2003Monitors the video generation status until completed.\n\nGet Final Video URL & Thumbnail\n\u2003Retrieves the finished video and prepares for embedding.\n\nEmail Writer (GPT-4)\n\u2003Generates an HTML-based outreach email including the lead's info and embedded video thumbnail with a booking link.\n\nEmail Delivery (Gmail Node)\n\u2003Sends the full message to the inbound lead automatically.\n\n\u2699\ufe0f Tools & Integrations:\nn8n (self-hosted or cloud)\n\nHeygen API \u2013 for video generation\n\nLangChain + OpenAI GPT-4 \u2013 for script writing and email creation\n\nGmail Node \u2013 for automated outreach delivery\n\n\ud83d\udd27 Setup Instructions:\nHeygen API Key\n\u2003Create a Heygen account and retrieve your API key. Set it up as a credential in n8n (httpHeaderAuth).\n\nOpenAI Key\n\u2003Add your OpenAI API key under OpenAI credentials.\n\nGmail OAuth2\n\u2003Connect your Gmail account using OAuth2 for sending emails.\n\nCustomize the Prompt\n\u2003Modify the system message in the LangChain Agent node to reflect your brand tone or CTA.\n\nCalendly Link\n\u2003Update the call-to-action links in both the video prompt and email generator nodes with your real booking URL.\n\n\ud83d\udca1 Use Cases:\nAutomating welcome sequences for new signups\n\nPersonalized video lead responses for agencies\n\nAI-driven inbound sales agent for bootstrapped startups"
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "541a5284-5f0e-4b30-bd77-f66454023248",
"connections": {
"If1": {
"main": [
[
{
"node": "OpenAI",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait1",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "Get Video",
"type": "main",
"index": 0
}
]
]
},
"Wait1": {
"main": [
[
{
"node": "Get Video",
"type": "main",
"index": 0
}
]
]
},
"OpenAI": {
"main": [
[
{
"node": "Send Email & Video",
"type": "main",
"index": 0
}
]
]
},
"Get Video": {
"main": [
[
{
"node": "If1",
"type": "main",
"index": 0
}
]
]
},
"HeyGen Post": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"On form submission": {
"main": [
[
{
"node": "Selfie Video Prompt Agent",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model1": {
"ai_languageModel": [
[
{
"node": "Selfie Video Prompt Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Selfie Video Prompt Agent": {
"main": [
[
{
"node": "HeyGen Post",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
🎥 AI-Powered Inbound Sales Rep Video Agent – Auto-Respond to Leads with Personalized Videos Description:
Source: https://n8n.io/workflows/6404/ — 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 n8n workflow automates turning short user ideas into production-ready real-estate marketing assets (photorealistic images and optional 360° videos). A form submission seeds a prompt board → an LL
This workflow automates the process of competitor creative analysis for Facebook Pages. When a user submits their email and a target Facebook Page URL via a web form, the workflow: Scrapes the latest
This n8n workflow is designed for e-commerce businesses, digital marketers, and content creators who want to automatically generate professional 3D product videos from product images. It's perfect for
Whether you’re a product manager, developer, or simply curious about workflow automation, you’re in the right place. This n8n workflow is designed to help you streamline and automate your social media
🎥 AI-Powered Inbound Video Agent: Auto-Respond to Leads with Personalized Videos Description: This workflow automates the first-touch response for inbound leads by creating and delivering a hyper-pers