Automatización del consentimiento de los padres
Este es unDocument Extractionflujo de automatización del dominio deautomatización que contiene 22 nodos.Utiliza principalmente nodos como If, Code, Gmail, Webhook, GoogleDrive. Automatización de los formularios de consentimiento para viajes escolares con verificación de correo electrónico, generación de PDF y Google Drive
- •Cuenta de Google y credenciales de API de Gmail
- •Punto final de HTTP Webhook (n8n generará automáticamente)
- •Credenciales de API de Google Drive
- •Pueden requerirse credenciales de autenticación para la API de destino
Nodos utilizados (22)
Categoría
{
"id": "",
"meta": {
"instanceId": "",
"templateCredsSetupCompleted": false
},
"name": "Parent_Consent_Automation",
"tags": [],
"nodes": [
{
"id": "40acca4a-8547-4085-9786-4f8726b64bd9",
"name": "Nota Adhesiva - Descripción del Flujo de Trabajo",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1664,
-256
],
"parameters": {
"width": 300,
"height": 356,
"content": "## 🎯 WORKFLOW START\n\n**Purpose:** Automated Parent Consent System for School Trips\n\n**Trigger:** POST request from Postman or any form\n\n**Expected Input:**\n- parent_name\n- parent_email\n- child_name\n- child_class\n- trip_name\n- trip_date\n- teacher_email"
},
"typeVersion": 1
},
{
"id": "ac6c7f7b-2a2c-4b5a-aafe-91d57abd167d",
"name": "Nota Adhesiva - Configuración de Credenciales",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1680,
112
],
"parameters": {
"width": 324,
"height": 440,
"content": "## 🔑 SETUP CREDENTIALS\n\n**Required Accounts & API Keys:**\n\n1. **VerifiEmail**\n - Sign up: https://verifi.email\n - Get API key from dashboard\n\n2. **Google Account (Drive + Gmail)**\n - Use OAuth2 authentication\n\n3. **HTMLCSSToPDF**\n - Sign up: https://pdfmunk.com\n - Get API key\n\n"
},
"typeVersion": 1
},
{
"id": "55ca0865-5dff-4f11-8a0e-2051cc12bda3",
"name": "Webhook Trigger",
"type": "n8n-nodes-base.webhook",
"position": [
-1200,
432
],
"webhookId": "YOUR_WEBHOOK_ID",
"parameters": {
"path": "consent",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 1
},
{
"id": "546d534e-15d6-4934-a0de-ea9f7298970d",
"name": "Nota Adhesiva - Webhook",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1328,
112
],
"parameters": {
"width": 380,
"height": 456,
"content": "## 📥 STEP 1: Webhook Trigger\n\n**What it does:**\n- Receives POST request with parent consent data\n- Captures all form fields\n\n```json\n{\n \"parent_name\": \"Ritu Sharma\",\n \"parent_email\": \"ritu.sharma@gmail.com\",\n \"child_name\": \"Aarav Sharma\",\n \"child_class\": \"Grade 5-A\",\n \"trip_name\": \"Science Museum Visit\",\n \"trip_date\": \"2025-11-10\",\n \"teacher_email\": \"teacher@school.edu\"\n}\n```"
},
"typeVersion": 1
},
{
"id": "63a23027-d8b5-4609-838b-7aaaaa692917",
"name": "Nota Adhesiva - VerifiEmail",
"type": "n8n-nodes-base.stickyNote",
"position": [
-944,
272
],
"parameters": {
"width": 360,
"height": 308,
"content": "## 📧 STEP 2: Email Verification\n\n**What it does:**\n- Validates parent email is real\n- Checks for disposable/temporary emails\n- Prevents fraud and fake submissions\n"
},
"typeVersion": 1
},
{
"id": "2cf4c083-899f-43a0-ba3a-39a67eb21c65",
"name": "IF Correo Electrónico Válido",
"type": "n8n-nodes-base.if",
"position": [
-448,
432
],
"parameters": {
"conditions": {
"boolean": [
{
"value1": "={{ $json.valid }}",
"value2": "={{ true }}"
}
]
}
},
"typeVersion": 1
},
{
"id": "a59174ce-50f3-479a-8656-9b2fe9af0718",
"name": "Nota Adhesiva - IF Validación",
"type": "n8n-nodes-base.stickyNote",
"position": [
-576,
208
],
"parameters": {
"width": 340,
"height": 364,
"content": "## ✅ STEP 3: Validation Check\n\n**What it does:**\n- Checks if email valid = 'true'\n- Creates two paths: TRUE or FALSE\n\n**TRUE path:** Continue workflow\n**FALSE path:** Send error response & stop\n\n"
},
"typeVersion": 1
},
{
"id": "8f2140b2-9a2c-4e08-a1bf-0037426d9495",
"name": "Respuesta de Error - Correo Inválido",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
-112,
608
],
"parameters": {
"options": {
"responseCode": 400
},
"respondWith": "json",
"responseBody": "={\n \"status\": \"error\",\n \"message\": \"Invalid email address provided. Please use a valid email.\",\n \"email_checked\": \"{{ $json.parent_email }}\",\n \"reason\": \"Email verification failed\"\n}"
},
"typeVersion": 1
},
{
"id": "13776c5c-32bc-426f-b323-009785b0b4d0",
"name": "Nota Adhesiva - Manejador de Errores",
"type": "n8n-nodes-base.stickyNote",
"position": [
-208,
592
],
"parameters": {
"width": 288,
"height": 472,
"content": "\n\n\n\n\n\n\n\n\n\n\n\n\n## ❌ ERROR HANDLER\n\n**Triggers when:** Email is invalid\n\n**Action:**\n- Send 400 error response\n- Include error message\n- Stop workflow execution\n\n**Response sent to user:**\n- Status: error\n- Message: Invalid email\n- Reason: Verification failed"
},
"typeVersion": 1
},
{
"id": "432c992b-205a-4456-a219-cbf185a09c31",
"name": "Generar ID de Consentimiento",
"type": "n8n-nodes-base.code",
"position": [
-96,
240
],
"parameters": {
"jsCode": "// Generate unique consent ID with timestamp\nconst consentId = \"CONSENT-\" + Date.now();\nconst timestamp = new Date().toISOString();\nconst formattedDate = new Date().toLocaleDateString('en-IN', {\n day: '2-digit',\n month: 'long',\n year: 'numeric'\n});\n\nreturn [{\n json: {\n ...items[0].json, // Keep all previous data\n consent_id: consentId,\n generated_at: timestamp,\n generated_date: formattedDate\n }\n}];"
},
"typeVersion": 2
},
{
"id": "3010ab23-55cd-4f78-947a-2660a02910bf",
"name": "Nota Adhesiva - Generar ID",
"type": "n8n-nodes-base.stickyNote",
"position": [
-224,
-80
],
"parameters": {
"width": 340,
"height": 460,
"content": "## 🔢 STEP 4: Generate Unique ID\n\n**What it does:**\n- Creates unique consent ID using timestamp\n- Format: CONSENT-1699123456789\n- Adds generation timestamp (ISO format)\n- Adds formatted date for display\n\n**Why important:**\n- Tracks each consent uniquely\n- Prevents duplicates\n- Legal reference number\n- Audit trail"
},
"typeVersion": 1
},
{
"id": "5d456acf-aadc-47bc-a228-de4bbd2eeb85",
"name": "Nota Adhesiva - HTML a PDF",
"type": "n8n-nodes-base.stickyNote",
"position": [
128,
64
],
"parameters": {
"width": 328,
"height": 324,
"content": "## 📑 STEP 5: Convert to PDF\n\n**What it does:**\n- Converts HTML to PDF document\n- A4 format with margins\n- Print-ready quality\n- Legal document format\n\n"
},
"typeVersion": 1
},
{
"id": "81ee82d8-bb11-408c-b41c-b48b9368c180",
"name": "Subir a Google Drive",
"type": "n8n-nodes-base.googleDrive",
"position": [
768,
240
],
"parameters": {
"name": "={{ $('Webhook Trigger').item.json.body.child_name .replace(/ /g, '_') }}_{{ $('Generate Consent ID').item.json.consent_id }}.pdf",
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive",
"cachedResultUrl": "https://drive.google.com/drive/my-drive",
"cachedResultName": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "YOUR_GOOGLE_DRIVE_FOLDER_ID",
"cachedResultUrl": "https://drive.google.com/drive/folders/YOUR_GOOGLE_DRIVE_FOLDER_ID",
"cachedResultName": "School_Consents"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "YOUR_GOOGLE_DRIVE_OAUTH2_API_ID",
"name": "Google Drive OAuth2"
}
},
"typeVersion": 3
},
{
"id": "6d7483d8-627d-48fe-a28e-8b0994887568",
"name": "Nota Adhesiva - Google Drive",
"type": "n8n-nodes-base.stickyNote",
"position": [
720,
-32
],
"parameters": {
"width": 248,
"height": 428,
"content": "## ☁️ STEP 7: Upload to Google Drive\n\n**Folder structure:**\n/School_Consents\n └─ 2025\n └─ November\n └─ {files}\n\n**File naming:**\n{ChildName}_{ConsentID}.pdf\n"
},
"typeVersion": 1
},
{
"id": "89f78dcf-6246-4e1f-a59a-31e93296e126",
"name": "Enviar Gmail al Profesor",
"type": "n8n-nodes-base.gmail",
"position": [
1056,
240
],
"webhookId": "YOUR_WEBHOOK_ID",
"parameters": {
"sendTo": "={{ $json.teacher_email }}",
"message": "=Hello Teacher,\n\nA new parent consent form has been verified and securely stored.\n\n📋 CONSENT DETAILS:\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n• Consent ID: {{ $('Generate Consent ID').item.json.consent_id }}\n• Child Name: {{ $('Webhook Trigger').item.json.body.child_name }}\n• Class: {{ $('Webhook Trigger').item.json.body.child_class }}\n• Trip Name: {{ $('Webhook Trigger').item.json.body.trip_name }}\n• Trip Date: {{ $('Webhook Trigger').item.json.body.trip_date }}\n• Parent/Guardian: {{ $('Webhook Trigger').item.json.body.parent_name }}\n• Email: {{ $('Webhook Trigger').item.json.body.parent_email }} ✓ (Verified)\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n📁 DOCUMENT LOCATION:\nThe signed PDF consent form is available in Google Drive:\nFolder: School_Consents/2025/November\nFile:{{ $('Webhook Trigger').item.json.body.child_name }} _{{ $('Generate Consent ID').item.json.consent_id }}.pdf\n\n⏰ GENERATED:\n{{ $('Generate Consent ID').item.json.generated_date }}\n{{ $('Generate Consent ID').item.json.generated_at }}\n\n━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n🤖 School Automation System\nThis is an automated message. Please do not reply.\n\nFor questions, contact school administration.",
"options": {},
"subject": "=New Consent Received: {{ $('Webhook Trigger').item.json.body.child_name }} - {{ $('Webhook Trigger').item.json.body.trip_name }}",
"emailType": "text"
},
"credentials": {
"gmailOAuth2": {
"id": "YOUR_GMAIL_OAUTH2_API_ID",
"name": "Gmail OAuth2"
}
},
"typeVersion": 2.1
},
{
"id": "51aedaa7-c489-4d5a-8df7-9c16418aa550",
"name": "Nota Adhesiva - Notificación Gmail",
"type": "n8n-nodes-base.stickyNote",
"position": [
976,
0
],
"parameters": {
"width": 360,
"height": 396,
"content": "## 📧 STEP 8: Notify Teacher\n\n**What it does:**\n- Sends email to class teacher\n- Includes all consent details\n- Provides Drive link reference\n- Confirmation of verification\n\n**Sent to:** teacher_email (from webhook)\n**From:** Your Gmail account\n"
},
"typeVersion": 1
},
{
"id": "adab41f5-05ed-4192-9df3-5f67cf913839",
"name": "Respuesta de Éxito",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1392,
240
],
"parameters": {
"options": {
"responseCode": 200
},
"respondWith": "json",
"responseBody": "={\n \"status\": \"success\",\n \"message\": \"Parent consent form verified and stored successfully\",\n \"data\": {\n \"consent_id\": \"{{ $json.consent_id }}\",\n \"child_name\": \"{{ $json.child_name }}\",\n \"child_class\": \"{{ $json.child_class }}\",\n \"trip_name\": \"{{ $json.trip_name }}\",\n \"trip_date\": \"{{ $json.trip_date }}\",\n \"parent_name\": \"{{ $json.parent_name }}\",\n \"parent_email\": \"{{ $json.parent_email }}\",\n \"email_verified\": true,\n \"stored_at\": \"Google Drive\",\n \"teacher_notified\": true,\n \"generated_at\": \"{{ $json.generated_at }}\"\n }\n}"
},
"typeVersion": 1
},
{
"id": "e269bd4a-4952-4b3b-8ee9-3c6de13ee814",
"name": "Nota Adhesiva - Respuesta de Éxito",
"type": "n8n-nodes-base.stickyNote",
"position": [
1344,
-16
],
"parameters": {
"width": 360,
"height": 396,
"content": "## ✅ STEP 9: Send Success Response\n\n**Response includes:**\n- Status: success\n- Consent ID\n- All submission data\n- Verification status\n- Storage confirmation\n- Teacher notification status\n"
},
"typeVersion": 1
},
{
"id": "ff2c31b9-0424-4d95-bb47-866f01653348",
"name": "Verifi Email",
"type": "n8n-nodes-verifiemail.verifiEmail",
"position": [
-832,
432
],
"parameters": {
"email": "={{ $json.body.parent_email }}"
},
"credentials": {
"verifiEmailApi": {
"id": "YOUR_VERIFI_EMAIL_API_ID",
"name": "VerifiEmail API"
}
},
"typeVersion": 1
},
{
"id": "bca1df93-c9d8-4b43-83ed-d4cc367a048c",
"name": "HTML a PDF1",
"type": "n8n-nodes-htmlcsstopdf.htmlcsstopdf",
"position": [
192,
240
],
"parameters": {
"html_content": "=<!DOCTYPE html>\n<html>\n<head>\n <style>\n body { \n font-family: Arial, sans-serif; \n margin: 0; \n padding: 20px;\n background: #f5f5f5;\n }\n .container { \n border: 3px solid #2A3E8D; \n padding: 40px; \n max-width: 700px; \n margin: 0 auto;\n background: white;\n box-shadow: 0 4px 6px rgba(0,0,0,0.1);\n }\n .header { \n text-align: center; \n color: #2A3E8D; \n border-bottom: 3px solid #2A3E8D;\n padding-bottom: 20px;\n margin-bottom: 30px;\n }\n .header h1 {\n margin: 0;\n font-size: 24px;\n text-transform: uppercase;\n }\n .header p {\n margin: 10px 0 0 0;\n font-size: 14px;\n color: #666;\n }\n .consent-id {\n background: #ffeaa7;\n padding: 15px;\n font-weight: bold;\n text-align: center;\n margin-bottom: 25px;\n border: 2px dashed #f39c12;\n font-size: 16px;\n letter-spacing: 1px;\n }\n .field { \n margin: 15px 0; \n padding: 12px;\n background: #f8f9fa;\n border-left: 4px solid #2A3E8D;\n }\n .label { \n font-weight: bold; \n color: #333;\n display: inline-block;\n width: 180px;\n }\n .value {\n color: #2A3E8D;\n font-weight: 600;\n }\n .signature-box {\n margin-top: 50px;\n padding: 25px;\n background: #f8f9fa;\n border: 2px solid #ddd;\n }\n .signature-line {\n border-bottom: 2px solid #000;\n width: 350px;\n height: 60px;\n margin-top: 15px;\n margin-bottom: 10px;\n }\n .footer {\n margin-top: 40px;\n font-size: 11px;\n color: #666;\n border-top: 2px solid #ddd;\n padding-top: 20px;\n text-align: center;\n line-height: 1.6;\n }\n .verified-badge {\n display: inline-block;\n background: #00b894;\n color: white;\n padding: 3px 10px;\n border-radius: 12px;\n font-size: 11px;\n margin-left: 8px;\n }\n </style>\n</head>\n<body>\n <div class=\"container\">\n <div class=\"header\">\n <h1>🏫 OFFICIAL SCHOOL TRIP CONSENT FORM</h1>\n <p>Academic Year 2025-2026</p>\n </div>\n \n <div class=\"consent-id\">\n 📋 CONSENT ID: {{ $json.consent_id }}\n </div>\n \n <div class=\"field\">\n <span class=\"label\">Child Name:</span>\n <span class=\"value\">{{ $('Webhook Trigger').item.json.body.child_name }}</span>\n </div>\n \n <div class=\"field\">\n <span class=\"label\">Class:</span>\n <span class=\"value\">{{ $('Webhook Trigger').item.json.body.child_class }}</span>\n </div>\n \n <div class=\"field\">\n <span class=\"label\">Trip Name:</span>\n <span class=\"value\">{{ $('Webhook Trigger').item.json.body.trip_name }}</span>\n </div>\n \n <div class=\"field\">\n <span class=\"label\">Trip Date:</span>\n <span class=\"value\">{{ $('Webhook Trigger').item.json.body.trip_date }}</span>\n </div>\n \n <div class=\"field\">\n <span class=\"label\">Parent/Guardian Name:</span>\n <span class=\"value\">{{ $('Webhook Trigger').item.json.body.parent_name }}</span>\n </div>\n \n <div class=\"field\">\n <span class=\"label\">Email Address:</span>\n <span class=\"value\">{{ $('Webhook Trigger').item.json.body.parent_email }}</span>\n <span class=\"verified-badge\">✓ VERIFIED</span>\n </div>\n \n <div class=\"signature-box\">\n <p style=\"margin: 0 0 10px 0;\"><strong>I hereby give consent for my child to participate in the above-mentioned school trip.</strong></p>\n <p style=\"margin: 0 0 20px 0; font-size: 13px; color: #666;\">Parent/Guardian Signature:</p>\n <div class=\"signature-line\"></div>\n <p style=\"margin: 5px 0 0 0; font-size: 13px; color: #666;\">Date: {{ $json.generated_date }}</p>\n </div>\n \n <div class=\"footer\">\n <p><strong>⚠️ OFFICIAL DOCUMENT</strong></p>\n <p>This is an auto-generated, digitally verified consent document.</p>\n <p>Generated on: {{ $json.generated_date }} at {{ $json.generated_at }}</p>\n <p style=\"margin-top: 12px; color: #e74c3c;\">This document is legally binding. Do not share without proper authorization.</p>\n </div>\n </div>\n</body>\n</html>"
},
"credentials": {
"htmlcsstopdfApi": {
"id": "YOUR_HTML_TO_PDF_API_ID",
"name": "HTML to PDF API"
}
},
"typeVersion": 1
},
{
"id": "e26160b3-dd9f-41ab-a49d-9e44caa79661",
"name": "Descargar archivo",
"type": "n8n-nodes-base.httpRequest",
"position": [
528,
240
],
"parameters": {
"url": "={{ $json.pdf_url }}",
"options": {
"response": {
"response": {
"responseFormat": "file"
}
}
}
},
"typeVersion": 4.2
},
{
"id": "7dc57259-a438-4967-a494-c993e1e798d7",
"name": "Nota Adhesiva",
"type": "n8n-nodes-base.stickyNote",
"position": [
464,
112
],
"parameters": {
"height": 272,
"content": "## Download the PDF \n**What it does**:\n\n- GETs the PDF file through URL"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "",
"connections": {
"bca1df93-c9d8-4b43-83ed-d4cc367a048c": {
"main": [
[
{
"node": "e26160b3-dd9f-41ab-a49d-9e44caa79661",
"type": "main",
"index": 0
}
]
]
},
"ff2c31b9-0424-4d95-bb47-866f01653348": {
"main": [
[
{
"node": "2cf4c083-899f-43a0-ba3a-39a67eb21c65",
"type": "main",
"index": 0
}
]
]
},
"e26160b3-dd9f-41ab-a49d-9e44caa79661": {
"main": [
[
{
"node": "81ee82d8-bb11-408c-b41c-b48b9368c180",
"type": "main",
"index": 0
}
]
]
},
"2cf4c083-899f-43a0-ba3a-39a67eb21c65": {
"main": [
[
{
"node": "432c992b-205a-4456-a219-cbf185a09c31",
"type": "main",
"index": 0
}
],
[
{
"node": "8f2140b2-9a2c-4e08-a1bf-0037426d9495",
"type": "main",
"index": 0
}
]
]
},
"55ca0865-5dff-4f11-8a0e-2051cc12bda3": {
"main": [
[
{
"node": "ff2c31b9-0424-4d95-bb47-866f01653348",
"type": "main",
"index": 0
}
]
]
},
"432c992b-205a-4456-a219-cbf185a09c31": {
"main": [
[
{
"node": "bca1df93-c9d8-4b43-83ed-d4cc367a048c",
"type": "main",
"index": 0
}
]
]
},
"89f78dcf-6246-4e1f-a59a-31e93296e126": {
"main": [
[
{
"node": "adab41f5-05ed-4192-9df3-5f67cf913839",
"type": "main",
"index": 0
}
]
]
},
"81ee82d8-bb11-408c-b41c-b48b9368c180": {
"main": [
[
{
"node": "89f78dcf-6246-4e1f-a59a-31e93296e126",
"type": "main",
"index": 0
}
]
]
}
}
}¿Cómo usar este flujo de trabajo?
Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.
¿En qué escenarios es adecuado este flujo de trabajo?
Avanzado - Extracción de documentos
¿Es de pago?
Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.
Flujos de trabajo relacionados recomendados
Jitesh Dugar
@jiteshdugarAI Automation Specialist - OpenAI, CRM & Automation Expert with a solid understanding of various tools that include Zapier, Make, Zoho CRM, Hubspot, Google Sheets, Airtable, Pipedrive, Google Analytics, and more.
Compartir este flujo de trabajo