Quick overview
This workflow receives a new job order from an ATS webhook, optionally extracts requirements using Anthropic, searches and scores matching candidates from the ATS, checks suppression rules and engagement history in Supabase, then upserts a campaign with scheduled enrollments and optionally posts a launch summary to Slack.
How it works
- Receives a job order via webhook (or runs manually) and normalizes it into a consistent job spec using the configured ATS field mapping.
- If the job order is missing enough structured skills, calls Anthropic Messages API to extract required and preferred skills and merges them back into the job spec.
- Searches for candidates in the ATS via its API (or falls back to a built-in sample candidate pool if the ATS is not connected).
- Normalizes candidates (including E.164 phone formatting, status-based exclusions, and deduplication) and computes a transparent match score with human-readable reasons.
- Fetches opt-outs, recent touches, and active enrollments from Supabase (or uses demo/empty history when Supabase is not configured) and gates out ineligible candidates.
- Upserts the job order, campaign, and candidates into Supabase, links IDs, inserts enrollment rows with the first touch scheduled (not sent), and optionally posts a formatted launch summary to Slack.
Setup
- Configure your ATS webhook subscription to send “job order created” events to the workflow webhook URL.
- In the config values, set your ATS vendor details and field mappings (ATS_FIELDS), plus thresholds like MIN_MATCH_SCORE and ENROLL_TOP_N.
- Add credentials and fill connection values for Supabase (project URL and service role key) and ensure your database has the required tables/RPC (including the engagement_history function) and appropriate RLS policies.
- If you want AI requirement extraction, add an Anthropic API key and choose the model settings in the config.
- If you want notifications, set a Slack incoming webhook URL in the config.
- Turn off DEMO_MODE and adjust TEST_RUN/TEST_PHONE once you are ready to persist real campaigns and enrollments.