Skip to content

aashi2912/cn_tower_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

🗼 CN Tower Color Bot

Every evening at 8pm, this bot:

  1. Scrapes tonight's CN Tower lighting color from cntower.ca
  2. Generates a fun AI fact using Claude
  3. Sends it straight to your WhatsApp via Twilio

Setup (15 minutes, I promise)

Step 1 — Install Python dependencies

pip install -r requirements.txt

Step 2 — Get your free Twilio WhatsApp sandbox

  1. Sign up at twilio.com (free)
  2. Go to Messaging → Try it out → Send a WhatsApp message
  3. Follow instructions to connect your WhatsApp number to the sandbox
  4. Note your Account SID and Auth Token

Step 3 — Get your Anthropic API key

  1. Sign up at console.anthropic.com
  2. Create an API key under API Keys

Step 4 — Set your environment variables

export TWILIO_ACCOUNT_SID="ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
export TWILIO_AUTH_TOKEN="your_auth_token"
export MY_WHATSAPP="whatsapp:+1XXXXXXXXXX"   # your WhatsApp number with country code
export ANTHROPIC_API_KEY="sk-ant-xxxxxxxx"

Or just paste them directly into cn_tower_bot.py (lines 20–26).

Step 5 — Run it!

python cn_tower_bot.py

The bot will fire once immediately, then every evening at 8:00 PM.


Sample WhatsApp Message

🩷 CN Tower Tonight — Saturday, March 15

🎨 Color: Pink
📌 Why: In honor of International Day of Pink, celebrating inclusion

💡 Fun fact: The CN Tower has been lit in over 200 unique colors and
combinations since LED lighting was introduced — it can produce virtually
any shade in the visible spectrum.

_Powered by CN Tower Bot 🗼_

Keep it running 24/7 (optional)

Run it in the background on your Mac/Linux:

nohup python cn_tower_bot.py &

Or use a free cloud service like Railway or Render to host it permanently.


Tech Stack

Component Tool Cost
Lighting schedule CN Tower website scraper Free
AI fun fact Anthropic Claude API ~$0.001/day
WhatsApp message Twilio Sandbox Free (sandbox)
Scheduler Python schedule library Free

Total cost: ~$0.03/month


Built in a weekend. 80 lines of Python. Zero regrets. 🗼

About

Python bot using Claude API + Twilio that sends a daily WhatsApp message at 8pm with a fun fact about that night's CN Tower lighting cause. ~100 lines, under 1¢/day.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages