This workflow corresponds to n8n.io template #11735 — we link there as the canonical source.
This workflow follows the Agent → Google Drive 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": "4ITR4MrDy48KTQTq",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Generate HeyGen onboarding videos from HR PDFs to Google Drive for Base 44",
"tags": [],
"nodes": [
{
"id": "c36a27ad-1695-4e11-9e72-a6356e21fdf7",
"name": "Wait 10 Seconds",
"type": "n8n-nodes-base.wait",
"position": [
-1136,
496
],
"parameters": {
"amount": 60
},
"typeVersion": 1.1
},
{
"id": "2cc2bd31-3e08-4ed6-8713-815338276ccf",
"name": "Check HeyGen Video Status",
"type": "n8n-nodes-base.httpRequest",
"position": [
-912,
416
],
"parameters": {
"url": "https://api.heygen.com/v1/video_status.get",
"options": {},
"sendQuery": true,
"sendHeaders": true,
"queryParameters": {
"parameters": [
{
"name": "video_id",
"value": "=Your Video ID"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "accept",
"value": "application/json"
},
{
"name": "x-api-key",
"value": "Your Api Key"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "233ab420-7b71-40df-a906-8331aa0f284b",
"name": "Check If Video Completed",
"type": "n8n-nodes-base.if",
"position": [
-464,
496
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 1,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "0bffc679-63bf-4395-b2b6-8d072cee6484",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.data.status }}",
"rightValue": "completed"
}
]
}
},
"typeVersion": 2
},
{
"id": "ab250adf-395f-4b8a-8516-0e40d0c6b2c1",
"name": "Download Completed Video",
"type": "n8n-nodes-base.httpRequest",
"position": [
-240,
496
],
"parameters": {
"url": "={{ $json.data.video_url }}",
"options": {
"response": {
"response": {
"responseFormat": "file"
}
}
}
},
"typeVersion": 4.2
},
{
"id": "8bd79f43-63d1-42c5-9125-5d8a9f610dca",
"name": "Upload Video to Google Drive",
"type": "n8n-nodes-base.googleDrive",
"position": [
-16,
496
],
"parameters": {
"name": "=HR_Onboarding_Video_{{ $now.format('yyyy-MM-dd_HHmmss') }}.mp4",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "1zm4CTaf9mcX34-Bsk9dzQ7r02BROObOO",
"cachedResultUrl": "https://drive.google.com/drive/folders/1zm4CTaf9mcX34-Bsk9dzQ7r02BROObOO",
"cachedResultName": "Sample Dummy Company Document"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 3
},
{
"id": "e52a043e-016a-43e4-8232-f860ab9a9855",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-2240,
496
],
"parameters": {
"text": "=Simplify the following company policy text into clear onboarding instructions for a new employee.\n\nMake the content:\n- easy to understand\n- friendly and conversational\n- accurate and compliant\n- structured by sections\n\nHere is the extracted policy text:\n{{ $json.text }}\n\nFollow the structure defined in the Output Parser and return ONLY valid JSON.\n",
"options": {
"systemMessage": "=You are an expert HR policy analyst who specializes in simplifying complex company policies into clear, concise, employee-friendly onboarding content.\n\nYour responsibilities:\n- Remove legal jargon and unnecessary complexity.\n- Maintain accuracy while making content easy to understand.\n- Convert policy text into structured, step-by-step onboarding guidance.\n- Produce a friendly and welcoming tone suitable for new employees.\n- Preserve important rules, compliance points, and safety guidelines.\n- Avoid adding information that does not exist in the original document.\n\nYou must always produce output ONLY in the structured JSON format defined in the Output Parser.\nDo NOT include explanations, markdown, or additional commentary.\n"
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2
},
{
"id": "644addd5-ccc6-4881-8b6f-982a7356c01a",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
-2032,
720
],
"parameters": {
"jsonSchemaExample": "{\n \"summary\": \"A short 3\u20134 sentence summary of the entire policy in simple language.\",\n \"key_points\": [\n \"A list of all major rules and policies rewritten in easy language.\",\n \"One point per rule or policy section.\",\n \"No legal terminology.\"\n ],\n \"onboarding_instructions\": [\n \"Practical steps new employees should follow based on the policy.\",\n \"Written as actionable, friendly instructions.\"\n ],\n \"compliance_requirements\": [\n \"Clear, simple statements about what employees must legally or formally comply with.\",\n \"Examples: data security, confidentiality, behavior expectations.\"\n ]\n}\n"
},
"typeVersion": 1.3
},
{
"id": "e2b3679d-e356-403a-9cc3-158d951451c9",
"name": "Simple Memory1",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
-2160,
720
],
"parameters": {
"sessionKey": "\"description writer\"",
"sessionIdType": "customKey"
},
"typeVersion": 1.3
},
{
"id": "120b5577-9cad-455a-b28b-034aabbbe65c",
"name": "Extract from File",
"type": "n8n-nodes-base.extractFromFile",
"position": [
-2512,
480
],
"parameters": {
"options": {},
"operation": "pdf"
},
"typeVersion": 1.1
},
{
"id": "b2f42a3d-9d6c-4d82-ac31-aeb6cca22045",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-2288,
720
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini",
"cachedResultName": "gpt-4.1-mini"
},
"options": {},
"responsesApiEnabled": false
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "a82e0bdd-0a28-4a4e-b9a2-da5efc1143fd",
"name": "Structured Output Parser1",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
-1568,
720
],
"parameters": {
"jsonSchemaExample": "{\n \"video_title\": \"A short, friendly title for the onboarding video.\",\n \"intro\": \"A warm onboarding introduction, 2\u20134 sentences.\",\n \"script_sections\": [\n {\n \"section_title\": \"Title for this script section.\",\n \"narration\": \"Natural, flowing narration text for this section. Should sound like a real presenter speaking.\"\n }\n ],\n \"closing\": \"A friendly closing message for the end of the video.\",\n \"full_script\": \"A single combined narration script with all sections merged into one continuous flow, fully suitable for HeyGen.\"\n}\n"
},
"typeVersion": 1.3
},
{
"id": "ad51557e-5ad3-4b1c-8486-a34f641e419b",
"name": "Simple Memory",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
-1696,
720
],
"parameters": {
"sessionKey": "\"description writer\"",
"sessionIdType": "customKey"
},
"typeVersion": 1.3
},
{
"id": "ef287139-96a3-4a7e-9a5c-3fd811256100",
"name": "Generate Script With AI",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1760,
496
],
"parameters": {
"text": "=Using the simplified policy details below, create a professional onboarding video narration script suitable for a HeyGen avatar.\n\nThe final script must:\n- Be conversational, friendly, and natural.\n- Introduce the topic warmly (e.g., \u201cWelcome to the team!\u201d).\n- Break the narration into clear sections or scenes.\n- Include subtle pause markers (like \u201c[pause]\u201d where appropriate).\n- Avoid bullet points inside the narration; write in full flowing sentences.\n- Keep all information accurate to the provided content.\n\nHere is the structured policy information:\n\nSummary:\n{{ $json.output.summary }}\n\nKey Points:\n{{ $json.output.key_points }}\n\nOnboarding Instructions:\n{{ $json.output.onboarding_instructions }}\n\nCompliance Requirements:\n{{ $json.output.compliance_requirements }}\n\nFollow the Output Parser JSON schema exactly and return ONLY valid JSON.\n",
"options": {
"systemMessage": "=You are an expert instructional scriptwriter who specializes in creating professional onboarding video scripts for HR training.\n\nYour responsibilities:\n- Convert structured HR policy content into a natural, friendly, conversational narration suitable for a HeyGen avatar.\n- Ensure the script flows logically, with a warm and welcoming tone.\n- Maintain accuracy while simplifying complex concepts.\n- Avoid robotic or overly formal language.\n- Add natural transitions, pauses, emphasis, and scene suggestions.\n- Do NOT invent new policies; stay faithful to the provided content.\n- Produce output ONLY in the JSON format defined in the Output Parser. \n- Generate the full_script which is easily acceptable by the generate video api.\n\n\n Strict Output Format:\n\n{\n \"video_title\": \"\",\n \"intro\": \"\",\n \"script_sections\": [\n {\n \"section_title\": \"\",\n \"narration\": \"\"\n }\n ],\n \"closing\": \"\",\n \"full_script\": \"\"\n}\n"
},
"promptType": "define",
"hasOutputParser": true
},
"retryOnFail": true,
"typeVersion": 2
},
{
"id": "c2d0b545-f129-4f78-8a90-1c24f22f5df8",
"name": "Create HeyGen Video Task1",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1360,
496
],
"parameters": {
"url": "https://api.heygen.com/v2/video/generate",
"method": "POST",
"options": {},
"jsonBody": "={\n \"caption\": false,\n \"title\": \"{{ $json.output.video_title }}\",\n \"video_inputs\": [\n {\n \"character\": {\n \"type\": \"avatar\",\n \"avatar_id\": \"Your Avatar Id\"\n },\n \"voice\": {\n \"type\": \"text\",\n \"voice_id\": \"Your Voice Id\",\n \"input_text\": \"{{ $json.output.full_script }}\"\n },\n \"background\": {\n \"type\": \"color\",\n \"value\": \"#FFFFFF\"\n }\n }\n ],\n \"dimension\": {\n \"width\": 1280,\n \"height\": 720\n }\n}\n",
"sendBody": true,
"sendHeaders": true,
"specifyBody": "json",
"headerParameters": {
"parameters": [
{
"name": "accept",
"value": "application/json"
},
{
"name": "x-api-key",
"value": "Your Api Key"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "14c8e562-a2cf-4335-b60d-f6bf24d2fb98",
"name": "Wait",
"type": "n8n-nodes-base.wait",
"position": [
-688,
416
],
"parameters": {
"amount": 60
},
"typeVersion": 1.1
},
{
"id": "ceab49c6-d756-4384-8089-6a188d49b3e6",
"name": "OpenAI Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-1824,
720
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini",
"cachedResultName": "gpt-4.1-mini"
},
"options": {},
"responsesApiEnabled": false
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "750bb25a-4d48-493f-a109-1693a93ca77d",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
416,
496
],
"parameters": {
"options": {},
"respondWith": "binary",
"responseDataSource": "set"
},
"typeVersion": 1.4
},
{
"id": "6f6e86da-853b-46b6-91c5-5245b1095327",
"name": "Webhook - Receive Policy PDF",
"type": "n8n-nodes-base.webhook",
"position": [
-2944,
480
],
"parameters": {
"path": "hr-onboarding-upload",
"options": {
"rawBody": false,
"binaryPropertyName": "data"
},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 1.1
},
{
"id": "93ae9ece-dd3e-416d-b95f-1ea2814a5e2d",
"name": "Dowload file",
"type": "n8n-nodes-base.httpRequest",
"position": [
-2704,
480
],
"parameters": {
"url": "={{ $json.body.file_url }}",
"options": {
"response": {
"response": {
"responseFormat": "file"
}
}
}
},
"typeVersion": 4.2
},
{
"id": "44897599-3f45-483a-87d3-bc9dce5b6c92",
"name": "Download file1",
"type": "n8n-nodes-base.googleDrive",
"position": [
192,
496
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"options": {},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 3
},
{
"id": "36b85cd1-43c0-48f3-a7ba-767906a5a6dc",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3008,
-192
],
"parameters": {
"width": 432,
"height": 496,
"content": "## HR Onboarding Video Generator\n\n### How it works\nThis workflow transforms an uploaded HR policy PDF into a polished onboarding video. It begins by receiving a PDF through a webhook, extracting text, and simplifying the policy into clear onboarding guidance through structured AI processing. A second AI step creates a natural, conversational video script, which is sent to HeyGen to generate a video. The workflow checks the video status in a loop until completion, then automatically downloads and stores the final video in Google Drive.\n\n### Setup steps\n**1. Connect credentials** \u2013 Add your Google Drive OAuth2 connection and your HeyGen + OpenAI API keys. \n**2. Configure nodes** \u2013 Replace placeholder IDs (avatar, voice, API keys). Verify the webhook path (`hr-onboarding-upload`). \n**3. Test end-to-end** \u2013 Upload a PDF to the webhook URL, confirm extraction \u2192 script generation \u2192 HeyGen task \u2192 final video stored in Drive.\n"
},
"typeVersion": 1
},
{
"id": "9e2ad384-72ac-4100-87e9-12650d62c807",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3008,
336
],
"parameters": {
"color": 2,
"width": 624,
"height": 336,
"content": "## PDF Intake & Extraction\nHandles the upload of the employee policy PDF and extracts readable text for AI processing. Ensures the document is correctly retrieved before semantic simplification begins.\n"
},
"typeVersion": 1
},
{
"id": "1de15ad1-9777-4dd6-8e64-e5bfd8b1b168",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2336,
368
],
"parameters": {
"color": 2,
"width": 464,
"height": 528,
"content": "## Policy Simplification AI\nConverts raw policy text into clear, structured onboarding content. This stage removes complexity while preserving accuracy, using a JSON-based schema for reliable downstream use.\n"
},
"typeVersion": 1
},
{
"id": "787daf1a-095b-447f-8c90-ed6dc07438d2",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1856,
368
],
"parameters": {
"color": 2,
"width": 416,
"height": 528,
"content": "## Script Generation AI\nTransforms the simplified policy into a natural onboarding video script. Produces titles, sections, and a final full narration optimized for HeyGen input.\n"
},
"typeVersion": 1
},
{
"id": "121026eb-7619-47a5-9f68-77f279e51c5e",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1424,
368
],
"parameters": {
"color": 2,
"width": 1104,
"height": 352,
"content": "## Video Creation Task\nSubmits the script to HeyGen and monitors progress until the video is ready. Uses a timed loop to check the generation status and proceeds only when complete.\n"
},
"typeVersion": 1
},
{
"id": "30a2b3bd-2335-4e58-bfd0-3942a9e1bcd8",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-304,
368
],
"parameters": {
"color": 2,
"width": 928,
"height": 352,
"content": "## Video Download & Delivery\nDownloads the finished video from HeyGen, stores it in Google Drive, and returns the file through the response webhook for client-side use.\n"
},
"typeVersion": 1
},
{
"id": "8d75dd12-2423-4fe2-a48c-825ad03da21e",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
640,
544
],
"parameters": {
"color": 3,
"width": 368,
"content": "## Credentials & Security\nUse OAuth2 for Google Drive and secure API keys for HeyGen and OpenAI. Replace placeholder IDs with your own and avoid storing sensitive keys directly in workflow exports.\n"
},
"typeVersion": 1
}
],
"active": true,
"settings": {
"executionOrder": "v1"
},
"versionId": "bc1a048b-1a83-4a6b-bdb4-ed2ac22e4472",
"connections": {
"Wait": {
"main": [
[
{
"node": "Check If Video Completed",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Generate Script With AI",
"type": "main",
"index": 0
}
]
]
},
"Dowload file": {
"main": [
[
{
"node": "Extract from File",
"type": "main",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "Generate Script With AI",
"type": "ai_memory",
"index": 0
}
]
]
},
"Download file1": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
]
]
},
"Simple Memory1": {
"ai_memory": [
[
{
"node": "AI Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"Wait 10 Seconds": {
"main": [
[
{
"node": "Check HeyGen Video Status",
"type": "main",
"index": 0
}
]
]
},
"Extract from File": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model1": {
"ai_languageModel": [
[
{
"node": "Generate Script With AI",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Generate Script With AI": {
"main": [
[
{
"node": "Create HeyGen Video Task1",
"type": "main",
"index": 0
}
]
]
},
"Check If Video Completed": {
"main": [
[
{
"node": "Download Completed Video",
"type": "main",
"index": 0
}
],
[
{
"node": "Wait 10 Seconds",
"type": "main",
"index": 0
}
]
]
},
"Download Completed Video": {
"main": [
[
{
"node": "Upload Video to Google Drive",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "AI Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Check HeyGen Video Status": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Create HeyGen Video Task1": {
"main": [
[
{
"node": "Wait 10 Seconds",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser1": {
"ai_outputParser": [
[
{
"node": "Generate Script With AI",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Upload Video to Google Drive": {
"main": [
[
{
"node": "Download file1",
"type": "main",
"index": 0
}
]
]
},
"Webhook - Receive Policy PDF": {
"main": [
[
{
"node": "Dowload file",
"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.
googleDriveOAuth2ApiopenAiApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Automate your HR onboarding process by transforming complex policy PDFs into friendly, structured onboarding videos using AI and HeyGen. 📄🎬 This workflow receives HR policy documents via webhook, extracts and simplifies the content with GPT-based AI, generates a natural script…
Source: https://n8n.io/workflows/11735/ — 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.
🧠 Gwen – The AI Voice Marketing Agent Gwen is your intelligent voice-powered marketing assistant built in n8n. She combines the power of OpenAI, ElevenLabs, and automation workflows to handle content
This workflow automates the entire process of taking a raw user-submitted script, rewriting it into a polished HeyGen-ready narration, generating a full avatar video, handling all processing checks, r
Automate multilingual voice content creation by translating an English script into multiple languages and generating natural-sounding audio files using AI. 🌍🎙️ This workflow receives a script via webh
L&D_AgentsAI_ATIVO. Uses httpRequest, agent, googleCalendarTool, toolSerpApi. Webhook trigger; 93 nodes.
This automation is designed to help you generate AI-powered music tracks, cover art, and fully rendered music videos — all triggered from a simple Telegram chat and managed via Google Sheets.