Skip to content

twilio-contact-center/sample-appointment-reminders-node

 
 

Repository files navigation

Twilio

Appointment Reminders powered by Twilio

Actions Status

About

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.

How it works

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.

Features

  • Receive notifications using Programmable SMS .
  • User interface to create reminders.
  • Small JSON database using lowdb.
  • Execute reminders on a schedule using node-cron.

Set up

Requirements

Twilio Account Settings

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

Local development

After the above requirements have been met:

  1. Clone this repository and cd into it
git clone [email protected]:twilio-labs/sample-appointment-reminders-node.git
cd sample-appointment-reminders-node
  1. Install dependencies
npm install
  1. Set your environment variables
npm run setup

See Twilio Account Settings to locate the necessary environment variables.

  1. 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
  1. Navigate to http://localhost:3000

That's it!

Tests

You can run the tests locally by typing:

npm test

Cloud deployment

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 Deploy
Glitch Remix on Glitch
Zeit Deploy with ZEIT Now

Resources

Contributing

This template is open source and welcomes contributions. All contributions are subject to our Code of Conduct.

Visit the project on GitHub

License

MIT

Disclaimer

No warranty expressed or implied. Software is as is.

About

Send automatic reminders about scheduled events using Node.js and Twilio SMS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 69.9%
  • HTML 29.7%
  • CSS 0.4%