Appointment reminders allow you to automate the process of reaching out to your customers in advance for an upcoming appointment. In this sample, you'll learn how to use Twilio to create automatic appointment reminders for your business users. Use appointment reminders to reduce no-shows and ensure customers have everything they need in advance of an appointment. Whether you're a dentist, doctor, cable company, or car repair shop, you can use automated appointment reminders to save time and money.
This sample includes the code required to implement an appointment reminder web application and scheduling job.
This application shows how appointment reminders with Twilio can work. It will set up a barebones web application that allows you to create appointments that are being stored in a database.
The application has a background scheduled function running every minute checking if it has to send out any notifications. If it has to send out a notification it will send out an SMS using Twilio Programmable SMS to the phone number stored with the respective appointment.
- Receive notifications using Programmable SMS .
- User interface to create reminders.
- Small JSON database using lowdb.
- Execute reminders on a schedule using node-cron.
This application should give you a ready-made starting point for writing your own appointment reminder application. Before we begin, we need to collect all the config values we need to run the application:
Config Value | Description |
---|---|
Account Sid | Your primary Twilio account identifier - find this in the Console. |
Auth Token | Used to authenticate - just like the above, you'll find this here. |
Phone number | A Twilio phone number in E.164 format - you can get one here |
After the above requirements have been met:
- Clone this repository and
cd
into it
git clone [email protected]:twilio-labs/sample-appointment-reminders-node.git
cd sample-appointment-reminders-node
- Install dependencies
npm install
- Set your environment variables
npm run setup
See Twilio Account Settings to locate the necessary environment variables.
- Run the application
npm start
Alternatively, you can use this command to start the server in development mode. It will reload whenever you change any files.
npm run dev
- Navigate to http://localhost:3000
That's it!
You can run the tests locally by typing:
npm test
Additionally to trying out this application locally, you can deploy it to a variety of host services. Here is a small selection of them.
Please be aware that some of these might charge you for the usage or might make the source code for this application visible to the public. When in doubt research the respective hosting service first.
Service | |
---|---|
Heroku | |
Glitch | |
Zeit |
- Appointment reminders tutorial
- Build appointment reminders in Studio (Video)
- Appointment reminders glossary
This template is open source and welcomes contributions. All contributions are subject to our Code of Conduct.
No warranty expressed or implied. Software is as is.