Mi flujo de trabajo 2
Este es unMiscellaneous, AI Summarizationflujo de automatización del dominio deautomatización que contiene 14 nodos.Utiliza principalmente nodos como Code, EmailSend, ScheduleTrigger, ScrapegraphAi. Automatizar el monitoreo de cumplimiento normativo con ScrapeGraphAI y alertas por correo electrónico
- •No hay requisitos previos especiales, puede importar y usarlo directamente
Nodos utilizados (14)
Categoría
{
"id": "VhEwspDqzu7ssFVE",
"meta": {
"instanceId": "f4b0efaa33080e7774e0d9285c40c7abcd2c6f7cf1a8b901fa7106170dd4cda3",
"templateCredsSetupCompleted": true
},
"name": "My workflow 2",
"tags": [
{
"id": "DxXGubfBzRKh6L8T",
"name": "Revenue Optimization",
"createdAt": "2025-07-25T16:24:30.370Z",
"updatedAt": "2025-07-25T16:24:30.370Z"
},
{
"id": "IxkcJ2IpYIxivoHV",
"name": "Content Strategy",
"createdAt": "2025-07-25T12:57:37.677Z",
"updatedAt": "2025-07-25T12:57:37.677Z"
},
{
"id": "PAKIJ2Mm9EvRcR3u",
"name": "Trend Monitoring",
"createdAt": "2025-07-25T12:57:37.670Z",
"updatedAt": "2025-07-25T12:57:37.670Z"
},
{
"id": "YtfXmaZk44MYedPO",
"name": "Dynamic Pricing",
"createdAt": "2025-07-25T16:24:30.369Z",
"updatedAt": "2025-07-25T16:24:30.369Z"
}
],
"nodes": [
{
"id": "084f3e30-edcd-41a6-a8d4-9b5c003bec82",
"name": "Disparador programado",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
240,
368
],
"parameters": {
"rule": {
"interval": [
{
"field": "cronExpression"
}
]
}
},
"typeVersion": 1.2
},
{
"id": "0ed22ae1-9405-4006-950f-0a56c59bf7da",
"name": "ScrapeGraphAI",
"type": "n8n-nodes-scrapegraphai.scrapegraphAi",
"position": [
944,
624
],
"parameters": {
"userPrompt": "Extract regulatory changes and new rules from this government site. Use the following schema for response: { \"title\": \"Rule Title\", \"agency\": \"SEC\", \"publication_date\": \"2025-01-15\", \"effective_date\": \"2025-03-15\", \"summary\": \"Brief description of the rule\", \"impact_level\": \"High/Medium/Low\", \"affected_sectors\": [\"Financial Services\", \"Banking\"], \"document_url\": \"https://federalregister.gov/...\", \"rule_type\": \"Final Rule/Proposed Rule/Notice\", \"comment_deadline\": \"2025-02-15\" }",
"websiteUrl": "https://www.federalregister.gov/documents/search?conditions%5Bagencies%5D%5B%5D=securities-and-exchange-commission&conditions%5Bpublication_date%5D%5Bgte%5D={{ $now.minus({ days: 1 }).toISODate() }}"
},
"typeVersion": 1
},
{
"id": "f82dfb15-b15a-4436-8256-082f4169de47",
"name": "Regulation Parser",
"type": "n8n-nodes-base.code",
"notes": "Parse and clean\nregulatory data\nfrom scraping",
"position": [
1680,
368
],
"parameters": {
"jsCode": "// Get the input data from ScrapeGraphAI\nconst inputData = $input.all()[0].json;\n\n// Extract regulatory changes array from result\nconst regulations = inputData.result.regulatory_changes || inputData.result.rules || inputData.result.regulations || inputData.regulations || [];\n\nfunction parseRegulation(regulation) {\n const {\n title,\n agency,\n publication_date,\n effective_date,\n summary,\n impact_level,\n affected_sectors,\n document_url,\n rule_type,\n comment_deadline\n } = regulation;\n\n // Clean and validate data\n const cleanTitle = title?.trim() || 'Title not available';\n const cleanAgency = agency?.trim() || 'Agency not specified';\n const cleanSummary = summary?.trim() || 'Summary not available';\n const cleanImpactLevel = impact_level || 'Medium';\n const cleanRuleType = rule_type || 'Unknown';\n const cleanUrl = document_url || '#';\n \n // Parse dates\n const pubDate = publication_date ? new Date(publication_date).toLocaleDateString() : 'Not specified';\n const effDate = effective_date ? new Date(effective_date).toLocaleDateString() : 'Not specified';\n const commentDate = comment_deadline ? new Date(comment_deadline).toLocaleDateString() : 'N/A';\n \n // Handle sectors array\n const sectors = Array.isArray(affected_sectors) ? affected_sectors : (affected_sectors ? [affected_sectors] : ['General']);\n \n return {\n title: cleanTitle,\n agency: cleanAgency,\n publication_date: pubDate,\n effective_date: effDate,\n summary: cleanSummary,\n impact_level: cleanImpactLevel,\n affected_sectors: sectors,\n document_url: cleanUrl,\n rule_type: cleanRuleType,\n comment_deadline: commentDate,\n parsed_at: new Date().toISOString()\n };\n}\n\n// Debug log\nconsole.log(`Found ${regulations.length} regulatory changes`);\n\n// Return each regulation as separate execution with parsed data\nreturn regulations.map(regulation => ({\n json: parseRegulation(regulation)\n}));"
},
"notesInFlow": true,
"typeVersion": 2
},
{
"id": "0027ecda-5b32-4cfa-b0b4-dac6c967f548",
"name": "Impact Assessor",
"type": "n8n-nodes-base.code",
"notes": "Assess business\nimpact and risk\nlevels",
"position": [
2448,
480
],
"parameters": {
"jsCode": "// Get parsed regulation data\nconst regulation = $input.all()[0].json;\n\n// Define impact assessment criteria\nfunction assessImpact(regulation) {\n const { title, summary, affected_sectors, rule_type, agency } = regulation;\n \n let impactScore = 0;\n let riskFactors = [];\n let opportunities = [];\n let complianceActions = [];\n \n // Impact scoring based on rule type\n switch (rule_type.toLowerCase()) {\n case 'final rule':\n impactScore += 3;\n complianceActions.push('Immediate compliance review required');\n break;\n case 'proposed rule':\n impactScore += 2;\n complianceActions.push('Prepare comment response');\n break;\n case 'notice':\n impactScore += 1;\n complianceActions.push('Monitor for developments');\n break;\n }\n \n // Sector-specific impact assessment\n const criticalSectors = ['financial services', 'banking', 'healthcare', 'energy', 'technology'];\n const matchedCriticalSectors = affected_sectors.filter(sector => \n criticalSectors.some(critical => sector.toLowerCase().includes(critical.toLowerCase()))\n );\n \n if (matchedCriticalSectors.length > 0) {\n impactScore += 2;\n riskFactors.push(`Direct impact on critical sectors: ${matchedCriticalSectors.join(', ')}`);\n }\n \n // Keyword-based impact assessment\n const highImpactKeywords = ['compliance', 'penalty', 'fine', 'mandatory', 'prohibited', 'required'];\n const mediumImpactKeywords = ['guidance', 'recommendation', 'best practice', 'voluntary'];\n const opportunityKeywords = ['incentive', 'tax credit', 'grant', 'funding', 'streamlined'];\n \n const textToAnalyze = `${title} ${summary}`.toLowerCase();\n \n highImpactKeywords.forEach(keyword => {\n if (textToAnalyze.includes(keyword)) {\n impactScore += 1;\n riskFactors.push(`Contains high-impact keyword: ${keyword}`);\n }\n });\n \n mediumImpactKeywords.forEach(keyword => {\n if (textToAnalyze.includes(keyword)) {\n impactScore += 0.5;\n }\n });\n \n opportunityKeywords.forEach(keyword => {\n if (textToAnalyze.includes(keyword)) {\n opportunities.push(`Potential opportunity: ${keyword}`);\n }\n });\n \n // Determine final impact level\n let finalImpactLevel;\n if (impactScore >= 5) {\n finalImpactLevel = 'Critical';\n complianceActions.push('Executive review required within 24 hours');\n } else if (impactScore >= 3) {\n finalImpactLevel = 'High';\n complianceActions.push('Legal and compliance team review required');\n } else if (impactScore >= 1.5) {\n finalImpactLevel = 'Medium';\n complianceActions.push('Department head review recommended');\n } else {\n finalImpactLevel = 'Low';\n complianceActions.push('Standard monitoring sufficient');\n }\n \n return {\n ...regulation,\n impact_assessment: {\n impact_score: impactScore,\n final_impact_level: finalImpactLevel,\n risk_factors: riskFactors,\n opportunities: opportunities,\n compliance_actions: complianceActions,\n assessment_date: new Date().toISOString()\n }\n };\n}\n\n// Return assessed regulation\nreturn [{ json: assessImpact(regulation) }];"
},
"notesInFlow": true,
"typeVersion": 2
},
{
"id": "72a0346a-6a67-4a07-87f7-ceeb1178e939",
"name": "Compliance Tracker",
"type": "n8n-nodes-base.code",
"notes": "Create compliance\ntracking record\nand tasks",
"position": [
3200,
432
],
"parameters": {
"jsCode": "// Get assessed regulation data\nconst regulation = $input.all()[0].json;\nconst { impact_assessment, title, agency, effective_date, comment_deadline } = regulation;\n\n// Create compliance tracking record\nfunction createComplianceTracker(regulation) {\n const compliance = {\n regulation_id: `REG_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`,\n title: regulation.title,\n agency: regulation.agency,\n status: 'New',\n priority: regulation.impact_assessment.final_impact_level,\n key_dates: {\n publication_date: regulation.publication_date,\n effective_date: regulation.effective_date,\n comment_deadline: regulation.comment_deadline,\n review_due_date: calculateReviewDate(regulation.impact_assessment.final_impact_level)\n },\n assigned_team: assignTeam(regulation.impact_assessment.final_impact_level),\n compliance_tasks: generateComplianceTasks(regulation),\n tracking_status: {\n initial_review: 'Pending',\n impact_analysis: 'Pending',\n policy_update: 'Pending',\n training_required: 'Pending',\n implementation: 'Pending'\n },\n created_at: new Date().toISOString(),\n last_updated: new Date().toISOString()\n };\n \n return {\n ...regulation,\n compliance_tracking: compliance\n };\n}\n\nfunction calculateReviewDate(impactLevel) {\n const now = new Date();\n switch (impactLevel) {\n case 'Critical':\n return new Date(now.getTime() + 24 * 60 * 60 * 1000).toISOString(); // 1 day\n case 'High':\n return new Date(now.getTime() + 3 * 24 * 60 * 60 * 1000).toISOString(); // 3 days\n case 'Medium':\n return new Date(now.getTime() + 7 * 24 * 60 * 60 * 1000).toISOString(); // 1 week\n default:\n return new Date(now.getTime() + 14 * 24 * 60 * 60 * 1000).toISOString(); // 2 weeks\n }\n}\n\nfunction assignTeam(impactLevel) {\n switch (impactLevel) {\n case 'Critical':\n return ['Executive Team', 'Legal', 'Compliance', 'Operations'];\n case 'High':\n return ['Legal', 'Compliance', 'Department Heads'];\n case 'Medium':\n return ['Compliance', 'Relevant Department'];\n default:\n return ['Compliance'];\n }\n}\n\nfunction generateComplianceTasks(regulation) {\n const baseTasks = [\n 'Review regulation text',\n 'Assess current policy alignment',\n 'Identify compliance gaps'\n ];\n \n const { final_impact_level, compliance_actions } = regulation.impact_assessment;\n \n if (final_impact_level === 'Critical' || final_impact_level === 'High') {\n baseTasks.push(\n 'Conduct legal review',\n 'Update internal policies',\n 'Plan staff training',\n 'Create implementation timeline'\n );\n }\n \n if (regulation.comment_deadline !== 'N/A') {\n baseTasks.push('Prepare regulatory comment response');\n }\n \n return baseTasks.concat(compliance_actions);\n}\n\n// Return regulation with compliance tracking\nreturn [{ json: createComplianceTracker(regulation) }];"
},
"notesInFlow": true,
"typeVersion": 2
},
{
"id": "59ac11b9-2a10-4fed-ac03-a73e5d92ec3b",
"name": "Executive Alert",
"type": "n8n-nodes-base.code",
"notes": "Format executive\nalert message",
"position": [
3968,
432
],
"parameters": {
"jsCode": "// Get regulation with compliance tracking\nconst regulation = $input.all()[0].json;\nconst { impact_assessment, compliance_tracking } = regulation;\n\n// Format executive alert based on impact level\nfunction formatExecutiveAlert(regulation) {\n const { title, agency, impact_assessment, compliance_tracking } = regulation;\n const { final_impact_level, risk_factors, opportunities } = impact_assessment;\n \n let alertLevel = '⚠️';\n let urgency = 'Standard';\n \n switch (final_impact_level) {\n case 'Critical':\n alertLevel = '🚨';\n urgency = 'URGENT';\n break;\n case 'High':\n alertLevel = '⚠️';\n urgency = 'High Priority';\n break;\n case 'Medium':\n alertLevel = '📋';\n urgency = 'Medium Priority';\n break;\n case 'Low':\n alertLevel = 'ℹ️';\n urgency = 'Low Priority';\n break;\n }\n \n let message = `${alertLevel} **REGULATORY ALERT - ${urgency}**\\n\\n`;\n message += `**Regulation:** ${title}\\n`;\n message += `**Agency:** ${agency}\\n`;\n message += `**Impact Level:** ${final_impact_level}\\n`;\n message += `**Publication Date:** ${regulation.publication_date}\\n`;\n message += `**Effective Date:** ${regulation.effective_date}\\n\\n`;\n \n message += `**📊 SUMMARY**\\n${regulation.summary}\\n\\n`;\n \n if (risk_factors.length > 0) {\n message += `**⚠️ RISK FACTORS**\\n`;\n risk_factors.forEach(risk => {\n message += `• ${risk}\\n`;\n });\n message += `\\n`;\n }\n \n if (opportunities.length > 0) {\n message += `**💡 OPPORTUNITIES**\\n`;\n opportunities.forEach(opp => {\n message += `• ${opp}\\n`;\n });\n message += `\\n`;\n }\n \n message += `**👥 ASSIGNED TEAMS**\\n${compliance_tracking.assigned_team.join(', ')}\\n\\n`;\n \n message += `**📅 KEY DATES**\\n`;\n message += `• Review Due: ${new Date(compliance_tracking.key_dates.review_due_date).toLocaleDateString()}\\n`;\n if (regulation.comment_deadline !== 'N/A') {\n message += `• Comment Deadline: ${regulation.comment_deadline}\\n`;\n }\n message += `• Effective Date: ${regulation.effective_date}\\n\\n`;\n \n message += `**✅ IMMEDIATE ACTIONS REQUIRED**\\n`;\n compliance_tracking.compliance_tasks.slice(0, 5).forEach(task => {\n message += `• ${task}\\n`;\n });\n \n message += `\\n**🔗 RESOURCES**\\n`;\n message += `• [Full Regulation Document](${regulation.document_url})\\n`;\n message += `• Compliance ID: ${compliance_tracking.regulation_id}\\n\\n`;\n \n message += `**📈 TRACKING STATUS**\\nAll compliance tasks have been logged and assigned. Progress will be monitored through the compliance dashboard.\\n\\n`;\n \n message += `━━━━━━━━━━━━━━━━━━━━━━\\n`;\n message += `🕐 Alert Generated: ${new Date().toLocaleString()}`;\n \n return message;\n}\n\n// Return formatted alert\nreturn [{\n json: {\n alert_text: formatExecutiveAlert(regulation),\n alert_level: regulation.impact_assessment.final_impact_level,\n regulation_id: regulation.compliance_tracking.regulation_id,\n title: regulation.title,\n agency: regulation.agency,\n effective_date: regulation.effective_date,\n assigned_teams: regulation.compliance_tracking.assigned_team,\n review_due_date: regulation.compliance_tracking.key_dates.review_due_date,\n document_url: regulation.document_url\n }\n}]);"
},
"notesInFlow": true,
"typeVersion": 2
},
{
"id": "ca7c5d3e-9fbc-4fd4-be75-a709463f989c",
"name": "Correo electrónico Alert",
"type": "n8n-nodes-base.emailSend",
"position": [
4688,
528
],
"webhookId": "0b4a0564-f0cf-4d92-9227-8172df56d509",
"parameters": {
"options": {
"ccEmail": "regulatory-monitor@company.com"
},
"subject": "🚨 Regulatory Alert: {{ $json.alert_level }} Impact - {{ $json.title }}"
},
"typeVersion": 2
},
{
"id": "042db0d2-3542-4818-8540-1abacdcff0a3",
"name": "Nota adhesiva - Trigger",
"type": "n8n-nodes-base.stickyNote",
"position": [
0,
0
],
"parameters": {
"color": 5,
"width": 574.9363634768473,
"height": 530.4701664623029,
"content": "# Step 1: Schedule Trigger ⏱️\n\nThis trigger runs the regulatory monitoring workflow daily.\n\n## Configuration Options\n- **Default**: 9:00 AM daily\n- **Customizable**: Adjust timing based on regulatory publication schedules\n- **Alternative Triggers**: Manual trigger for urgent checks\n\n## Best Practices\n- Run during business hours for immediate response\n- Consider time zones of regulatory agencies\n- Set up backup triggers for critical periods"
},
"typeVersion": 1
},
{
"id": "1db2ba2f-034c-4c81-89e0-ff20e1f0f090",
"name": "Nota adhesiva - Scraper",
"type": "n8n-nodes-base.stickyNote",
"position": [
720,
0
],
"parameters": {
"color": 5,
"width": 575,
"height": 802,
"content": "# Step 2: ScrapeGraphAI - Gov Websites 🤖\n\nScrapes government regulatory websites for new rules and changes.\n\n## Target Sites\n- Federal Register\n- SEC.gov\n- FDA.gov\n- EPA.gov\n- Industry-specific regulatory bodies\n\n## Extraction Schema\n- Rule titles and summaries\n- Publication and effective dates\n- Affected sectors and impact levels\n- Comment deadlines\n- Document URLs"
},
"typeVersion": 1
},
{
"id": "698e22f1-b735-4b59-8e57-398e3c7b05d9",
"name": "Nota adhesiva - Parser",
"type": "n8n-nodes-base.stickyNote",
"position": [
1472,
0
],
"parameters": {
"color": 5,
"width": 574.9363634768473,
"height": 530.4701664623029,
"content": "# Step 3: Regulation Parser 🧱\n\nCleans and structures the scraped regulatory data.\n\n## What it does\n- Validates and cleans scraped data\n- Standardizes date formats\n- Handles missing information gracefully\n- Prepares data for impact assessment\n\n## Data Processing\n- Title and summary cleaning\n- Date parsing and validation\n- Sector categorization\n- URL verification"
},
"typeVersion": 1
},
{
"id": "f934cb28-2de3-4bdd-b4b1-7188c102221a",
"name": "Nota adhesiva - Assessor",
"type": "n8n-nodes-base.stickyNote",
"position": [
2224,
0
],
"parameters": {
"color": 5,
"width": 575,
"height": 706,
"content": "# Step 4: Impact Assessor 📊\n\nAnalyzes business impact and assigns risk levels.\n\n## Assessment Criteria\n- Rule type (Final/Proposed/Notice)\n- Affected business sectors\n- Keyword analysis for compliance terms\n- Historical impact patterns\n\n## Risk Scoring\n- **Critical**: Immediate executive action required\n- **High**: Legal review needed\n- **Medium**: Department review recommended\n- **Low**: Standard monitoring"
},
"typeVersion": 1
},
{
"id": "47c2b00a-a24b-4bba-af23-4b25ed6bdf9f",
"name": "Nota adhesiva - Tracker",
"type": "n8n-nodes-base.stickyNote",
"position": [
2992,
0
],
"parameters": {
"color": 5,
"width": 575,
"height": 626,
"content": "# Step 5: Compliance Tracker 📋\n\nCreates compliance tracking records and assigns tasks.\n\n## Tracking Features\n- Unique regulation IDs\n- Team assignments based on impact\n- Task generation and deadlines\n- Progress monitoring setup\n\n## Compliance Tasks\n- Policy review and updates\n- Staff training requirements\n- Implementation timelines\n- Comment response preparation"
},
"typeVersion": 1
},
{
"id": "c5d0dcbe-8f8d-49d5-aa70-379ca0dd8d72",
"name": "Nota adhesiva - Alert",
"type": "n8n-nodes-base.stickyNote",
"position": [
3744,
0
],
"parameters": {
"color": 5,
"width": 575,
"height": 658,
"content": "# Step 6: Executive Alert 📧\n\nFormats and sends executive alerts based on impact level.\n\n## Alert Content\n- Regulation summary and impact\n- Risk factors and opportunities\n- Assigned teams and deadlines\n- Immediate action items\n- Direct links to documents\n\n## Delivery Options\n- Email alerts\n- Slack notifications\n- Teams messages\n- Dashboard updates"
},
"typeVersion": 1
},
{
"id": "d5731eb6-3f2c-4e1c-9927-f2c95a522b51",
"name": "Sticky Note - Correo electrónico",
"type": "n8n-nodes-base.stickyNote",
"position": [
4448,
0
],
"parameters": {
"color": 5,
"width": 575,
"height": 690,
"content": "# Step 7: Email Alert 📬\n\nSends formatted alerts to executive and compliance teams.\n\n## Recipients\n- Executive team\n- Legal department\n- Compliance officers\n- Relevant department heads\n\n## Alert Prioritization\n- Critical: Immediate delivery\n- High: Priority delivery\n- Medium/Low: Standard delivery\n\n## Follow-up Actions\n- Calendar invites for urgent reviews\n- Task assignments in project management\n- Compliance dashboard updates"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "ddbb349b-d97b-4e8e-b644-332bd48d815c",
"connections": {
"0ed22ae1-9405-4006-950f-0a56c59bf7da": {
"main": [
[
{
"node": "f82dfb15-b15a-4436-8256-082f4169de47",
"type": "main",
"index": 0
}
]
]
},
"59ac11b9-2a10-4fed-ac03-a73e5d92ec3b": {
"main": [
[
{
"node": "Email Alert",
"type": "main",
"index": 0
}
]
]
},
"0027ecda-5b32-4cfa-b0b4-dac6c967f548": {
"main": [
[
{
"node": "72a0346a-6a67-4a07-87f7-ceeb1178e939",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "0ed22ae1-9405-4006-950f-0a56c59bf7da",
"type": "main",
"index": 0
}
]
]
},
"f82dfb15-b15a-4436-8256-082f4169de47": {
"main": [
[
{
"node": "0027ecda-5b32-4cfa-b0b4-dac6c967f548",
"type": "main",
"index": 0
}
]
]
},
"72a0346a-6a67-4a07-87f7-ceeb1178e939": {
"main": [
[
{
"node": "59ac11b9-2a10-4fed-ac03-a73e5d92ec3b",
"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?
Intermedio - Varios, Resumen de IA
¿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
vinci-king-01
@vinci-king-01Compartir este flujo de trabajo