The Problem
When a sales rep closes a deal, the ops team needs to spin up an entire delivery environment: create a project in the PM tool, assign team members, schedule a kickoff call, send a welcome email to the client, notify 4 Slack channels, update the CRM, and produce a handoff document. This takes 2-3 hours of manual work per deal, spreads across 7 different tools, and steps get missed constantly.
The sales rep moves on to the next deal. The ops team doesn't have full context from the sales conversations. The client waits 24-48 hours to hear from the delivery team. Important details from sales notes get lost. Urgency level isn't communicated. Nobody knows if everything was actually set up correctly.
The Solution
A 44-node orchestration pipeline triggered by a HubSpot deal stage change. Within 60 seconds of marking a deal as "Closed Won", the entire ops handoff is complete: data enriched from HubSpot, AI-generated ops brief, project spaces created, tasks assigned, stakeholders notified, client welcomed, and quality verified.
- HubSpot webhook fires when a deal moves to 'Closed Won'
- 3 parallel API calls pull full contact, company, and deal notes from HubSpot
- Merge + Code nodes build an enriched customer profile
- OpenAI analyzes the deal context and generates: priority level, complexity estimate, key requirements, risks, recommended team size, and onboarding approach
- In parallel: OpenAI drafts a personalized client welcome email
- Notion creates a project page with all metadata
- Airtable logs the new project for delivery tracking
- Linear creates a project + 3 tasks (kickoff, environment setup, documentation)
- Slack notifies #deals-won, #delivery-team, and #revenue with full context
- Gmail sends AI-crafted welcome to client + confirmation to sales rep
- Google Calendar schedules the kickoff call
- HubSpot deal is updated with ops status fields
- OpenAI generates a comprehensive internal handoff document
- Handoff document is pushed to Notion project page
- If priority is 'urgent': leadership gets a Slack alert + immediate team allocation task
- Quality check verifies all systems synced correctly
- If QA fails: ops-alerts channel is notified for manual intervention
Why I Built It This Way
The biggest insight from the client's ops team: the handoff problem isn't about speed, it's about context loss. Sales reps have 30+ touchpoints with a prospect over weeks. When they mark "Closed Won", all that context lives in their head and scattered HubSpot notes. The delivery team starts from zero. I architected the pipeline around context preservation, not just task automation.
The 3 parallel HubSpot API calls (contact, company, deal notes) exist because HubSpot's data model stores these as separate objects. Fetching them sequentially would triple the latency. More importantly, the merge step combines them into a single enriched profile that the AI can reason about holistically. The AI needs to see "CEO at a 200-person fintech who mentioned compliance concerns in the sales call" as one picture, not three disconnected data pulls.
I use two separate OpenAI calls (analysis + email drafting) instead of one. The analysis call runs at temperature 0.3 (deterministic, structured JSON output). The email call runs at 0.7 (more creative, natural language). Combining them into one prompt would force a compromise on either accuracy or tone. The tradeoff is an extra API call (~0.5s), but the output quality difference is massive.
The QA phase at the end is something most automation builders skip. But in a 44-node pipeline that touches 7 external APIs, partial failures are inevitable. An API times out, a field is empty, a Notion page doesn't create properly. The wait + verify + alert pattern means the ops team learns about failures immediately instead of discovering them 3 days later when the client asks why they never got their kickoff invite. This is the difference between a demo workflow and a production system.
The urgent escalation path exists because the client had a specific pattern: 20% of deals are time-sensitive (client switching from a competitor mid-contract, seasonal business, fundraising deadline). These need team allocation within hours, not days. Instead of making every deal feel urgent, the AI classifies urgency from the sales notes context, and only truly time-sensitive deals trigger the leadership channel. This keeps the signal-to-noise ratio high.
The Workflow
This is a sanitized replica of the production workflow. Credentials, API keys, and client-specific data have been removed to protect confidentiality.
Results
- Handoff time: 2-3 hours to under 60 seconds
- Zero missed steps (44 nodes execute deterministically every time)
- Client receives personalized welcome within 1 minute of deal close
- Delivery team gets full AI-generated context without reading raw sales notes
- Urgent deals are automatically escalated to leadership
- Built-in QA catches sync failures before they become client-facing issues
- Sales reps get a confirmation email listing everything that was done
Timeline
2026
Stack
Responsibilities
- 44-node workflow architecture across 8 phases
- Multi-system data enrichment pipeline
- AI-powered ops brief and handoff document generation
- End-to-end quality assurance with automated verification
