- Node.js
- Twilio Account with a Twilio Number
- Make sure to enable any regions you want to use in your Twilio Geo Permissions. For example, if you want to use the US and Canada, make sure to enable those +1 regions.
- Clone this repository and
cd
into it - Run
npm install
oryarn install
to install dependencies - Copy the
.env.example
file to.env
and fill in your Twilio credentials
cp example.env .env
- Copy
inout/example.participants.json
file toinput/participants.json
and update your list of participants
cp input/example.participants.json input/participants.json
- Copy
input/example.blacklist.json
file toinput/blacklist.json
. For each member in the blacklist, add a list of other member names (must match the name in theinput/participants.json
file) that they should not be a secret santa for.
cp input/example.blacklist.json input/blacklist.json
-
Edit the message that you want to send to your participants in
input/message.hbs
-
Generate the
output/secretSanta.json
file. This file is encrypted and contains the secret santa assignments.
yarn generate
- Verify the
output/secretSanta.json
file passes all tests
yarn test
- Now notify all your secret santas!
yarn notify
All receipts for messages sent are stored locally in the timestamped receipts_<TIMESTAMP>.json
files or you can just log into your Twilio dashboard to see the receipts.
You can set the DRY_RUN
environment variable to true
to test the script without sending any messages. This will log to the console the messages that would be sent but will not send any messages. Please note that you will be able to see the secret santa assignments in the console logs.
If you ever want to reveal the contents of the output/secretSanta.json
file, you can run the following command:
yarn reveal
This will decrypt the file and save it to output/decryptedSecretSanta.json
in plaintext.