Pins to Stickers - A simple project that fetches new images from your specified Pinterest boards and bundles them into new WhatsApp sticker packs.
This project uses a manual-check approach. It does not remove image backgrounds and instead creates new, temporary sticker packs each time you check, rather than trying to update old ones.
This project is split into two parts: a simple Python backend and a lightweight mobile app.
- A Python script (using Flask) waits for a request from your mobile app.
- When triggered, it polls your Pinterest boards ('sad', 'neutral', 'joy') using the Pinterest API.
- It checks a local database (SQLite) to see which pins it has already processed.
- For any new pins, it downloads the image, resizes it to 512x512, and converts it to
.webpformat (under 100 KB). - It then sends a list of these new sticker files back to your mobile app.
- You open the app and press a "Check for New Stickers" button.
- The app calls your backend server.
- It receives the list of new
.webpstickers. - It then dynamically groups these stickers into a new pack (e.g., "New Sad Stickers 11-10-2025").
- The app displays an "Add to WhatsApp" button for this new pack.
- You tap the button, WhatsApp opens, and you confirm the import.
- Language: Python 3
- API Framework: Flask (or FastAPI) to create a simple API endpoint for the mobile app to call
- API Client: Requests library to communicate with the Pinterest API
- Image Processing: Pillow (PIL) for resizing images and converting them to
.webpformat - Database: SQLite to keep a simple list of processed pin IDs, so you don't get duplicates
- API: Pinterest API v5
- Framework: Flutter (or React Native) to build a simple, cross-platform (Android/iOS) app
- HTTP Client:
httppackage (for Flutter) to call your backend API - Sticker Integration: A platform-specific sticker pack library (like
whatsapp_stickers_plusfor Flutter) that can call the native WhatsApp intent to add a sticker pack
-
Get Pinterest API Key: Go to the Pinterest Developer site, create an app, and get your API access token.
-
Configure Boards: Edit
config.py(or similar) and add your specific Pinterest Board IDs for 'sad', 'neutral', and 'joy'. -
Install Dependencies:
pip install Flask requests Pillow- Run Server:
python app.py- Clone the Repo:
git clone https://github.com/yourusername/pinicker.git-
Set Server URL: In the app's configuration (e.g.,
lib/constants.dart), change theAPI_URLto point to your backend server's address (e.g.,http://192.168.1.10:5000). -
Build the App:
flutter pub get
flutter run- Run: Open the app and tap the "Check" button.
- Manual Action Required: You must open the app and manually tap "Add to WhatsApp" every time. This is a security feature of WhatsApp.
- No Background Removal: This version uses the raw Pinterest image as the sticker.
- Multiple Packs: This approach will create many new sticker packs in your WhatsApp (e.g., "New Joy Stickers 1", "New Joy Stickers 2"). You will need to manually delete old packs from WhatsApp if your list gets too cluttered.
- 3-Sticker Minimum: WhatsApp requires a minimum of 3 stickers per pack. If the script only finds 1 or 2 new pins, it may need to wait or add placeholders (not currently implemented).
- Implement a "placeholder" system to fill packs that have fewer than 3 new stickers.
- Add an optional toggle to use an AI background removal library (like
rembg). - Create a "cleanup" function to merge multiple small packs.
It is licensed under MIT License.
Fork and start contributing for any discrepencies or new features.