Help: Sending conditional SMS templates based on c...
# support
n
Hey all! I'm trying to implement a feature where my phone agent sends different templated SMS messages based on what the caller says during the conversation. Specifically: - When caller says they're "interested" → Send Template A - When caller says "not interested" → Send Template B - When they request to "call back later" → Send Template C My current approach: 1. Vapi captures the transcript during/after the call 2. Trying to use some kind of conditional logic to detect these phrases/intents 3. Want to trigger the appropriate SMS template when detected Is there a recommended way to: 1. Analyze the transcript for these specific intents? 2. Trigger different SMS templates based on that analysis? 3. Set this up within the Vapi workflow? Or use Make/N8N Any code examples or best practices would be super helpful! Thanks in advance :pray:
v
To trigger SMS templates based on call transcript analysis: 1. Create a custom tool in Vapi and associate it with your assistant:
Copy code
javascript
// In your server endpoint that receives Vapi webhooks
app.post('/webhook', async (req, res) => {
  const transcript = req.body.message?.artifact?.transcript;
  
  // Simple intent detection
  if (transcript.includes("interested")) {
    sendSMS(templateA);
  } else if (transcript.includes("not interested")) {
    sendSMS(templateB);
  } else if (transcript.includes("call back later")) {
    sendSMS(templateC);
  }
});
Enable
serverMessages: ['end-of-call-report']
in your assistant configuration to receive the complete transcript. Sources: - [Discord message about custom tools](https://discord.com/channels/1211482211119796234/1333245023319494707) - [Discord message about end-of-call reports](https://discord.com/channels/1211482211119796234/1342410769232302122)
v
Message marked as helpful by @Nikol Digital 💚🧩! 🎉
k
checking if this is resolved/solved for you?
n
Hi, no… wondering abt how to build it on Make
k
Use Vapi’s structuredDataPrompt to detect caller intent, then use Make to read that data post-call and trigger the appropriate SMS template based on the detected intent.

https://youtu.be/zZEbWqfK9sU?si=gN6dpoQV5I_ozN6lâ–¾

4 Views