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";
2
3const result = await relay
4 .workflow("sales-followup")
5
6 // Step 1: Analyze call sentiment and buying signals
7 .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 detected
12- Objections or concerns raised
13- Key decision makers mentioned
14- Timeline indicators
15
16Notes: {{callNotes}}`)
17
18 // Step 2: Determine next best action
19 .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}}
24
25Options: Send proposal, Schedule demo, Share case study,
26Follow up in 30 days, Qualify out`)
27
28 // Step 3: Draft follow-up email
29 .step("draft-email")
30 .with("anthropic:claude-3.5-sonnet")
31 .depends("analyze-sentiment", "recommend-action")
32 .prompt(`Draft a personalized follow-up email:
33
34Sentiment Analysis: {{analyze-sentiment.output}}
35Recommended Action: {{recommend-action.output}}
36
37Requirements:
38- Reference specific points from the call
39- Address any concerns raised
40- Include clear next step/CTA
41- Keep under 200 words
42- Professional but warm tone
43
44Prospect Name: {{prospectName}}
45Company: {{companyName}}`)
46
47 .run({
48 callNotes: meetingNotes,
49 prospectName: "Sarah Chen",
50 companyName: "TechCorp",
51 });
52
53console.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