Back to Blog
Engineering

Build a Social Media Change-Detection and Slack Alert System

August 17, 2026
6 min read
S
By SociaVault Team
Change DetectionSlackAlertsAutomationMonitoringEngineering

Build a Social Media Change-Detection and Slack Alert System

The worst way to monitor competitors or creators is to open their profiles every morning and eyeball what changed. You'll miss things, you'll waste time, and you'll notice the important stuff late. Change detection flips it: instead of you checking, the system watches and pings you in Slack only when something actually moves, a bio edit, a follower spike, a new post, a link swap. This is a genuinely small build, and it's one of the highest-leverage things you can do with a data API.

Here's the whole thing, end to end.

The pattern: snapshot, diff, notify

Every change-detection system is the same three steps on a loop:

  1. Snapshot the current state of the things you're watching.
  2. Diff the new snapshot against the last stored one.
  3. Notify only when the diff is non-empty and meaningful.

The art is entirely in step 3, deciding what counts as "meaningful" so you get signal, not noise. A follower count that ticked up by 4 isn't an alert; a bio link changing to a competitor's campaign URL is. Get the thresholds right and the system earns its keep; get them wrong and everyone mutes the channel.

Step 1: Snapshot the state you care about

Pull the fields you want to watch. Base URL https://api.sociavault.com/v1, x-api-key header, 1 credit per call, payload under data. For a set of TikTok accounts:

const API_KEY = process.env.SOCIAVAULT_API_KEY;
const BASE = "https://api.sociavault.com/v1";

async function get(path, params) {
  const qs = new URLSearchParams(params).toString();
  const res = await fetch(`${BASE}${path}?${qs}`, {
    headers: { "x-api-key": API_KEY },
  });
  if (!res.ok) throw new Error(`${path} failed: ${res.status}`);
  return (await res.json()).data;
}

async function snapshot(handle) {
  const d = await get("/scrape/tiktok/profile", { handle });
  const stats = d?.stats ?? {};
  const user = d?.user ?? {};
  return {
    handle,
    followers: stats.followerCount ?? null,
    bio: user.signature ?? null,
    bioLink: user.bioLink?.link ?? null, // read defensively; confirm from a real response
  };
}

Store each snapshot keyed by handle (a small database table or even a JSON file to start). You're keeping only the latest snapshot per handle, plus whatever history you want for trends.

Step 2: Diff against the last snapshot

Compare new to old and build a list of meaningful changes, with thresholds so small wiggles don't fire:

function diff(prev, next) {
  if (!prev) return []; // first run: nothing to compare yet
  const changes = [];

  if (prev.bio !== next.bio) {
    changes.push(`bio changed`);
  }
  if (prev.bioLink !== next.bioLink) {
    changes.push(`bio link: ${prev.bioLink ?? "none"} -> ${next.bioLink ?? "none"}`);
  }
  // only alert on a meaningful follower move (e.g. >2% or >1000)
  if (prev.followers && next.followers) {
    const delta = next.followers - prev.followers;
    const pct = Math.abs(delta) / prev.followers;
    if (Math.abs(delta) >= 1000 && pct >= 0.02) {
      changes.push(`followers ${delta > 0 ? "+" : ""}${delta}`);
    }
  }
  return changes;
}

Those thresholds are the whole game. Tune them to your accounts, a mega-creator moves by thousands daily as noise, a small brand moving by 1,000 is real news. There's no universal number; that's why it's a parameter.

Step 3: Notify in Slack

Slack incoming webhooks make the notify step trivial, one POST, no SDK:

async function notifySlack(handle, changes) {
  if (changes.length === 0) return;
  await fetch(process.env.SLACK_WEBHOOK_URL, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      text: `*@${handle}* changed:\n- ${changes.join("\n- ")}`,
    }),
  });
}

Create an incoming webhook in your Slack workspace, store the URL as a secret (never in code), and you've got alerts landing in a channel. The full loop: for each handle, snapshot, diff against stored, notify, then save the new snapshot as the baseline.

Run it on a schedule

Wrap the loop in a scheduled job, a cron, a serverless scheduled function, whatever you have. Daily is plenty for bios and links; hourly if you're watching for fast-moving launches. Space calls with a small delay and lean on the credit-saving habits so a watchlist of 50 accounts stays cheap and predictable. This is the same backbone as a monitoring dashboard, just pushing alerts instead of drawing charts.

The honest limits

  • Thresholds make or break it. Too sensitive and the channel becomes noise everyone mutes; too loose and you miss real moves. Expect to tune them for a week.
  • You detect changes at your polling interval. Daily polling means up-to-a-day-old alerts. Finer resolution costs more credits, choose deliberately.
  • First run can't diff. There's nothing to compare against on the first snapshot, so seed baselines quietly before enabling alerts, or you'll blast a "change" for everything.
  • Public fields only. You can watch public bios, links, follower counts, and posts, not private analytics. Confirm field paths from a real response; they differ per platform.
  • Deletions and edits are tricky. A deleted post or reverted bio between polls can be missed entirely. Change detection sees states, not the full history between them.

Frequently Asked Questions

What is social media change detection?

It's an automated system that snapshots accounts you're watching, compares each new snapshot to the last, and alerts you only when something meaningful changes, a bio edit, a follower spike, a new link, a new post, so you stop manually checking profiles.

How do I get alerts into Slack?

Use a Slack incoming webhook: create one in your workspace, store the URL as a secret, and POST a JSON message to it when your diff finds a meaningful change. It's a single HTTP request, no SDK required.

How do I avoid alert spam?

Set thresholds on what counts as meaningful, ignore tiny follower wiggles, alert on percentage or absolute moves that matter for that account, and on real bio/link/post changes. Tuning thresholds to each account is the key to a channel people actually read.

How often should the system check?

Match the interval to how fast you need to know. Daily suits bios and links; hourly suits fast-moving launches. Finer polling gives fresher alerts but costs more credits, since each check is a call per account.

What can I monitor for changes?

Any public field the API returns: bios, bio links, follower counts, display names, and new posts. You can't detect changes in private analytics like reach or impressions, only what's publicly visible.

How many credits does monitoring use?

One credit per account per check. A 50-account watchlist checked daily is about 50 credits a day, predictable and cheap. You start with 50 free credits and no card.


Want to be pinged when a competitor changes something, instead of finding out late? Start free with 50 credits, no card required and build your first alert loop today.

Found this helpful?

Share it with others who might benefit

Ready to Try SociaVault?

Start extracting social media data with our powerful API. No credit card required.