🇦🇺 AustraliaPRO — Sistema de Consultoría Migratoria

Arquitectura técnica del sistema de automatización • n8n Self-Hosted + Airtable + IA

COMPONENTES DEL SISTEMA

n8n (Orquestador)

Self-hosted via Docker. Gestiona 3 workflows modulares con webhooks, crons y sub-workflows.

Puerto 5679
📊

Airtable (Base de Datos)

4 tablas relacionadas: Clientes, Consultorías, Agentes y Rutas Migratorias con Linked Records.

CRUD vía API
🤖

IA (Generación de Ruta)

Claude 3.5 Sonnet (principal) + GPT-4o (fallback). Prompt estructurado con 6 secciones obligatorias.

Human-in-the-loop
📡

Integraciones

Google Calendar + Meet, SendGrid/Postmark (email), Slack (alertas), Tally.so (formularios), Wix (checkout).

6 APIs

Workflow 1 — Consultoría Migratoria (Main)

17 nodos
🔵
Webhook Wix Purchase
Trigger
🔄
Convert Binary → JSON
Transform
🔒
Validar Firma HMAC
Security
📋
Normalizar Datos
Code
🔍
Buscar Duplicado
Airtable
¿Cliente Existente?
IF
🔍
Buscar Agente
Airtable
👤
Asignar Agente (Round-Robin)
Code
📅
Google Calendar + Meet
Google API
🔗
Extraer Meet URL
Code
💾
Guardar en Airtable
Airtable
✉️
Preparar Email HTML
Code
📧
SendGrid Email
SendGrid
Respuesta 201
Response

Workflow 2 — Generación de Ruta Migratoria (IA)

12 nodos
🔵
Webhook Generar Ruta
Trigger
📊
Obtener Consultoría
Airtable
📥
Preparar Inputs IA
Code
🧠
Construir Prompt
Code
🟣
Claude 3.5 Sonnet
Anthropic
fallback↓
🟢
GPT-4o
OpenAI
Parsear + Validar
Code
💾
Guardar Ruta
Airtable
💬
Slack Notificar
Slack
📤
Respuesta 201
Response

Workflow 3 — No-Shows, Reprogramaciones & Derivaciones

3 sub-flujos

Sub-flujo A: Detección automática de No-Shows

Cron (5 min)
Schedule
🔍
Buscar No-Shows (+15min)
Airtable
🔢
Verificar # No-Shows
Code
¿2do No-Show?
IF
Sí →No →
🔴
Cancelar + Email Final
2do Strike
🟡
Reprogramar + Warning
1er Strike

Sub-flujo B: Reprogramación Manual

📅
Webhook Reprogramar
POST
Validar Fecha
Code
🗑️
Borrar Evento Anterior
Calendar
📅
Crear Nuevo Evento
Calendar
💾
Actualizar Airtable
Airtable
Respuesta 200
Response

Sub-flujo C: Derivaciones a Equipos Especializados

🔀
Webhook Derivar
POST
📂
Clasificar Tipo
Code
💾
Airtable — Derivar
Airtable
💬
Slack → Equipo
Slack
📧
Email Cliente
SendGrid
Respuesta 200
Response
MÁQUINA DE ESTADOS — CONSULTORÍA
Creado
Datos Completados
Confirmado
Finalizado
Ruta Generada
Seguimiento
Reprogramado
Cancelado — No-Show
Derivado
Pendiente Revisión
ESQUEMA AIRTABLE — BASE DE DATOS
👤 Clientes
email
EmailPK
nombreText
telefonoPhone
pais_origenText
fuente_captacionSelect
consultoriasLink → Consultorías
📅 Consultorías
consultoria_id
TextPK
statusSelect (10 estados)
fecha_sesionDateTime
meet_urlURL
no_show_countNumber
agenteLink → Agentes
clienteLink → Clientes
rutaLink → Rutas
🧑‍💼 Agentes
nombreText
emailEmail
calendario_idText
especialidadMulti-Select
carga_actualNumber
max_carga_semanalNumber
activoCheckbox
🗺️ Rutas Migratorias
ruta_generadaLong Text
modelo_iaText
prompt_versionText
status_revisionSelect
consultoriaLink → Consultorías
aprobada_porText
Trigger / Response
Code (JavaScript)
API Externa
IA (LLM)
🔒
Desactivado (requiere credentials)