Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.vorel.ai/llms.txt

Use this file to discover all available pages before exploring further.

Vorel splits its automation surface into two layers:
  • Per-turn dispatch (router → sub-agent → tool) runs in-code as TypeScript inside the Vorel web app. Type-checked, version-controlled, code-reviewed. This is the synchronous AI brain that handles every customer message + voice turn.
  • Around-the-brain workflows (post-booking nudges, nurture cadences, weekly digests) run in n8n — operator-editable visual workflows that consume Vorel’s public API + outbound webhooks.
This page covers the around-the-brain layer.
n8n service status: not yet deployed on Railway. The around-the-brain templates ship in the repo (handoff/n8n-workflows/*.template.json) and the operator-side discoverability surface lists them, but the n8n service itself is not standing up on Railway today. Stand-up runbook: handoff/docs/runbooks/n8n-setup.md (~30 min). Once deployed per-tenant templates are imported during onboarding.

The 3 v1 templates

Post-booking confirmation

Trigger: Vorel webhook on booking.created.Flow: When the agent books an appointment, fan out — Slack notify the assigned user, push to the tenant’s CRM via Vorel’s create-record endpoint, and schedule a 24-hour-before reminder via Vorel’s outbound conversation send. Appointment data comes from the webhook payload — no extra GET needed.Vorel API surface: POST /v1/crm/create-record · POST /v1/conversations/:id/sendSource: handoff/n8n-workflows/post-booking-confirmation.template.json.

Lead nurture (3-day)

Trigger: n8n schedule trigger, daily 09:00 cron (0 9 * * *).Flow: Daily — find leads stale-qualified for 3+ days, send a re-engagement WhatsApp template via Vorel’s outbound conversation send; escalate to human handoff after 7 days. The lead-list filter ?stale_for_days=N is the vendored shortcut for the cohort.Vorel API surface: GET /v1/leads?stale_for_days=3 · POST /v1/conversations/:id/send · POST /v1/leads/:id/handoff · PATCH /v1/leads/:idSource: handoff/n8n-workflows/lead-nurture-3-day.template.json.

Weekly QA rollup

Trigger: n8n schedule trigger, Monday 09:00 cron (0 9 * * 1).Flow: Aggregate QA scores + hallucination flags + handoff reasons from the prior 7 days; format the rollup; email or Slack the digest to the operator. Single-endpoint workflow backed by weekly-rollup.Vorel API surface: GET /v1/analytics/weekly-rollupSource: handoff/n8n-workflows/weekly-qa-rollup.template.json.
All three templates are status: ready — every endpoint they call is shipped on the public API. A CI test (apps/web/src/app/admin/automation/templates-validity.test.ts) cross-references each httpRequest URL in every template against the live OpenAPI spec; a renamed or removed endpoint would fail the build before the template silently breaks.

How operator deployment works

When n8n is stood up, the operator runs through this on each new tenant:
1

Stand up n8n on Railway

Stand up n8n as a 5th Railway service per handoff/docs/runbooks/n8n-setup.md.
2

Cloudflare Access in front of n8n

Configure Cloudflare Access on the n8n custom domain so only the operator team can hit it.
3

Issue a per-tenant Vorel API key

Create a per-tenant Vorel public API key at /admin/tenants/[id] → API keys with the scopes each template needs (leads:write, conversations:write, crm:write, read).
4

Import the .template.json files

Import each template into n8n; configure credentials (the API key) + the cron timezone (per tenant’s local time).
5

Wire webhook subscriptions

For webhook-triggered workflows (post-booking-confirmation), wire the Vorel-side webhook subscription at /admin/tenants/[id]/integrations/webhooks so the right event types POST into the right n8n webhook URL.

Around-the-brain vs. in-brain — the split

Per-turn agent dispatch is in code, not n8n:
  • The router → sub-agent → tool flow runs in-process via runChatDispatch / runVoiceDispatch.
  • Each tool route at /api/tools/* is JWT-authed (5-min TTL) and tenant-scoped via withTenantContext.
  • This stays type-checked, code-reviewed, and version-controlled — the synchronous AI brain is too load-bearing to live in a visual editor.
n8n handles the asynchronous, cross-conversation, operator-editable layer:
  • Post-booking nudges, nurture cadences, weekly digests, custom escalation flows.
  • Operators clone + tune templates per-tenant without a code deploy.
  • Each tenant’s workflows are isolated by API key.

Custom workflows beyond the v1 templates

Tenants who want bespoke workflows go in two directions:
  • Subscribe to webhooks at /(dashboard)/settings/integrations/webhooks — receive lead.created / booking.created / 10 other event types in your own automation system. HMAC-SHA256 signed; 6-attempt retry ladder.
  • Pull from the public API — every resource (conversations, leads, appointments, offerings, analytics) has GET (list) + GET (id) + POST + PATCH parity. Build whatever cohort / cron / fan-out you need.
The n8n templates are the starting point, not the limit. They’re deliberately small (1–4 nodes each) so the operator can fork them into tenant-specific variants.

What’s NOT supported

  • n8n itself, today. Templates exist on disk; n8n is not deployed on Railway. Around-the- brain workflows aren’t running until the runbook is executed.
  • Vorel-managed scheduling. Crons live in n8n; Vorel doesn’t run a cron service today.
  • Visual workflow editor inside Vorel’s dashboard. n8n is the editor; we don’t ship a bespoke one.
  • End-customer-facing workflow editing. n8n access is operator-team-only behind Cloudflare Access. Tenants describe what they want during onboarding; the operator builds the workflow per-tenant.