Integrations
| System | Role | Direction | Page |
|---|---|---|---|
Retell AI |
AI voice calls, SMS chats, agent configuration |
out + webhooks in |
|
Resend |
Campaign and transactional email, delivery events |
out + webhooks in |
|
HubSpot |
CRM contacts, companies, engagements, tasks, deals |
out via SQS + webhooks in |
|
Nooks |
Human-dialer call outcomes |
webhooks in |
|
Twilio / Plivo |
Carrier numbers imported into Retell over SIP |
out |
|
MessagingApp |
Internal microservice that buys and releases numbers |
out |
|
Five9 |
Call payload capture (stored only) |
webhooks in |
|
JustCall |
Legacy telephony and agent availability |
webhooks in |
|
Supabase |
PostgreSQL, Auth, Realtime, Edge Functions |
both |
|
Vercel AI Gateway |
One endpoint fronting OpenAI, Anthropic, xAI, Google |
out |
|
Google BigQuery |
Read-only CRM/engagement mirror for sequence data gates |
out |
|
AWS SQS |
CRM and email-categorisation message queues |
out |
|
Redis |
In-flight call counter |
both |
|
Sentry |
Error and performance monitoring |
out |
Wiring conventions
- Clients live in
lib/plugins/or a dedicated folder -
lib/plugins/holdsinngest-client.ts,redis-client.ts,resend-client.ts, andsqs-client.ts. HubSpot HTTP clients live inlib/plugins/hubspot/(HubSpotClientplus feature clients such asHubSpotListsClient;pyb.tswraps@payability/pyb-hubspot). Retell has its own folder (lib/retellai/) because it carries types, agent config and the post-call analysis schema alongside the client. - Errors are wrapped, not leaked
-
RetellClientwraps SDK failures inRetellError; the calling service converts them toRetellCallErroror aCallSkipReason. A provider’s error shape never reaches a route handler. - Configuration is registry-driven where it varies
-
Carriers are entries in
EXTERNAL_PROVIDER_CONFIGS, models inAI_GATEWAY_MODELS, CRM event types inCRM_EVENT_TYPES. Adding one is a single-entry change. - Missing configuration degrades rather than crashes
-
Realtime broadcast logs a warning and returns when Supabase keys are absent; Svix verification is skipped when the Resend secret is unset; SQS publishers return
falsewhen a queue URL is missing. The two exceptions that fail closed areverifyInternalSecret()and HubSpot signature verification, because both guard write paths. - Best-effort side effects are explicit
-
Activity logging, HubSpot engagement logging and CRM publishing are wrapped in
try/catchthat warns and continues. The comment// best-effortmarks them in the source.
Environment variables
See Environment variables for the full list with descriptions.