GTBitsOfGood / hdg-chatbot

An Azure Functions (FaaS) Serverless WhatsApp/SMS chatbot that leverages the Twilio API and a MongoDB backend to guide users through educational modules created by Health and Development in Guatemala, an Emory-based organization.
GNU General Public License v3.0
4 stars 1 forks source link

add mass messages #8

Closed Arisusu closed 3 years ago

Arisusu commented 3 years ago

Changes for summary:

  1. Added a timer trigger azure function. This is currently set to run once a day, at EST 8am or 9am in Guatemala
  2. Added some extra files to the git ignore that I think are generated by azurite (storage emulator)
  3. Added ability to text users when they meet a criteria
  4. Changed UserState Interface name from "State" to "IUserState" so that it made more sense when importing
  5. Removed completedModules from UserState. Renamed completedTimes to moduleCompletionTime

Notes for myself/future:

  1. Code will need to be updated when the phone number is no longer just stored as the userId
  2. Need twilio authentication to be updated in the .env (talked to matt about this)
  3. Slight update on how to run project which is just running azurite in another terminal
  4. Not sure if time zone will have an impact on how dates are stored? Don't think it does and if it does the impact should be minimal with current criteria

Results from some testing (changed the phone numbers in MongoDB so it just texted me) Users that haven't been active for exactly 2 months: image

Users that have completed modules exactly 2 months ago image