A Flask & Twilio Secret Santa app.

Overview

πŸŽ„ ✨ Secret Santa Twilio ✨ πŸ“±


A contactless Secret Santa game built with Python, Flask and Twilio!


demo gif


Prerequisites πŸ“

Setup βš™οΈ

  1. Clone this repo
git clone [email protected]:sjbitcode/secret-santa-twilio.git
  1. Create a .env in the project root with cp .env.example .env
  2. Copy your account sid, auth token, and Twilio phone number from your Twilio account to the .env file
  3. Enter players in numbers.csv file. Check numbers.csv.example for phone number formatting

Note: If you're on a Twilio trial account, these numbers need to be verified with Twilio (see here)

Running the app πŸ€–

  1. From the project root, run make tunnel to create an ngrok tunnel on port 8000
  2. Copy the Forwarding ngrok host to configure your Twilio SMS webhook, ex. http://998ad344.ngrok.io/sms (see here)
  3. In another terminal, cd into the project root and run make app to run the Flask server on port 8000
  4. Any player can start the game by texting start123 to the TWILIO_SENDING_NUMBER

Note: Check out this Medium article for help on getting the Twilio settings and configuring the webhook with ngrok

Settings ℹ️

  • TWILIO_ACCOUNT_SID - (required)
  • TWILIO_AUTH_TOKEN - (required)
  • TWILIO_SENDING_NUMBER - (required)
  • DEBUG - Allows extended visibility into app logs (default False)
  • DOLLAR_BUDGET - Secret Santa budget (default 30)

Note: The START_TRIGGER setting (start123) is not configurable and is case-sensitive!

How does the Secret Santa game work? 🀫 πŸŽ…πŸΌ

The Secret Santa game is triggered by a phrase (start123) that anyone can send to the Twilio phone number.

Once the game has started, an SMS message is sent to everyone asking for their wishlist.

Confirmation SMS messages are sent to players as soon as they send their wishlist.

After all players enter their wishlist, the matches are calculated, and everyone receives a message with their Secret Santa's name, wishlist, and the budget amount.

The game is reset and can be played again.

Check out this flowchart for more detail.

How does the app work? πŸ’»

The app makes use of Twilio's SMS webhook and REST API.

When an SMS message is sent to the Twilio number, Twilio sends a POST request to the webhook (see here).

The app logic will use Twilio's REST Client to send SMS messages to recipients (instead of using TwiML).

Owner
Sangeeta Jadoonanan
drink coffee, code things
Sangeeta Jadoonanan
Powerful Ethereum Smart-Contract Toolkit

Heimdall Heimdall is an advanced and modular smart-contract toolkit which aims to make dealing with smart contracts on EVM based chains easier. Instal

Jonathan Becker 69 Dec 26, 2022
YouTube playlist Files downloaded by FDM are not organized according to the original order on YouTube

Youtube-Playlist-File-Organizer YouTube playlist Files downloaded by Free Download Manager are not organized according to the original order on YouTub

David Mainoo 3 Dec 27, 2021
A Python app which retrieves the rank and players' equipped skins during a match

VALORANT rank yoinker About The Project Usage Contributing Contact Acknowledgements Disclaimer About The Project Their Queue Current Skin Current Rank

Isaac Kenyon 270 Jan 04, 2023
A twitter multi-tool for OSINT on twitter accounts.

TwitterCheckr A twitter multi-tool for OSINT on twitter accounts. Infomation TwitterCheckr also known as TCheckr is multi-tool for OSINT on twitter a

IRIS 16 Dec 23, 2022
This is a tutorial on how to make a Discord Bot using the discord.py library

HowToMakeADiscordBot This Github repository is here to help you code a Discord Bot using the discord.py library! 1 - Setup: Download the code inside t

Baz 1 Oct 31, 2021
Karen is a Discord Bot that will check for a list of forbidden words/expressions, removing the message that contains them and replying with another message.

Karen is a Discord Bot that will check for a list of forbidden words/expressions, removing the message that contains them and replying with another message. Everything is highly customizable.

Rafael Almeida 1 Nov 03, 2021
Scrapping malaysianpaygap & Extracting data from the Instagram posts

Scrapping malaysianpaygap & Extracting data from the posts Recently @malaysianpaygap has gotten quite famous as a platform that enables workers throug

Yudhiesh Ravindranath 65 Nov 09, 2022
radiant discord anti nuke src leaked lol.

radiant-anti-wizz-leaked radiant discord anti nuke src leaked lol, the whole anti sucks but idc. sucks to suck thats tuff bro LMAOOOOOO join my server

ok 15 Aug 06, 2022
We have made you a wrapper you can't refuse

We have made you a wrapper you can't refuse We have a vibrant community of developers helping each other in our Telegram group. Join us! Stay tuned fo

20.6k Jan 04, 2023
E0 AI Bot is based on the message, it prints the answer with the highest probability using probability from the database.

E0 AI Chat Bot Based on the message, it prints the answer with the highest probability using probability from the database. Install on linux (Arch,Deb

Error 27 Dec 03, 2022
Role Based Access Control for Slack-Bolt Applications

Role Based Access Control for Slack-Bolt Apps Role Based Access Control (RBAC) is a term applied to limiting the authorization for a specific operatio

Jeremy Schulman 7 Jan 06, 2022
An advanced Twitter scraping & OSINT tool written in Python that doesn't use Twitter's API, allowing you to scrape a user's followers, following, Tweets and more while evading most API limitations.

TWINT - Twitter Intelligence Tool No authentication. No API. No limits. Twint is an advanced Twitter scraping tool written in Python that allows for s

TWINT Project 14.2k Jan 03, 2023
A simple Discord bot wrote with Python. Kizmeow let you track your NFT project and display some useful information

Kizmeow-OpenSea-and-Etherscan-Discord-Bot δΈ­ζ–‡η‰ˆ | English Ver A Discord bot wrote with Python. Kizmeow let you track your NFT project and display some u

Xeift 93 Dec 31, 2022
A pypi packages finder telegram bot.

PyPi-Bot A pypi packages information finder telegram bot. Made with Python3 (C) @FayasNoushad Copyright permission under MIT License License - https:

Fayas Noushad 17 Oct 21, 2022
Lazy airdrop based on private temporary ids

LobsterDAO This uses a modified MerkleDistributor, which allows to issue a lazy airdrop using temporary IDs. In this example it uses Telegram chat_id

41 Sep 10, 2022
A Telegram Bot to manage your music channel with some cool features.

Music Channel Manager V2 A Telegram Bot to manage your music channel with some cool features like appending your predefined username to the musics tag

11 Oct 21, 2022
A discord bot can stress ip addresses with python tool

Python-ddos-bot Coded by Lamp#1442 A discord bot can stress ip addresses with python tool. Warning! DOS or DDOS is illegal, i shared for educational p

IrgyGANS 1 Nov 16, 2021
A youtube videos or channels tag finder python module

A youtube videos or channels tag finder python module

Fayas Noushad 4 Dec 03, 2021
A quick-and-dirty script to scrape the daily menu of Leipzig University Mensa and send it to a telegram channel.

Feed me Mensa UL A quick-and-dirty script to scrape the daily menu of Leipzig University Mensa and send it to a telegram channel. For food and cat lov

3 Apr 08, 2022
Nflmetrics - Johns Hopkins Spring 2022 Sports Analytics research project about NFL Draft Metrics

nflmetrics GitHub repo for Johns Hopkins Spring 2022 Sports Analytics research p

Anish Kulkarni 4 Feb 24, 2022