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
Backend.AI Client Library for Python

Backend.AI Client The official API client library for Backend.AI Usage (KeyPair mode) You should set the access key and secret key as environment vari

Lablup 10 Feb 10, 2022
Diablo II Resurrected helper

Diablo II Resurrected 快捷施法辅助 功能: + 创建守护进程,注册全局热键 alt+/ 启用和关闭功能 (todo: 播放声音提示) + 按 x 强制移动 + 按 1 ~ 0 快捷施法到鼠标区域 使用 编辑配置 settings.py 技能信息做如下定义: SKILLS:

Wan 2 Nov 06, 2022
Recommended AWS CDK project structure for Python applications

Recommended AWS CDK project structure for Python applications The project implements a user management backend component that uses Amazon API Gateway,

AWS Samples 110 Jan 06, 2023
Discord opsiyonel detaylı hava durumu botu

WeatherBot Discord opsiyonel detaylı hava durumu botu önümüzdeki Perşembe ──► önümüzdeki Çarşamba ┌─────────┐┌─────────┐┌─────────┐┌───────

DejaVu 16 Dec 19, 2022
Sie_banxico - A python class for the Economic Information System (SIE) API of Banco de México

sie_banxico A python class for the Economic Information System (SIE) API of Banco de México. Args: token (str): A query token from Banco de México id_

Dillan 2 Apr 07, 2022
PyMusic Player is a music player written in python3.

PyMusic Player is a music player written in python3. It harvests r

PythonSerious 2 Jan 30, 2022
telegram bot that calculates file hash / Dosya toplamı hesaplayan telegram botu

Telegram File Hash Bot FileHashBot: 🇬🇧 Bot that calculates file hashes. 🇹🇷 Dosya toplamları hesaplayan bot. Demo in Telegram: @FileHashBot 🇬🇧 Se

Hüzünlü Artemis [HuzunluArtemis] 5 Jun 29, 2022
A Open source Discord Token Grabber with several very useful features coded in python 3.9

Kiwee-Grabber A Open source Discord Token Grabber with several very useful features coded in python 3.9 This only works on any python 3.9 versions. re

Vesper 40 Jan 01, 2023
This is a translator that i made by myself in python with the 'googletrans' library

Translator-Python This is a translator that i made by myself in python with the 'googletrans' library This application completely made in python allow

Thadeuks 2 Jun 17, 2022
PlexAutoSkip - Automatically skip content in Plex

PlexAutoSkip Automatically skip tagged content in Plex A background python scrip

Michael Higgins 97 Dec 21, 2022
Simple Telegram Bot to extract various types of archives from a telegram file or a direct link

Unzipper Bot A Telegram Bot to Extract Various Types Of Archives Features Extract various types of archives like rar, zip, tar, 7z, tar.xz etc. Passwo

I'm Not A Bot #Left_TG 93 Dec 27, 2022
A discord bot thet lets you play Space invaders.

space_Invaders A discord bot thet lets you play Space invaders. It is my first discord bot... so please give any suggestions to improve it :] Commands

2 Dec 30, 2021
A script to automatically update bot status at GitHub as well as in Telegram channel.

Support BotStatus ~ A simple & short repository to show your bot's status in your GitHub README.md file as well as in you channel. ⚠️ This repo should

Jainam Oswal 55 Dec 13, 2022
Feedback-TelegramBot is a resemblance bot which can be deployed on server

Feedback-TelegramBot Feedback-TelegramBot is a resemblance bot which can be deployed on server This work is based on Telegram library, thanks to their

2 Jan 03, 2022
A Discord bot that generates inspirational quotes & motivating messages whenever a user is sad

Encourage bot is a discord bot that allows users to randomly get Inspirational quotes messages and gives motivational encouragements whenever someone says that he's sad/depressed.

1 Nov 25, 2021
“ Hey there 👋 I'm Daisy „ AI based Advanced Group Management Bot Suit For All Your Needs ❤️.. Source Code of @Daisyxbot

Project still under heavy development Everything will be changed in the release “ Hey there 👋 I'm Daisy „ AI based Advanced telegram Group Management

TeamDaisyX 43 Nov 12, 2022
Erhalten Sie wichtige Warnmeldungen des Bevölkerungsschutzes für Gefahrenlagen wie zum Beispiel Gefahrstoffausbreitung oder Unwetter per Programmierschnittstelle.

nina-api Erhalten Sie wichtige Warnmeldungen des Bevölkerungsschutzes für Gefahrenlagen wie zum Beispiel Gefahrstoffausbreitung oder Unwetter per Prog

Bundesstelle für Open Data 68 Dec 19, 2022
Defi PancakeSwap bot is programmed in Python to buy and sell tokens in seconds once the target is hit.

Defi PancakeSwap BOT A BOT that will make easy your life in Trading. Watch tutorial on Youtube Table of Contents About The Project Built With Getting

Zain Ullah 208 Jan 05, 2023
Space Bot, a Discord bot built for HackerSpace Club of PES University

Space Bot Space Bot, a Discord bot built for HackerSpace Club of PES University What can Space Bot do? Space Bot allows you to lookup any mentor or to

HackerSpace @PESU 7 Oct 23, 2022
a translator bot for discord

TranslatorBOT it is a simple and powerful discord bot, it been used for translating includes more than 100 language, it has a lot of integrated comman

Mear. 2 Feb 03, 2022