Tutorial

How to Build a Slack Competitive Intelligence Bot

Build a Slack bot that posts daily competitor intelligence: SERP changes, Reddit mentions, YouTube content. Python tutorial.

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.

Python
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.

Python
import requests, os
H = {'x-api-key': os.environ['SCAVIO_API_KEY']}

def gather_intel(competitor):
    intel = {}
    for q in config['queries_per_competitor']:
        intel[f'google_{q}'] = requests.post('https://api.scavio.dev/api/v1/search',
            headers=H, json={'platform': 'google', 'query': f'{competitor} {q}'}).json()
    intel['reddit'] = requests.post('https://api.scavio.dev/api/v1/search',
        headers=H, json={'platform': 'reddit', 'query': competitor, 'sort': 'new'}).json()
    return intel

Step 3: Summarize with LLM

Generate a concise daily brief.

Python
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].text

Step 4: Post to Slack

Format and post the daily brief.

Python
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.

Bash
# crontab: 0 7 * * 1-5 python competitor_bot.py
# Posts at 7 AM on weekdays
# 3 competitors × 5 queries = 15 calls = $0.075/day

Python Example

Python
# Daily competitive intelligence in Slack:
# 3 competitors × (4 Google + 1 Reddit) = 15 queries = $0.075/day
# Monthly: $1.50 for daily multi-platform competitor monitoring

JavaScript Example

JavaScript
// Same pattern with Slack Bolt for Node.js.

Expected Output

JSON
Slack bot posting daily competitor intelligence briefs: SERP changes, Reddit mentions, sentiment analysis. Automated weekday schedule.

Related Tutorials

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

Scavio API key. Slack app with chat:write permission. LLM API key. Python 3.8+. A Scavio API key gives you 500 free credits per month.

Yes. The free tier includes 500 credits per month, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Start Building

Build a Slack bot that posts daily competitor intelligence: SERP changes, Reddit mentions, YouTube content. Python tutorial.