NotiFi
Integrations

UniFi stock alerts in Discord.

Discord webhooks expect Discord's own message format, so NotiFi's alert payload needs one small hop in between: a relay that reshapes the JSON and forwards it. A free Cloudflare Worker does it in about twenty lines, all pasted below. Total setup is five minutes.

01Create the Discord webhook

In your server: Server Settings, then Integrations, then Webhooks, then New Webhook. Pick the channel restocks should land in and copy the webhook URL. Treat it like a secret; anyone holding it can post to the channel.

02Deploy the relay Worker

Create a Cloudflare Worker (the free tier is more than enough) with this code, then set two secrets: DISCORD_WEBHOOK_URL from step 1 and NOTIFI_TOKEN, a long random string of your choosing.

export default {
  async fetch(request, env) {
    if (request.method !== "POST") return new Response(null, { status: 405 });
    // The bearer token you set in NotiFi; rejects anyone else's posts.
    if (request.headers.get("Authorization") !== `Bearer ${env.NOTIFI_TOKEN}`) {
      return new Response(null, { status: 401 });
    }
    const alert = await request.json();
    if (alert.event !== "in_stock") return new Response(null, { status: 200 });

    const price =
      alert.price?.amount != null
        ? ` at $${(alert.price.amount / 100).toFixed(2)}`
        : "";
    await fetch(env.DISCORD_WEBHOOK_URL, {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({
        content: `**${alert.product.title}** is back in stock${price}\n${alert.product.url}`,
      }),
    });
    return new Response(null, { status: 200 });
  },
};

03Point NotiFi at the relay

In NotiFi: Settings, then Webhook. Paste your Worker's URL and set the same bearer token as NOTIFI_TOKEN. Hit Test to see a sample message land in the channel. From then on, every restock alert for your watched products posts to Discord the moment it fires. The full payload shape is in the webhook documentation.

UniFi restocks, in Discord, within minutes.

NotiFi watches every product on the UniFi store around the clock. Webhooks are included in the Ultra plan, alongside the fastest alert delivery tier.

Download on the App StoreComing soonGoogle Play

Full payload and signature details in the webhook documentation.