8
n8n 中文网amn8n.com

Heygen入站智能体

高级

这是一个Lead Nurturing, Multimodal AI领域的自动化工作流,包含 16 个节点。主要使用 If, Wait, Gmail, FormTrigger, HttpRequest 等节点。 使用 Heygen AI 和 GPT-4 通过个性化视频回复入站线索

前置要求
  • Google 账号和 Gmail API 凭证
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "gMyUGRPsQU2AnmvH",
  "meta": {
    "instanceId": "1c7b08fed4406d546caf4a44e8b942ca317e7e207bb9a5701955a1a6e1ce1843",
    "templateCredsSetupCompleted": true
  },
  "name": "Heygen入站智能体",
  "tags": [],
  "nodes": [
    {
      "id": "f4baf2d1-80fa-49a8-9b1c-c6577061b59e",
      "name": "表单提交时",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        480,
        60
      ],
      "webhookId": "6de5aa02-d505-4a6a-8160-ba3a847582ea",
      "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发布",
      "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": "等待",
      "type": "n8n-nodes-base.wait",
      "position": [
        1240,
        60
      ],
      "webhookId": "eb77fc51-d25b-4bf6-aaf6-63602543ba69",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "0a302a62-164a-47e8-8bed-c45ac16c81a1",
      "name": "条件判断1",
      "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": "等待1",
      "type": "n8n-nodes-base.wait",
      "position": [
        1700,
        320
      ],
      "webhookId": "6640f737-f472-430e-a7c7-cfa25d033856",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "2722ac49-7118-47cc-ac8d-79a5afbcf595",
      "name": "自拍视频提示智能体",
      "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 聊天模型1",
      "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": "获取视频",
      "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": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        360,
        -160
      ],
      "parameters": {
        "width": 260,
        "height": 740,
        "content": "表单提交触发器"
      },
      "typeVersion": 1
    },
    {
      "id": "62e8747a-8dec-4cc2-87cb-f951693d5802",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        -160
      ],
      "parameters": {
        "color": 2,
        "width": 360,
        "height": 740,
        "content": "脚本智能体"
      },
      "typeVersion": 1
    },
    {
      "id": "54b4da07-eff1-4b4a-b064-9ca10a2dfa46",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1020,
        -160
      ],
      "parameters": {
        "color": 6,
        "width": 360,
        "height": 740,
        "content": "发布并等待"
      },
      "typeVersion": 1
    },
    {
      "id": "e8cea2d7-f585-4e74-9f91-a1e978000b12",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1400,
        -160
      ],
      "parameters": {
        "color": 4,
        "width": 500,
        "height": 740,
        "content": "获取视频"
      },
      "typeVersion": 1
    },
    {
      "id": "6d6cbf72-25b1-4a4a-a298-e2c964905dc3",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1920,
        -160
      ],
      "parameters": {
        "color": 3,
        "width": 560,
        "height": 740,
        "content": "发送带视频的外展邮件"
      },
      "typeVersion": 1
    },
    {
      "id": "e15716ce-3231-4a2e-9175-49117a466cb0",
      "name": "发送邮件和视频",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2280,
        40
      ],
      "webhookId": "8768e500-53e3-4e60-942e-5e44da5fda7c",
      "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": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        -160
      ],
      "parameters": {
        "width": 880,
        "height": 1440,
        "content": "🎥 AI驱动的入站视频智能体 - 自动用个性化视频回复潜在客户"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {
    "Wait": [
      {
        "json": {
          "data": {
            "video_id": "968ea5edaf814714b926fb5b58215d3a"
          },
          "error": null
        }
      }
    ],
    "Get Video": [
      {
        "json": {
          "code": 100,
          "data": {
            "id": "968ea5edaf814714b926fb5b58215d3a",
            "error": null,
            "status": "completed",
            "gif_url": "https://resource2.heygen.ai/video/968ea5edaf814714b926fb5b58215d3a/gif.gif",
            "duration": 10.502,
            "video_url": "https://files2.heygen.ai/aws_pacific/avatar_tmp/6d223d0a516749c592dd8f391fb7438c/968ea5edaf814714b926fb5b58215d3a.mp4?Expires=1753366960&Signature=nDiPC094Y90tuwdq3jokqWiUcDJ5lskyF4xyjhY3aTtYcZBqFirv8WJvfpYLw7r2a7ij~dTbWQnHQKGYvO6siB1c~5yzSZIgGolYYmw3VP9poPcM7h5dmtuMMbPo9tRkxbDeon88LPQsasYOtvOVyPd~AZTrNWA~eZPY7kuCvbrRaugHHIfalvi79r46VpSdzUTQtbrcIQNhEQoDNynFDoTwHQXZ97vzYhcvH1em0Zq~4UGeqAo-sT4NZIYdcS3zd0rJ5Kdg0Cv3zXe6rLa~-iwCQ68de~JRzcvfchkUeFYIALDWi3-LfyqM3mjgSXxB7y-3a3hZKcHo2RhzfQdFKA__&Key-Pair-Id=K38HBHX5LX3X2H",
            "created_at": 1752761957,
            "callback_id": null,
            "caption_url": "",
            "thumbnail_url": "https://files2.heygen.ai/aws_pacific/avatar_tmp/6d223d0a516749c592dd8f391fb7438c/968ea5edaf814714b926fb5b58215d3a.jpeg?Expires=1753366960&Signature=CGhoNOzClT0jFhlXANxUWzkBF-zZHEy8eS0XV6Rf~KE8MsHDKEFQGKXByzCM3dCIQ3iLcAIHYvRSRfd2pdjW5xzdttNlZNXZ-L81OaJrrRs2MIWGRGd6F4DBOQBUz9c~Y7IpM-MuLpoNXgkzRMRAPtvD7c4oig9u9PUNdYcSgroZZboEhRD20bJ8W4pcKptlTW8TQqXV1Xi-El4z4AeAqnf6kIRuusG2ei0~SLiCg5Ud1DW1RnzsJo-~WCIEg9vG4JURj6GBIEDwJNCXA8DyZDeyVjHSUIkgi4wS4cKj9vKbgGLk7y1hggRko0jnLSDN3EWElMSuhPs5rsrM13wyAQ__&Key-Pair-Id=K38HBHX5LX3X2H",
            "video_url_caption": null
          },
          "message": "Success"
        }
      }
    ],
    "On form submission": [
      {
        "json": {
          "Name": "Bob",
          "formMode": "test",
          "submittedAt": "2025-07-17T23:43:31.828+08:00",
          "Business URL": "https://www.breathepilates.co.th/",
          "Phone Number": 0,
          "Email Address": "[REDACTED_EMAIL]",
          "What's your biggest pain point (marketing wise)?": "Performance Marketing"
        }
      }
    ],
    "Selfie Video Prompt Agent": [
      {
        "json": {
          "output": "Hey, this is Jason from Purple Unicorn Marketing. Bob, I checked out Breathe Pilates and I know performance marketing is a challenge. Let’s fix that—book a time on my Calendly and let’s boost your results!"
        }
      }
    ]
  },
  "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
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级 - 客户培育, 多模态 AI

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量16
分类2
节点类型9
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者
Automate With Marc

Automate With Marc

@marconi

Automating Start-Up and Business processes. Helping non-techies understand and leverage Agentic AI with easy to understand step-by-step tutorials. Check out my educational content: https://www.youtube.com/@Automatewithmarc

外部链接
在 n8n.io 查看

分享此工作流