slackbotscavio

Slack Search Bot Beyond Slackbot (2026)

Slack built-in search is workspace-only. A custom slash command backed by Scavio searches Google, Reddit, YouTube, and Amazon from within Slack. 40 lines, 30 minutes setup.

4 min read

Slack's built-in search is limited to messages within your workspace. For teams that need to search the web, Reddit, YouTube, or Amazon from within Slack, the answer is a custom bot backed by a search API. The build is simpler than most tutorials make it seem.

The architecture

Slack slash command (e.g. /search) triggers a webhook. The webhook handler calls Scavio with the query, formats the top results as Slack Block Kit blocks, and responds. Total latency: ~500ms. Total code: ~40 lines.

Python
from flask import Flask, request, jsonify
import requests, os

app = Flask(__name__)
key = os.environ["SCAVIO_API_KEY"]

@app.route("/slack/search", methods=["POST"])
def slack_search():
    query = request.form.get("text", "")
    platform = "google"

    # Detect platform hints
    if query.startswith("reddit:"):
        platform, query = "reddit", query[7:].strip()
    elif query.startswith("youtube:"):
        platform, query = "youtube", query[8:].strip()

    resp = requests.post("https://api.scavio.dev/api/v1/search",
        headers={"x-api-key": key},
        json={"query": query, "platform": platform, "limit": 5})
    results = resp.json().get("results", [])

    blocks = [{"type": "header", "text": {"type": "plain_text",
        "text": f"Search: {query} ({platform})"}}]
    for r in results:
        blocks.append({"type": "section", "text": {"type": "mrkdwn",
            "text": f"*<{r['url']}|{r['title']}>*\n{r.get('snippet', '')[:200]}"}})

    return jsonify({"response_type": "in_channel", "blocks": blocks})

Multi-platform from one slash command

The prefix pattern (reddit:, youtube:, amazon:) lets users search any platform from a single command. /search reddit: best CRM tools searches Reddit. /search youtube: kubernetes tutorial searches YouTube. Default is Google.

Use cases in the wild

  • Sales teams: search competitor names for latest news before calls
  • Support teams: search for known issues and workarounds
  • Product teams: search Reddit for user feedback on features
  • Content teams: search YouTube for content ideas and competitor videos

Deployment options

Deploy the Flask app to Railway, Render, or Vercel (as a serverless function). Create a Slack app with a slash command pointing to your endpoint. Total setup: 30 minutes. Monthly cost: hosting (free tier) + search credits ($0.005/query, typically $2-10/mo for a small team).

Limitations

  • Slack slash commands have a 3-second response timeout. For slow queries, respond with a loading message and follow up asynchronously.
  • Results are text-only in Slack. No images, no interactive elements beyond links.
  • Rate limiting: Slack limits slash command invocations. For high-volume use, consider a bot mention trigger instead.