An r/AiAutomations post showed a competitor monitoring agent sending daily reports. This tutorial builds the Slack version: a bot that posts curated competitor intelligence to a channel every morning.
Prerequisites
- Scavio API key
- Slack app with chat:write permission
- LLM API key
- Python 3.8+
Walkthrough
Step 1: Define competitors and channels
Map competitors to Slack channels.
config = {
'competitors': ['CompetitorA', 'CompetitorB', 'CompetitorC'],
'slack_channel': '#competitor-intel',
'queries_per_competitor': ['pricing', 'launch', 'reviews', 'alternative'],
}Step 2: Gather multi-platform intelligence
Search Google + Reddit for each competitor.
import requests, os
# Scavio has one endpoint per platform - there is no dispatcher endpoint and no
# `platform` request param, so the selector lives in your code.
SCAVIO = "https://api.scavio.dev"
SCAVIO_ENDPOINTS = {
"google": "/api/v2/google",
"reddit": "/api/v1/reddit/search",
"youtube": "/api/v1/youtube/search",
"amazon": "/api/v1/amazon/search",
"walmart": "/api/v1/walmart/search",
}
SCAVIO_QUERY_KEY = {"youtube": "search"}
SCAVIO_RESULTS_KEY = {"google": "organic_results", "reddit": "results",
"youtube": "results", "amazon": "products", "walmart": "products"}
def scavio_url(platform):
return SCAVIO + SCAVIO_ENDPOINTS[platform or "google"]
def scavio_body(platform, query):
return {SCAVIO_QUERY_KEY.get(platform or "google", "query"): query}
def scavio_payload(payload, platform="google"):
"""Google v2 passes Google's response through as-is; every other endpoint
wraps its payload in `data`. Item fields differ per platform (see
https://scavio.dev/docs), so only the result list is normalised here."""
platform = platform or "google"
out = payload if platform == "google" else payload["data"]
return {**out, "results": out.get(SCAVIO_RESULTS_KEY[platform], [])}
H = {'Authorization': 'Bearer ' + os.environ['SCAVIO_API_KEY']}
def gather_intel(competitor):
intel = {}
for q in config['queries_per_competitor']:
intel[f'google_{q}'] = scavio_payload(requests.post(scavio_url('google'), headers=H, json=scavio_body('google', f'{competitor} {q}')).json(), 'google')
intel['reddit'] = scavio_payload(requests.post(scavio_url('reddit'), headers=H, json=scavio_body('reddit', competitor)).json(), 'reddit')
return intelStep 3: Summarize with LLM
Generate a concise daily brief.
from anthropic import Anthropic
client = Anthropic()
def summarize_intel(competitor, intel):
return client.messages.create(model='claude-sonnet-4-6', max_tokens=300,
messages=[{'role': 'user', 'content': f'Summarize competitor intelligence for {competitor}. Focus on: pricing changes, new features, sentiment shifts, notable Reddit threads. Be specific.\n\n{intel}'}]).content[0].textStep 4: Post to Slack
Format and post the daily brief.
from slack_sdk import WebClient
slack = WebClient(token=os.environ['SLACK_BOT_TOKEN'])
def post_intel(channel, competitor, summary):
slack.chat_postMessage(channel=channel,
text=f'*Daily Intel: {competitor}*\n{summary}')Step 5: Schedule daily run
Cron job posts intelligence before the team starts.
# crontab: 0 7 * * 1-5 python competitor_bot.py
# Posts at 7 AM on weekdays
# 3 competitors × 5 queries = 15 calls = $0.075/dayPython Example
# Daily competitive intelligence in Slack:
# 3 competitors × (4 Google + 1 Reddit) = 15 queries = $0.075/day
# Monthly: $1.50 for daily multi-platform competitor monitoringJavaScript Example
// Same pattern with Slack Bolt for Node.js.Expected Output
Slack bot posting daily competitor intelligence briefs: SERP changes, Reddit mentions, sentiment analysis. Automated weekday schedule.