Turn Buyer Engagement into Personalized Follow-Up Drafts
A buyer revisiting a Shared Space is a clear signal of interest. Acting on it quickly matters, but pulling together a relevant, personalized reply still takes time.
Showpad's Participant Visit Summary already emails sales reps a summary of what the buyer did during their visit. But a summary of what happened is different from a draft of what to say next. Your pipeline listens for the same visit and delivers a ready-to-review reply draft to the rep in seconds, personalized to the buyer and the space they opened.
Classic Situation
A sales team wants reps to receive a personalized follow-up email draft the moment a buyer views their Shared Space. Without this automation:
- Engagement signals go unnoticed or noticed too late
- Follow-up emails are generic and not tied to the buyer or the deal
- Reps who do follow up quickly still spend 10 to 15 minutes drafting the email
- Inconsistent follow-up quality across the team
Solution Example
Subscribe to Showpad's shared-space-participant-visited webhook event. When a buyer visits a space, send the visit
details to your designated LLM and deliver a draft follow-up to the rep.
- Plan: Any Showpad plan with API access
- Permissions: Administrator access to Showpad's Admin App
- Config:
- An LLM API key (examples below use the Anthropic API)
- An
ANTHROPIC_MODELenvironment variable set to the Claude model you want to use (see Claude models) - A webhook endpoint capable of receiving HTTP POST requests
- Email or Slack delivery for draft notifications
- Familiarity with Showpad Webhooks
Webhook Event
| Event | Description |
|---|---|
shared-space-participant-visited | A participant visits a Shared Space |
The event payload includes the participant's name, company, and job title, the Shared Space name, and whether this is their first visit. That's plenty of context for a personalized draft.
Steps
1. Set Up Your Webhook Subscription
Create a webhook subscription in Showpad's Admin App for the shared-space-participant-visited event. See the
Subscriptions guide for instructions.
2. Handle Incoming Webhook Events
Your endpoint should acknowledge receipt immediately and process asynchronously. Skip visits from internal users, such as colleagues checking the space, so reps only get drafts for buyer activity.
app.post('/webhooks/showpad', (req, res) => {
res.status(200).send('OK');
const { type, data } = req.body;
if (type !== 'shared-space-participant-visited') return;
// Internal Showpad users have a userId; external buyers don't
if (data.participant.userId) return;
generateFollowUpDraft(data);
});
3. Look Up the Rep
The webhook tells you who visited, but not who owns the space. Fetch the Shared Space to find its owner, then look up the owner's name.
async function getRepName(spaceId, showpadToken) {
const headers = { Authorization: `Bearer ${showpadToken}` };
const spaceResponse = await fetch(`https://{subdomain}.showpad.biz/api/v4/shared-spaces/${spaceId}`, { headers });
const space = await spaceResponse.json();
const ownerResponse = await fetch(`https://{subdomain}.showpad.biz/api/v4/users/${space.owner.userId}`, { headers });
const owner = await ownerResponse.json();
return owner.firstName;
}
4. Draft the Follow-Up with AI
Send the visit details to your designated LLM and ask for a concise, personalized follow-up email.
This step sends buyer PII (name, company, job title) to an external LLM provider. Ensure this is permitted under your organization's data handling policies and any agreements with your LLM vendor before using in production. These are buyer-controlled fields interpolated directly into the prompt, so validate or sanitize them before use to prevent prompt injection.
import Anthropic from '@anthropic-ai/sdk';
const anthropic = new Anthropic();
async function draftFollowUpEmail(visit, repName) {
const { participant, sharedSpace, isFirstVisit } = visit;
const response = await anthropic.messages.create({
model: process.env.ANTHROPIC_MODEL, // Any current Claude model ID
max_tokens: 512,
messages: [
{
role: 'user',
content: `Draft a short, warm follow-up email from a sales rep to a buyer who just visited a Shared Space.
Context:
- Buyer: ${participant.firstName ?? participant.email}
- Company: ${participant.company ?? 'unknown'}
- Job title: ${participant.jobTitle ?? 'unknown'}
- Shared Space: ${sharedSpace.name}
- Visit: ${isFirstVisit ? 'first time opening the space' : 'returning to the space'}
- Rep name: ${repName}
Guidelines:
- 3 to 4 sentences maximum
- Tailor the tone to whether this is a first or return visit
- Include a clear, low-pressure next step (offer a call, ask a question)
- No filler phrases like "I hope this email finds you well"
- Do not use subject lines or sign-offs; just the body text
The rep will review and edit before sending.`,
},
],
});
return response.content.find((block) => block.type === 'text').text;
}
5. Deliver the Draft to the Rep
Send the draft to the rep via Slack, email, or CRM task so they can act while the engagement signal is fresh.
async function generateFollowUpDraft(visit) {
const showpadToken = process.env.SHOWPAD_API_TOKEN;
const repName = (await getRepName(visit.sharedSpace.id, showpadToken)) ?? 'your rep';
const draft = await draftFollowUpEmail(visit, repName);
const buyerName = visit.participant.firstName ?? visit.participant.email;
// Deliver via Slack
await fetch('https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
text: `*${buyerName} just visited "${visit.sharedSpace.name}"*\n\nDraft follow-up:\n\n${draft}`,
}),
});
}
A buyer who returns to a space several times in one day doesn't need several drafts. Keep track of when you last sent a draft for each participant and space, and skip repeats within a set window.
Want drafts that mention the specific assets the buyer opened? The
Content Reporting API records these as sharedspace-viewed-asset events,
which you can query by Shared Space and add to the prompt.
For webhook verification and security best practices, see the Verification guide.
Was this page helpful?