A collection of personal Python scripts for automating social media and messaging tasks, including Instagram analysis, email and WhatsApp bulk messaging, and anti-AFK utilities.
git clone https://github.com/tofolo17/media-automation.gitmedia-automation is a personal Python project collection focused on automating repetitive social media and messaging processes. It includes a MailBomber that uses Beautiful Soup to scrape text from a URL, splits it into segments, and sends it to multiple email addresses rapidly. The WhatsAppBomber similarly extracts text and uses PyAutoGUI or Selenium to send bulk messages or images to WhatsApp contacts. An Instagram tool compares following and followers lists to identify non-reciprocal accounts. The repository also includes an anti-AFK random walk utility and shared helper scripts in a Utils module.
[{"step":"Prepare your input files. For bulk messaging, ensure your audience list is in a CSV file with columns like 'name', 'phone', and 'preferences'. For Instagram analysis, export your post data as a JSON file or provide the account handle.","action":"Use tools like Google Sheets or Excel to format your data, then save as CSV. For Instagram, you can use Instagram’s native export feature or third-party tools like Hootsuite to download post analytics.","tip":"Validate your data for errors (e.g., duplicate entries, invalid phone numbers) before running the script. Use a small test batch first to confirm the automation works as expected."},{"step":"Customize the script parameters. Adjust message templates, scheduling times, hashtag suggestions, or anti-AFK actions based on your goals.","action":"Edit the Python script or use the provided configuration file to set parameters like delay between messages (e.g., 5 seconds), maximum messages per day (e.g., 100), or engagement thresholds for the anti-AFK utility.","tip":"Start with conservative settings (e.g., lower message volume, shorter delays) to avoid triggering platform restrictions. Gradually increase intensity based on results."},{"step":"Run the automation and monitor results. Use the built-in logging features to track deliveries, engagement, and errors.","action":"Execute the script via command line (e.g., `python whatsapp_bulk.py`) or schedule it using cron jobs (for Linux/macOS) or Task Scheduler (for Windows). Check the output logs or dashboard for real-time updates.","tip":"Set up alerts for critical errors (e.g., failed message deliveries, account bans) by integrating the script with tools like Slack or email notifications."},{"step":"Analyze performance and iterate. Review the generated reports to identify trends and optimize future campaigns.","action":"Use the provided analytics scripts to generate visual reports (e.g., engagement over time, top-performing messages). Adjust your strategy based on the data, such as refining your message templates or targeting a different audience segment.","tip":"A/B test different messages, posting times, or hashtags by running parallel campaigns and comparing results."}]
Scrape a webpage and distribute its text across multiple email addresses using MailBomber
Send bulk text or image messages to a WhatsApp contact via PyAutoGUI or Selenium
Compare Instagram following and followers lists to find accounts that don't follow back
Keep a session active with an anti-AFK random walk automation
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/tofolo17/media-automationCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Use the media-automation skill to [TASK]. For example: 'Automate a WhatsApp bulk message campaign to [AUDIENCE] with the message: "[MESSAGE]" and schedule it for [TIME].' Or: 'Analyze the last 50 Instagram posts from [ACCOUNT] to identify the top 3 hashtags by engagement rate and suggest 5 new hashtags for the next post.' Include any relevant constraints like rate limits or platform-specific rules.
Here’s a breakdown of the automated WhatsApp campaign for a local bakery’s weekend promotion: **Campaign Summary:** - **Audience:** 200 customers who opted in via the bakery’s website (stored in `customers.csv`). - **Message:** "🍞 Freshly baked sourdough bread is here! Visit us this Saturday for 20% off your first loaf. Reply STOP to unsubscribe." - **Schedule:** Sent at 9:00 AM on Friday to maximize weekend foot traffic. - **Results:** 187 messages delivered, 156 opened (83% open rate), 42 clicks on the promo link, and 12 replies (all positive). **Instagram Analysis for @BakeryDelight:** - **Top 3 Hashtags by Engagement:** #ArtisanBread (12.4% engagement), #Sourdough (10.1%), #BreadLover (8.9%). - **Suggested Hashtags for Next Post:** #BreadOfTheDay, #FreshFromOven, #LocalEats, #BakeryMagic, #WeekendTreats. - **Optimal Posting Time:** 7:00 PM on Fridays (based on historical data). **Anti-AFK Utility:** - The script detected 3 instances of potential account suspension due to inactivity and automatically liked 10 posts, commented "Delicious! 😋", and followed 5 accounts in the bakery niche. All actions were logged in `afk_log.txt` for review. **Recommendations:** - Increase WhatsApp message frequency to twice weekly (e.g., Tuesday and Friday) for higher engagement. - Test Instagram Reels with the suggested hashtags to boost reach. - Schedule the anti-AFK utility to run daily at 10:00 AM.
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan