New businesses this week in my territory → Slack | OpsBlu Docs

New businesses this week in my territory → Slack

Every morning, post the businesses that first appeared in your territory in the last 24 hours to a Slack channel.

Tools: watch_territory, get_changes_since, get_business · tool reference

REST walkthrough

1. Save the territory once

POST /v1/territoriesbash
curl -X POST -H "Authorization: Bearer ob_live_YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"name":"Portland metro","kind":"city","state":"oregon","city":"portland",
       "alerts":{"email":true,"slack_webhook":"https://hooks.slack.com/services/T…/B…/…","types":["new_business","site_launched"],"cadence":"daily"}}' \
  https://opsblu.com/v1/territories

# → {"id":"ter_3a…", ...}

2. Pull changes since yesterday (free list)

GET /v1/changesbash
SINCE=$(date -u -d "yesterday" +%Y-%m-%dT%H:%M:%SZ)
curl -H "Authorization: Bearer ob_live_YOUR_KEY" \
  "https://opsblu.com/v1/changes?territory_id=ter_3a…&types=new_business&since=$SINCE"

# → {"since":"…","events":[{"type":"new_business","at":"…","business":{"id":"ob_por_cof_0031","name":"…","category":"Coffee Shops","signals":{"hot":true,"new_in_days":2,...}}}]}

3. Post to Slack

Build one Block Kit message from the event list. Link each row to the record in the app so a teammate can open (and pay for) contacts only when they want them.

Slack webhook payloadjson
{
  "text": "3 new businesses in Portland metro since yesterday",
  "blocks": [
    {"type":"header","text":{"type":"plain_text","text":"3 new businesses · Portland metro"}},
    {"type":"section","text":{"type":"mrkdwn","text":"• *Alder Street Coffee* — Coffee Shops — no website · <https://opsblu.com/app/search?id=ob_por_cof_0031|open>\n• *Rose City Rooter* — Plumbers — new site on Wix · <https://opsblu.com/app/search?id=ob_por_plu_0004|open>\n• *Nguyen Family Dentistry* — Dentists · <https://opsblu.com/app/search?id=ob_por_den_0088|open>"}},
    {"type":"context","elements":[{"type":"mrkdwn","text":"Opening a record costs 10 credits while it is hot. Aggregates are free."}]}
  ]
}

Agent prompt

Paste into Claude, ChatGPT or Cursor with the OpsBlu MCP server connected.

prompttext
Every weekday at 8am: call get_changes_since for territory "Portland metro" with since = 24 hours ago and types = new_business, site_launched. Group by type, list name, category and the signals for each, and post the summary to the #prospects Slack channel. Do not call get_business; I will open records myself.

A good reply looks like:

example replytext
Portland metro, last 24h: 3 new businesses (1 coffee shop with no website, 1 plumber, 1 dentist) and 2 sites launched (both WordPress). Posted to #prospects. Opening all 5 would cost 50 credits ($0.50).

Cost

Listing changes is free. Opening a new business is a hot record: 10 credits ($0.10). A territory producing 8 new businesses a day ≈ 80 credits/day ≈ $24/month if you open every one.

Standard record 3 credits ($0.03), hot record 10 credits ($0.10), billed once per unique record per calendar month. Aggregates and search are free. Pricing.

Gotchas

  • Hosted alerts (email/Slack/webhook from the territory itself) are Phase 2. Until then run this recipe from your own scheduler or agent.
  • Pass an ISO-8601 `since`. Omitting it defaults to the last 7 days.
  • Change types: new_business, site_launched, platform_changed, pixel_added, pixel_removed, closed.

More recipes