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
Read API docs offline, CLI, supports DevDocs.io compatible JSON files

Read API docs offline, CLI, supports DevDocs.io compatible JSON files

Tero Karvinen 3 Oct 18, 2022
Discord raiding tool. Made in python 3.9

XSpammer Discord raiding tool with 20 features. YT Showcase Requirements/Installation Python 3.7+ [https://python.org] Run setup.bat to install the es

Tiie 6 Oct 24, 2022
python based bot Sends notification to your telegram whenever a new video is released on a youtube channel!

YTnotifier python based bot Sends notification to your telegram whenever a new video is released on a youtube channel! REQUIREMENTS telethon python-de

Mohamed Rizad 6 Jul 23, 2022
Student-Management-System-in-Python - Student Management System in Python

Student-Management-System-in-Python Student Management System in Python

G.Niruthian 3 Jan 01, 2022
Facebook Clooning Tool BD...

Facebook Clooning Tool BD...

Ariyan Ahmed Mamun 2 Feb 16, 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
Very Sempil Bot Auto Filter bot

SAMANTHA_BOT Very Sempil Bot Auto Filter bot ##[ # ๐‚๐‹๐ˆ๐‚๐Š ๐๐„๐‹๐Ž๐– ๐ˆ๐Œ๐€๐†๐„ ๐“๐Ž ๐ƒ๐„๐๐‹๐Ž๐˜ ๐Ÿ‘‡ ๐Ÿ‘‡ ๐Ÿ‘‡ Auto Filter Manuel Filter IMDB Admin Co

DARK WEBLOAD 3 Jun 27, 2022
Discord bot that shows valorant your daily store by using the Ingame API

Valorant store checker - Discord Bot Discord bot that shows valorant your daily store by using the Ingame API. written using Python and the Pycord lib

STACIA 226 Jan 02, 2023
Generate visualizations of GitHub user and repository statistics using GitHubActions

GitHub Stats Visualization Generate visualizations of GitHub user and repository

Jun Shi 3 Dec 15, 2022
Discord Token Generator of a project - Some stupids ppl are trying to leak it so i'm leaking faster :)

Original creator: Rolf (dort) HCaptcha Bypasser: h0nde Shark.Solar Discord Token Generator of a project - Some stupids ppl are trying to leak it so i'

Stanley 14 Sep 29, 2021
The Easy-to-use Dialogue Response Selection Toolkit for Researchers

Easy-to-use toolkit for retrieval-based Chatbot Our released data can be found at this link. Make sure the following steps are adopted to use our code

GMFTBY 32 Nov 13, 2022
Scrapes an instagram user's photos and videos

Instagram Scraper instagram-scraper is a command-line application written in Python that scrapes and downloads an instagram user's photos and videos.

7.3k Nov 18, 2022
An incomplete add-on extension to Pyrogram, to create telegram bots a bit more easily

PyStark A star โญ from you means a lot An incomplete add-on extension to Pyrogram

Stark Bots 36 Dec 23, 2022
Weather telegram bot with aiogram, on Russian language

weather_bot Weather telegram bot with aiogram, on Russian language #RU ะ‘ะพั‚ ะฟะพ ะพะฟั€ะตะดะตะปะตะฝะธัŽ ะฟะพะณะพะดั‹ ะฒ Telegram, ะฝะฐะฟะธัะฐะฝะฐ ะฝะฐ ะฑะธะฑะปะธะพั‚ะตะบะต aiogram, ะฒะตััŒ ะธะฝั‚ะต

LinkxWan 0 Jan 06, 2022
A Python Discord bot project generator

Heater Heat up a Discord bot in a blink What is Heater? Heater is a Command Line Interface tool which allows you to generate a barebones Python Discor

DevGuyAhnaf 5 Jan 14, 2022
ESOLinuxAddonManager - Very simple addon manager for Elder Scrolls Online running on Linux.

ESOLinuxAddonManager Very simple addon manager for Elder Scrolls Online running on Linux. Well, more a downloader for now. Currently it's quite ugly b

Akseli 25 Aug 28, 2022
Role Discord Members (by username) from File

Role Discord Members (by username) from File Bot Setup Navigate to https://discord.com/developers/applications Create a new application Navigate to th

Dylan Orrell 3 Jan 06, 2022
OpenVisionAPI client

OpenVisionAPI Client ๐Ÿš€ Getting Started Prerequisites Installing Install the dependencies $ make setup Usage $ source .venv/bin/activate $ ./ova_clie

Open Vision API 40 Nov 11, 2022
Updater for PGCG (Paradox Game Converters Group) converters written in Python.

Updater Updater for PGCG (Paradox Game Converters Group) converters written in Python. Needs to be put inside an "Updater" directory in the root conve

Paradox Game Converters 2 Jan 10, 2022