Sales Follow-up Generator
Generate personalized follow-up emails based on meeting notes and sentiment analysis.
This workflow analyzes sales call notes, detects buying signals, and crafts contextual follow-up messages.
Implementation
1import { relay } from "@relayplane/workflows";23const result = await relay4 .workflow("sales-followup")56 // Step 1: Analyze call sentiment and buying signals7 .step("analyze-sentiment")8 .with("openai:gpt-4o")9 .prompt(`Analyze these sales call notes and identify:10- Overall sentiment (hot/warm/cold)11- Buying signals detected12- Objections or concerns raised13- Key decision makers mentioned14- Timeline indicators1516Notes: {{callNotes}}`)1718 // Step 2: Determine next best action19 .step("recommend-action")20 .with("anthropic:claude-3.5-sonnet")21 .depends("analyze-sentiment")22 .prompt(`Based on this call analysis, recommend the best next action:23{{analyze-sentiment.output}}2425Options: Send proposal, Schedule demo, Share case study,26Follow up in 30 days, Qualify out`)2728 // Step 3: Draft follow-up email29 .step("draft-email")30 .with("anthropic:claude-3.5-sonnet")31 .depends("analyze-sentiment", "recommend-action")32 .prompt(`Draft a personalized follow-up email:3334Sentiment Analysis: {{analyze-sentiment.output}}35Recommended Action: {{recommend-action.output}}3637Requirements:38- Reference specific points from the call39- Address any concerns raised40- Include clear next step/CTA41- Keep under 200 words42- Professional but warm tone4344Prospect Name: {{prospectName}}45Company: {{companyName}}`)4647 .run({48 callNotes: meetingNotes,49 prospectName: "Sarah Chen",50 companyName: "TechCorp",51 });5253console.log("Email:", result.steps["draft-email"].output);54console.log("Sentiment:", result.steps["analyze-sentiment"].output);Webhook Integration
Trigger this workflow automatically when your CRM logs a new call:
1relayplane webhooks create sales-followup \2 --workflow sales-followup \3 --secret ${WEBHOOK_SECRET}Customization
- Add step to check CRM for previous interactions
- Include competitor mentions detection
- Generate multi-touch sequence (not just one email)
- Score lead quality for prioritization