Quick overview
This workflow receives inbound Twilio SMS replies, Twilio delivery callbacks, and Retell call analysis webhooks, then verifies signatures, handles opt-outs, qualifies candidates using rule-based criteria, books interviews in Google Calendar, queues and writes notes back to an ATS, notifies recruiters via Slack and Gmail, and logs eventsto Supabase.
How it works
- Receives a POST webhook from Twilio (inbound SMS or status callback) or Retell (call_analyzed) and loads runtime settings from the config.
- Verifies the webhook signature for Twilio or Retell and rejects unsigned/untrusted requests unless running in preview mode.
- Normalizes the inbound payload into a single event shape, detects SMS intent (opt-out, interested, not interested, question, unclear), and ignores non-actionable events like delivery receipts or non-final Retell events.
- If the message is an opt-out, calls a Supabase RPC to stop all outreach for that phone number and (optionally) prepares a one-time confirmation message.
- Otherwise, evaluates the candidate against the configured QUALIFY rules (including Retell’s structured answers when present) to mark them as qualified, not qualified, needs review, or no answer.
- For qualified candidates, selects the job’s recruiter and proposes an interview slot, then creates a Google Calendar event when calendar booking is enabled and the workflow is running in live mode.
- Records the appointment and logs the inbound event in Supabase, queues and optionally writes an ATS note/status update, and notifies the recruiter via Slack webhook and/or Gmail before responding to Twilio/Retell with a fast acknowledgement.
Setup
- Create a Supabase project, run the provided schema/seed SQL, and add your Supabase URL and service role key (or equivalent) to the config and Supabase HTTP Request nodes.
- Configure Twilio (Account SID/Auth Token, sending number or Messaging Service SID, and the status callback URL) and paste this workflow’s production webhook URL into Twilio and set the same value in TWILIO_STATUS_CALLBACK for signature verification.
- If using Retell, set your Retell API key, agent ID, and webhook signing secret, and configure Retell to send call_analyzed webhooks to this workflow’s webhook URL.
- Connect Google Calendar credentials (and set CALENDAR_PROVIDER to google) and connect Gmail credentials if you want recruiter email notifications.
- If you want ATS write-back, set the ATS base URL/token and confirm the candidate/job field mappings in ATS_FIELDS match your ATS.
- Review and adjust QUALIFY rules, quiet hours/booking windows, and set DEMO_MODE/TEST_RUN to false only when you are ready to send messages and write back to external systems.