Cookbook: Send alerts to Slack
Set a webhook URL on a tracking campaign so iSearchFrom posts alerts to a small relay, which reformats them and forwards to a Slack channel.
Goal: when a tracking campaign raises an alert (a big ranking drop, a new competitor ad, a visibility change), have it appear in a Slack channel automatically.
You’ll need
Section titled “You’ll need”- A tracking campaign (position, ad, or AI-visibility) with alerts enabled.
- A place to run a tiny relay — a serverless function (Cloudflare Workers, Vercel, AWS Lambda) or any small always-on endpoint.
- A Slack incoming webhook URL for the target channel.
Why a relay?
Section titled “Why a relay?”iSearchFrom delivers alerts as its own JSON payload (below). Slack’s incoming webhooks expect Slack’s format. A relay is a ~15-line function that receives iSearchFrom’s payload and reposts it to Slack as a readable message. It also keeps your Slack webhook URL private.
The payload iSearchFrom sends
Section titled “The payload iSearchFrom sends”When an alert fires, iSearchFrom POSTs this to your campaign’s webhook URL:
{ "event": "tool.alert.created", "timestamp": "2026-07-07T14:05:00.000Z", "data": { "alertId": "…", "targetType": "position_campaign", "campaignId": "…", "campaignName": "Brand keywords — US", "type": "…", "severity": "…", "metadata": { "…": "…" } }}Create the relay
Section titled “Create the relay”This Cloudflare Worker receives iSearchFrom’s payload and forwards a formatted message to Slack. The Slack webhook URL is stored as a secret, never exposed to iSearchFrom.
export default { async fetch(request, env) { if (request.method !== 'POST') return new Response('ok'); const { event, data } = await request.json(); if (event !== 'tool.alert.created') return new Response('ignored');
const text = `:rotating_light: *${data.severity ?? 'alert'}* on *${data.campaignName}*\n` + `Type: ${data.type} · Campaign: \`${data.campaignId}\``;
await fetch(env.SLACK_WEBHOOK_URL, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ text }) }); return new Response('ok'); // 2xx tells iSearchFrom the delivery succeeded }};Deploy it and set the Slack webhook as a secret:
wrangler secret put SLACK_WEBHOOK_URL # paste your Slack incoming-webhook URLwrangler deployYou’ll get a public relay URL like https://serp-alerts.your-workers.dev.
Point the campaign at the relay
Section titled “Point the campaign at the relay”Enable alerts on the campaign and set its alert webhook URL to your relay URL — in the app’s
campaign alert settings, or via the campaign’s alertSettings when you create/update it through
the API. See Schedules & alerts.
Trigger a test
Section titled “Trigger a test”Cause an alert (or wait for the next run to raise one). iSearchFrom posts to your relay, which forwards to Slack.
Verify
Section titled “Verify”- A message appears in your Slack channel when an alert fires.
- Your relay logs show a
POSTwithevent: "tool.alert.created"and returns2xx. - If nothing arrives: confirm the campaign’s alert severity threshold is met, the webhook URL is
correct and reachable, and your relay returns
2xx(non-2xxtriggers retries, then gives up).
Variations
Section titled “Variations”- Rich Slack formatting — swap the
{ text }body for Slack Block Kit to include the metadata fields and a link back to the campaign. - Other destinations — the same relay pattern forwards to Microsoft Teams, Discord, PagerDuty, or
an internal endpoint; just change the outbound
fetch. - Filter noise — have the relay drop low-severity alerts or de-duplicate on
alertId.