Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Social Saver WhatsApp Bot 🤖

What's this all about?

You know how we all do it - scrolling through Instagram, finding cool workout videos, design tips, or coding hacks, hitting that save button... and never looking at them again? They just sit there in a hidden folder, forgotten forever.

I built this bot to fix exactly that.

The Problem I Wanted to Solve

Instagram is great for inspiration but terrible for organization. WhatsApp is where we actually chat and share things, but it's not built for storage. So I thought - why not combine them?

What My Bot Does

It's simple. You forward an Instagram link to a WhatsApp number, and my bot:

  1. Reads the link
  2. Figures out what it's about (fitness, coding, food, etc.)
  3. Saves it to a website where you can actually find it later

The Features (What Actually Works)

WhatsApp Integration - Just forward any Instagram post or reel ✅ Smart Categorization - Tries to figure out if it's Fitness, Coding, Food, Travel, or Design ✅ One-Line Summaries - So you remember what you saved ✅ Web Dashboard - All your saved stuff in one place ✅ Search - Finally find that recipe you saved 2 weeks ago
Random Button - When you need inspiration

What I Used to Build It

  • Python/Flask for the backend (what I'm comfortable with)
  • Twilio for WhatsApp (their sandbox is free for testing)
  • Google Gemini AI (the free tier - no costs involved)
  • HTML/CSS/JavaScript for the dashboard
  • JSON file for storage (kept it simple, no database headaches)
  • ngrok to connect my local computer to the internet

How It Actually Works (Step by Step)

  1. You send an Instagram link to the WhatsApp number
  2. My code grabs the link and tries to extract info (Instagram's API is tricky, so I built fallbacks)
  3. It sends the caption to Gemini AI (or uses keywords if AI fails)
  4. The AI decides what category it belongs to and writes a quick summary
  5. Everything gets saved to a JSON file
  6. The web dashboard reads that file and shows all your saved posts
  7. You can search, filter, or click the random button

The Not-So-Fun Parts (Challenges)

  • Instagram's API doesn't always cooperate - built 3 different ways to extract data
  • Keeping API keys secret (almost pushed them to GitHub once!)
  • Making sure the bot doesn't crash when something unexpected happens
  • Getting the webhook to work with ngrok (spent way too long on this)

What's Next (If I Had More Time)

  • Add Twitter/X support
  • Let users create their own categories
  • Make it work for multiple users (right now it's one dashboard)
  • Better error messages when things fail
  • Export your saved stuff as CSV or PDF

Try It Yourself

Want to test it? Here's how:

# Clone the repo
git clone https://github.com/SumitPanigrahi171/social-bot
cd social-saver-bot

# Install what you need
pip install -r requirements.txt

# Add your Gemini API key to .env file
# Get a free key from https://makersuite.google.com/app/apikey

# Run it
python app.py

# In another terminal, expose it with ngrok
ngrok http 5000

# Update Twilio webhook with your ngrok URL + /webhook
# Send a message to your WhatsApp sandbox number

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages