# tuguidragos/ghl-n8n-ai-calling-agent architecture

> Architecture diagram of the GitHub repository tuguidragos/ghl-n8n-ai-calling-agent, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tuguidragos/ghl-n8n-ai-calling-agent
- Repository: https://github.com/tuguidragos/ghl-n8n-ai-calling-agent

## Overview

This repository presents an n8n AI-calling workflow for GoHighLevel contacts. Its main path schedules a contact campaign, retrieves and filters contacts, places calls through Vapi using Twilio caller IDs, polls for completion, books appointments, and records outcomes in GoHighLevel. The README also documents runtime custom-field discovery and HTTP retry handling. No workflow definition or source excerpts were provided, so components have no source paths and edges reflect only README-described relationships.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_campaign["Campaign workflow"]
  node_schedule["9 AM trigger"]
  node_ghl_contacts["Paginated contacts"]
  node_contact_filter["Contact filter"]
  node_custom_fields["Field mapping"]
end

subgraph group_calling["Calling and booking"]
  node_vapi_customer["Vapi customer"]
  node_agent_select["Caller ID selection"]
  node_vapi_call["AI call"]
  node_call_poll["Call status polling"]
  node_appointment["Appointment booking"]
end

subgraph group_crm["CRM updates"]
  node_outcome_tag["Outcome tagging"]
  node_call_summary["Call summary"]
  node_transcript_note["Transcript note"]
end

node_gohighlevel[("GoHighLevel")]
node_vapi["Vapi"]
node_twilio["Twilio numbers"]
node_calendar[("Calendar")]

node_schedule -->|"starts campaign"| node_ghl_contacts
node_ghl_contacts -->|"searches contacts"| node_gohighlevel
node_ghl_contacts -->|"passes contacts"| node_contact_filter
node_gohighlevel -->|"provides fields"| node_custom_fields
node_contact_filter -->|"prepares customer"| node_vapi_customer
node_agent_select -->|"selects caller ID"| node_vapi_call
node_agent_select -->|"uses numbers"| node_twilio
node_vapi_customer -->|"places call"| node_vapi_call
node_vapi_call -->|"calls through"| node_vapi
node_vapi_call -->|"checks status"| node_call_poll
node_call_poll -->|"polls status"| node_vapi
node_vapi_call -->|"books appointment"| node_appointment
node_appointment -->|"books into"| node_calendar
node_vapi_call -->|"records outcome"| node_outcome_tag
node_vapi_call -->|"records summary"| node_call_summary
node_vapi_call -->|"logs transcript"| node_transcript_note
node_outcome_tag -->|"updates contact"| node_gohighlevel
node_call_summary -->|"updates contact"| node_gohighlevel
node_transcript_note -->|"writes note"| node_gohighlevel

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_schedule,node_ghl_contacts,node_contact_filter,node_custom_fields toneBlue
class node_vapi_customer,node_agent_select,node_vapi_call,node_call_poll,node_appointment,node_gohighlevel,node_calendar toneAmber
class node_outcome_tag,node_call_summary,node_transcript_note,node_vapi toneMint
class node_twilio toneIndigo
```

## Components

### Campaign workflow

- **9 AM trigger**
- **Paginated contacts**
- **Contact filter**
- **Field mapping**

### Calling and booking

- **Vapi customer**
- **Caller ID selection**
- **AI call**
- **Call status polling**
- **Appointment booking**

### CRM updates

- **Outcome tagging**
- **Call summary**
- **Transcript note**

### Other components

- **GoHighLevel**
- **Vapi**
- **Twilio numbers**
- **Calendar**

## Connections

- 9 AM trigger → Paginated contacts: starts campaign (evidence: `README.md`)
- Paginated contacts → GoHighLevel: searches contacts (evidence: `README.md`)
- Paginated contacts → Contact filter: passes contacts (evidence: `README.md`)
- GoHighLevel → Field mapping: provides fields (evidence: `README.md`)
- Contact filter → Vapi customer: prepares customer (evidence: `README.md`)
- Caller ID selection → AI call: selects caller ID (evidence: `README.md`)
- Caller ID selection → Twilio numbers: uses numbers (evidence: `README.md`)
- Vapi customer → AI call: places call (evidence: `README.md`)
- AI call → Vapi: calls through (evidence: `README.md`)
- AI call → Call status polling: checks status (evidence: `README.md`)
- Call status polling → Vapi: polls status (evidence: `README.md`)
- AI call → Appointment booking: books appointment (evidence: `README.md`)
- Appointment booking → Calendar: books into (evidence: `README.md`)
- AI call → Outcome tagging: records outcome (evidence: `README.md`)
- AI call → Call summary: records summary (evidence: `README.md`)
- AI call → Transcript note: logs transcript (evidence: `README.md`)
- Outcome tagging → GoHighLevel: updates contact (evidence: `README.md`)
- Call summary → GoHighLevel: updates contact (evidence: `README.md`)
- Transcript note → GoHighLevel: writes note (evidence: `README.md`)
