Automations
Everything that runs on a schedule, fires off a tag rule, or listens for an external event. Hit Run now to fire any cron immediately.
Scheduled jobs
Texts you + partner about today's calls. 8am morning summary, 60-min and 10-min pre-call alerts with the direct /closer link.
/api/cron/operator-alerts · cron */5 * * * *
Sends attendee reminder SMS based on templates configured at /reminders. Uses GHL sender numbers, falls back to Quo on rate-limit.
/api/cron/group-call-reminders · cron */5 * * * *
Pulls fresh ad-insight data (spend, impressions, leads) for the last 30 days in chunked windows.
/api/meta/sync · cron */15 * * * *
Pulls new + updated contacts from GHL into ghl_contacts with tags, phone, source fields.
/api/ghl/sync · cron 7,22,37,52 * * * *
Pulls new + cancelled group-demo bookings + per-attendee createdAt for seated events.
/api/cal/sync · cron 12,27,42,57 * * * *
Backfills missing FB ad attribution onto contacts that have a lead-form association.
/api/ghl/enrich · cron */10 * * * *
Pairs Zoom join-rows that don't match an attendee email against likely registrants by name similarity.
/api/cron/zoom-ai-match · cron */30 * * * *
Generates the daily AI insights run consumed on the dashboard.
/api/cron/daily-ai · cron 0 6 * * *
Rolls up yesterday's metrics into the KPI table for fast dashboard reads.
/api/cron/compile-kpi · cron 15 5 * * *
Daily AI agent that researches competitive ad landscape.
/api/agents/market-intel · cron 0 7 * * *
Distills closer/AI playbook patterns from recent message threads.
/api/ghl/conversations/learn · cron 30 * * * *
Tag rules
When a snippet flagged as 'payment link' is sent or manually logged, the attendee gets tagged. The tag auto-clears when they enroll via the homework webhook.
source: /api/closer/text-link, /api/closer/log-send
Set when homework.fltestprep.com fires enrollment.completed. Parent and student both get tagged; payment-link tag is removed at the same time.
source: Homework webhook → pushEnrollmentToGHL
Event webhooks
/api/homework/enrollmentReceives every paid enrollment from homework.fltestprep.com. Idempotent on (parent_email, enrolled_at, class_name).
Expects: POST with Bearer token; body { event: 'enrollment.completed', parent, student, … }
/api/cal/webhookCatches new bookings, cancellations, reschedules in real-time so dashboards don't wait for the 15-min sync.
Expects: POST from Cal.com app webhooks
/api/inbound/rescheduleCatches inbound SMS containing 'reschedule', looks up the contact's upcoming booking, and auto-replies with a pre-filled link to /reschedule so they can pick a new time in two taps.
Expects: POST from a GHL workflow: Trigger 'Inbound SMS' → Action 'Webhook' → POST → this URL. Payload should include contactId + message.
/api/inbound/noCatches 'NO' / 'not interested' / 'cancel' / 'stop' / 'unsubscribe' replies on missed-call follow-ups. Tags the contact 'not-interested' and replies with a friendly closure note so they stop getting templates that have skip_if_tag set.
Expects: POST from the same GHL inbound-SMS workflow (or a sibling). Payload includes contactId + message; keyword filter is server-side.
/api/trackPublic ingest for landing-page view tracking (drop the snippet on each LP).
Expects: POST with { page, source, … } (CORS open)