8
n8n 中文网amn8n.com

简历转头像视频

中级

这是一个HR, Multimodal AI领域的自动化工作流,包含 15 个节点。主要使用 If, Wait, Merge, Switch, FormTrigger 等节点。 使用 HeyGen 和 GPT 将简历转换为 AI 生成的个人视频介绍

前置要求
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "MrbVzjLGJ1Mqgivh",
  "meta": {
    "instanceId": "fcb622cbd5234c565b9b78babeaf0ea2455df9d2aad0d1adff7c1ef99583e685",
    "templateCredsSetupCompleted": true
  },
  "name": "Resume to Avatar Video",
  "tags": [],
  "nodes": [
    {
      "id": "c1208aa6-2f60-4e1e-8569-5f65c7f667dc",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        60,
        120
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "ga54eHkT3k6225Zq",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "9b69a382-e29d-424c-8e4d-1a4e053f853e",
      "name": "Avatar upload",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        200,
        280
      ],
      "parameters": {
        "url": "https://upload.heygen.com/v1/talking_photo",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "binaryData",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "image/jpeg"
            },
            {
              "name": "x-api-key",
              "value": "api_key"
            }
          ]
        },
        "inputDataFieldName": "=image"
      },
      "typeVersion": 4.2
    },
    {
      "id": "107095a8-2155-49c2-a9d9-4cead763e4c8",
      "name": "Extract Resume",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -60,
        -20
      ],
      "parameters": {
        "options": {},
        "operation": "pdf",
        "binaryPropertyName": "Resume"
      },
      "typeVersion": 1
    },
    {
      "id": "2ace1783-ab5b-4908-a4f7-1ecaf015ee29",
      "name": "Resume Information Extractor",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        100,
        -20
      ],
      "parameters": {
        "text": "={{ $json.text }}",
        "options": {},
        "attributes": {
          "attributes": [
            {
              "name": "name",
              "required": true,
              "description": "extract name"
            },
            {
              "name": "JobTitle",
              "required": true,
              "description": "extract JobTitle"
            },
            {
              "name": "skill",
              "required": true,
              "description": "extract skill"
            },
            {
              "name": "Education",
              "required": true,
              "description": "extract Education"
            },
            {
              "name": "Summary",
              "required": true,
              "description": "extract Summary"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6a9e4a3b-ad8b-4f35-be47-9a0fecfaa180",
      "name": "Merge Image & Script",
      "type": "n8n-nodes-base.merge",
      "position": [
        820,
        140
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.1
    },
    {
      "id": "e1e02e6e-85ca-42e2-b714-f9a42d52a4f7",
      "name": "Switch to Male & Female",
      "type": "n8n-nodes-base.switch",
      "position": [
        1000,
        140
      ],
      "parameters": {
        "rules": {
          "values": [
            {
              "outputKey": "Male",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "e6be6c7b-ac6b-4dc1-b242-a11afbbbfa2f",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.choices[0].message.content.gender }}",
                    "rightValue": "Male"
                  }
                ]
              },
              "renameOutput": true
            },
            {
              "outputKey": "Female",
              "conditions": {
                "options": {
                  "version": 2,
                  "leftValue": "",
                  "caseSensitive": true,
                  "typeValidation": "strict"
                },
                "combinator": "and",
                "conditions": [
                  {
                    "id": "74004d64-c27f-4026-82f4-0dcd40c7aba3",
                    "operator": {
                      "name": "filter.operator.equals",
                      "type": "string",
                      "operation": "equals"
                    },
                    "leftValue": "={{ $json.choices[0].message.content.gender }}",
                    "rightValue": "Female"
                  }
                ]
              },
              "renameOutput": true
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 3.2
    },
    {
      "id": "9909a437-ee45-443c-8174-fc86416e52f0",
      "name": "Generate Male Voice Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1240,
        40
      ],
      "parameters": {
        "url": "https://api.heygen.com/v2/video/generate",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"video_inputs\": [\n    {\n      \"character\": {\n        \"type\": \"talking_photo\",\n        \"talking_photo_id\": \"{{ $json.data.talking_photo_id }}\"\n      },\n      \"voice\": {\n        \"type\": \"text\",\n        \"input_text\": \"{{ $json.choices[0].message.content.script }}\",\n        \"voice_id\": \"2cfa7550c4dc41c7bd1b0751e7903332\"\n      },\n      \"background\": {\n        \"type\": \"color\",\n        \"value\": \"#FAFAFA\"\n      }\n    }\n  ]\n} ",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Api-Key",
              "value": "api_key"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "7a3caa15-5577-4176-a1b6-5143a0295e98",
      "name": "Generate Female Voice Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1240,
        240
      ],
      "parameters": {
        "url": "https://api.heygen.com/v2/video/generate",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"video_inputs\": [\n    {\n      \"character\": {\n        \"type\": \"talking_photo\",\n        \"talking_photo_id\": \"{{ $json.data.talking_photo_id }}\"\n      },\n      \"voice\": {\n        \"type\": \"text\",\n        \"input_text\": \"{{ $json.choices[0].message.content.script }}\",\n        \"voice_id\": \"293ebc69dad345fc9dd1d542bc900673\"\n      },\n      \"background\": {\n        \"type\": \"color\",\n        \"value\": \"#FAFAFA\"\n      }\n    }\n  ]\n} ",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "X-Api-Key",
              "value": "api_key"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "5ca1f3e9-07d9-4ea3-9809-9d26edcfdafc",
      "name": "等待",
      "type": "n8n-nodes-base.wait",
      "position": [
        1460,
        140
      ],
      "webhookId": "579406aa-091d-4ab6-a0dd-3757d9301b0e",
      "parameters": {
        "unit": "minutes",
        "amount": 3
      },
      "typeVersion": 1.1
    },
    {
      "id": "e6a4dcc0-e15f-4dd3-a02d-88aee2a83aab",
      "name": "Check Status Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1660,
        140
      ],
      "parameters": {
        "url": "=https://api.heygen.com/v1/video_status.get?video_id={{ $json.data.video_id }}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            },
            {
              "name": "X-Api-Key",
              "value": "api_key"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "bc65449a-a773-47f1-82a2-40e65ac137cf",
      "name": "Generate Script & Find Gender",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        420,
        -20
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=- Name: {{ $json.output.name }}\n- Job Title: {{ $json.output.JobTitle }}\n- Skills: {{ $json.output.skill }}\n- Education: {{ $json.output.Education }}\n- Summary: {{ $json.output.Summary }}"
            },
            {
              "role": "system",
              "content": "=You are an AI assistant trained to:\n\n1. Predict the most likely gender associated with a given human name.\n2. Write a friendly, confident, and concise 30-second video self-introduction script based on that name.\n\nInstructions:\n- Use cultural context if provided (e.g., India, USA, etc.) to infer gender more accurately.\n- If a name is unisex or unclear, respond with “Unisex” or “Unknown” accordingly.\n- Keep the tone of the script warm, professional, and engaging.\n- Use only the full name provided.\n- Do NOT fabricate background details. Keep it general and personal.\n\nInput:\nName: {{ $json.output.name }}\nRegion (optional): {{ $json.output.region }}\n\nOutput JSON format:\n{\n  \"gender\": \"Male | Female\",\n  \"script\": \"\"\n}\n"
            }
          ]
        },
        "simplify": false,
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "id": "ga54eHkT3k6225Zq",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "2bb9f4ec-594d-4705-a176-8d3f0a07bf7c",
      "name": "Append video",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2080,
        140
      ],
      "parameters": {
        "columns": {
          "value": {
            "Photo": "={{ $('Talk image id generate').item.json.data.talking_photo_url }}",
            "Script": "={{ $('Generate Script & Find Gender').item.json.choices[0].message.content.script }}",
            "Video Url": "={{ $json.data.video_url }}",
            "Talking Photo ID": "={{ $('Talk image id generate').item.json.data.talking_photo_id }}"
          },
          "schema": [
            {
              "id": "Talking Photo ID",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Talking Photo ID",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Photo",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Photo",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Script",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Script",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Video Url",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Video Url",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jQtu4ZREsMge8elB-6xJoOMDMKsJLqof2dDmh0sxqWk/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1jQtu4ZREsMge8elB-6xJoOMDMKsJLqof2dDmh0sxqWk",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1jQtu4ZREsMge8elB-6xJoOMDMKsJLqof2dDmh0sxqWk/edit?usp=drivesdk",
          "cachedResultName": "Image talk video"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "cOspDa8h1hkwDLvX",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4.5
    },
    {
      "id": "019758c0-338b-49f4-a26c-13a60fd63e06",
      "name": "Upload Resume & Photo",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -320,
        125
      ],
      "webhookId": "d24aa04a-9b7d-41e8-8d0a-3dd1ccdbb9fb",
      "parameters": {
        "options": {},
        "formTitle": "Create video using Resume and Image",
        "formFields": {
          "values": [
            {
              "fieldType": "file",
              "fieldLabel": "image",
              "multipleFiles": false,
              "requiredField": true,
              "acceptFileTypes": ".jpeg, .png, .jpg"
            },
            {
              "fieldType": "file",
              "fieldLabel": "Resume",
              "multipleFiles": false,
              "requiredField": true,
              "acceptFileTypes": ".pdf, .docs"
            }
          ]
        },
        "formDescription": "Upload Image and Resume"
      },
      "typeVersion": 2.2
    },
    {
      "id": "9211094b-7a74-48a3-aacb-da6eb725c904",
      "name": "Video is Complated or Not",
      "type": "n8n-nodes-base.if",
      "position": [
        1860,
        140
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "41275522-0868-4901-8d9e-88c0a50166f6",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.data.status }}",
              "rightValue": "completed"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "5579bf47-7793-4b93-b418-b8bdfd0ed5f8",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -360,
        -220
      ],
      "parameters": {
        "width": 560,
        "height": 120,
        "content": "## 示例Google Sheet"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "5e819b9d-4bab-4d34-a99b-653483fc65da",
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Check Status Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Resume": {
      "main": [
        [
          {
            "node": "Resume Information Extractor",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Resume Information Extractor",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Check Status Video": {
      "main": [
        [
          {
            "node": "Video is Complated or Not",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Image & Script": {
      "main": [
        [
          {
            "node": "Switch to Male & Female",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Resume & Photo": {
      "main": [
        [
          {
            "node": "Extract Resume",
            "type": "main",
            "index": 0
          },
          {
            "node": "Talk image id generate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Talk image id generate": {
      "main": [
        [
          {
            "node": "Merge Image & Script",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Switch to Male & Female": {
      "main": [
        [
          {
            "node": "Generate Male Voice Video",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Generate Female Voice Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Male Voice Video": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Video is Complated or Not": {
      "main": [
        [
          {
            "node": "Append video",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Female Voice Video": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Resume Information Extractor": {
      "main": [
        [
          {
            "node": "Generate Script & Find Gender",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Script & Find Gender": {
      "main": [
        [
          {
            "node": "Merge Image & Script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 人力资源, 多模态 AI

需要付费吗?

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

工作流信息
难度等级
中级
节点数量15
分类2
节点类型12
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
InfyOm Technologies

InfyOm Technologies

@infyom

We are an AI Automation Agency focusing on various AI Automation Services like, workflow automation, shopify automation, chatbot developerment, custom ai agent development and more.

外部链接
在 n8n.io 查看

分享此工作流