Skip to content

Add improved n8n workflow with enhanced AI analysis - #15

Open
alexmosquerac wants to merge 4 commits into
mouredev:mainfrom
alexmosquerac:claude/n8n-web-audit-workflow-01SnL2XkBBHHKikaGaDNWs3A
Open

Add improved n8n workflow with enhanced AI analysis#15
alexmosquerac wants to merge 4 commits into
mouredev:mainfrom
alexmosquerac:claude/n8n-web-audit-workflow-01SnL2XkBBHHKikaGaDNWs3A

Conversation

@alexmosquerac

Copy link
Copy Markdown
  • Added structured CRO analysis with NEXA framework (5 pillars with scoring)
  • Implemented two-stage OpenAI processing: analysis + professional report generation
  • Enhanced metadata extraction (title, description, h1) for better context
  • Added professional HTML email template with visual design
  • Improved scoring system (0-50 points) for quantitative assessment
  • Separated technical analysis from persuasive copywriting
- Added structured CRO analysis with NEXA framework (5 pillars with scoring)
- Implemented two-stage OpenAI processing: analysis + professional report generation
- Enhanced metadata extraction (title, description, h1) for better context
- Added professional HTML email template with visual design
- Improved scoring system (0-50 points) for quantitative assessment
- Separated technical analysis from persuasive copywriting
- Added X-API-Key header for secure communication between n8n and Lovable
- API Key: nexa_45b52642066f47f2182bb0517905dab12626a82b68995704090354fb23cd34e4
- Protects /api/save-audit-lead endpoint from unauthorized access
CHANGES:
- Fixed Supabase Edge Function URL (removed double https://)
- Changed API key header from X-API-Key to x-api-key (lowercase)
- Added analysis_status field to payload
- Created comprehensive step-by-step implementation guide
- Added test script for workflow validation
- Included troubleshooting section

FILES:
- n8n-workflow-definitivo.json: Corrected workflow ready to import
- test-workflow.sh: Automated test script
- GUIA-IMPLEMENTACION-DEFINITIVA.md: Complete implementation guide with checklist
CRITICAL FIX: Resolved Resend JSON validation error
- Fixed jsonBody in Resend node: removed extra quotes around html field
- Corrected format: "html": {{ JSON.stringify(...) }} (without external quotes)
- Updated all node references to match current naming (e.g., HTML to Text - Limpiar + Metadatos1)
- Maintained proper JSON.stringify() usage for HTML content escaping
- All credentials and IDs preserved from working configuration

This workflow is now ready for direct import and use.

WORKFLOW INCLUDES:
- Webhook trigger (POST)
- Google Sheets lead logging
- HTML scraping and cleaning with metadata extraction
- OpenAI GPT-4o dual-stage analysis (CRO audit + HTML report generation)
- Supabase Edge Function integration for database storage
- Resend email delivery with professional HTML template
- Webhook response confirmation

FILES:
- n8n-workflow-FINAL-CORREGIDO.json: Complete corrected workflow ready to import
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants