Simple SMS drip campaign driven by Convex
I work for a landscape lighting company, and each person who fills out the request form on our website is sent an immediate SMS response with some questions about what ideas they might have for their project. However, not everyone responds to that request right away. The Christmas season is really busy for us, so in order to save our lone sales exec from following up with each request directly—on top of his other duties, which are plentiful— I was asked to create a SMS drip campaign. Here's how I put it together.
3 Replies
The goal of the campaign is simply to prompt the contact to reply via SMS. The drip system that I was asked to create would send pre-written follow-up messages twice a day—at 8 am and 4 pm—over the four days following each contact's initial request, with no messages sent on Sundays. The drip stops after four days if there’s no reply. If the contact replies via SMS, or a meeting is scheduled with them, the drip is terminated early.
Our databases and business logic for the message delivery and early drip termination still reside outside of Convex for now (on Airtable and DigitalOcean, respectively), but I felt that using Convex to trigger the delivery system at the appropriate times would be the most efficient approach out of all the options at my disposal.
This was my first time using a self-scheduled action, and it came together very easily. The action I created accepts a single
timeOfDay
string argument, with the value being either “AM” or “PM”. Each action:
- Calls a serverless function on DigitalOcean, passing the received timeOfDay
value. This other logic handles retrieving contact data and sending appropriate drip sequence text messages.
- Schedules the next action to run at the appropriate time, passing the alternate timeOfDay
value from the one received.
Here’s the code for the action:
To launch the first of these actions, I created another internal action that I would only run directly from the Convex dashboard:
I know this isn’t a terribly complex setup, but maybe something here will be useful to someone else.Thanks for sharing! Sometimes, simple and effective is best, like almost all the time! 🙏🏽
nice project!