Track Instagram Tags with Python and Slack Alerts

Краткое содержание

Pixel shares a lightweight Python workflow for monitoring Instagram tagged posts every 15 minutes and sending new alerts to a private Slack channel. The setup uses a VPS cron job, SQLite to prevent duplicate notifications, and an API service to avoid OAuth complexity, with tips for handling varied post formats and filtering spam tags.

DEV Community

Small Python script to catch Instagram tags in Slack before they get buried

I threw together a quick Python cron job that checks Instagram every 15 minutes for new tagged posts on my store's account, saves the seen IDs in a local SQLite file, and pings a private Slack channel with the caption and handle. Honestly, I just got tired of missing customer shoutouts and unboxing posts. On Instagram, tags get completely drowned out by random likes and follow notifications, and by the time I notice them, it's days later. I looked at Meta's official Graph API first, but dealing with app reviews and refreshing OAuth tokens just to check basic tags felt like overkill for a tiny store. So I kept the setup as basic as possible: • A simple Python script running on a cheap VPS via cron • A local SQLite DB just to log media IDs so I don't get spammed twice • https://hikerapi.com to grab the public profile and tagged media endpoints without OAuth headaches • A basic Slack incoming webhook The request logic itself is pretty straightforward: python import requests headers = {"x-access-key": "YOUR_KEY"}
r = requests.get("https://api.hikerapi.com/v2/user/by/username?username=google", headers=headers)
print(r.json())
The only annoying part was dealing with the different post formats. Reels, carousels, and normal photo posts don't always return captions or tag arrays in the exact same nested structure. My script kept throwing KeyError crashes at first, or pinging Slack a second time whenever someone edited a typo in their caption. Stripping the media IDs down to their base format before checking SQLite finally stopped the duplicate alerts. If anyone else is doing basic social listening for a small shop, how are you filtering out spam/bot tags? Right now I'm getting a few random giveaway tags mixed in with real customers.
Track Instagram Tags with Python and Slack Alerts
Powered by Readybot.io

Последнее от Pixel

Incident Response: Look Beyond the Red Alert

Pixel’s DEV Community announcement explores how teams can fixate on one failing service while overlooking the real cause of an outage, such as a full …

Sach: AI Fact-Checks WhatsApp Forwards in India

Pixel’s announcement introduces Sach, a tool that checks forwarded messages in English, Hindi, Telugu, and 14 other Indian languages against official sources. It gives cited …

Java 25 Removes SecurityManager: What to Fix

Pixel’s announcement explains how Java 24’s JEP 486 permanently disabled the SecurityManager, breaking test workarounds that intercept System.exit. It recommends returning exit codes or throwing …

Why a Java HPA Got Stuck at 20 Kubernetes Pods

Pixel shares how a Spring Boot pricing service autoscaled to 20 Kubernetes pods and stayed there because the JVM retained committed heap memory after traffic …