Tutorial

How to Build an Automated Competitor Email Digest with Groq

Automated daily competitor email digest using Groq for summarization and Scavio for SERP monitoring. Under $2/month.

An r/AiAutomations post wanted a daily email with competitor updates. This tutorial builds exactly that: Scavio monitors competitor SERPs and Reddit mentions, Groq summarizes the changes, and the digest arrives in your inbox every morning. Total cost under $2/month.

Prerequisites

  • Scavio API key
  • Groq API key
  • SMTP email credentials
  • Python 3.8+

Walkthrough

Step 1: Define competitors and tracking queries

What to monitor for each competitor.

Python
competitors = {
    'CompetitorA': ['CompetitorA pricing 2026', 'CompetitorA review', 'CompetitorA vs'],
    'CompetitorB': ['CompetitorB launch', 'CompetitorB features', 'CompetitorB alternative'],
}

Step 2: Collect daily intelligence

Search Google and Reddit for each competitor.

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

def daily_intel(competitors):
    intel = {}
    for name, queries in competitors.items():
        intel[name] = {'google': [], 'reddit': []}
        for q in queries:
            g = requests.post('https://api.scavio.dev/api/v1/search',
                headers=H, json={'platform': 'google', 'query': q}).json()
            intel[name]['google'].extend(g.get('organic_results', [])[:3])
        r = requests.post('https://api.scavio.dev/api/v1/search',
            headers=H, json={'platform': 'reddit', 'query': name, 'sort': 'new'}).json()
        intel[name]['reddit'] = r.get('results', [])[:5]
    return intel

Step 3: Summarize each competitor with Groq

Groq Llama 70B summarizes at $0.59/1M input tokens.

Python
def summarize(competitor, data):
    resp = requests.post('https://api.groq.com/openai/v1/chat/completions',
        headers={'Authorization': f'Bearer {os.environ["GROQ_API_KEY"]}',
                 'Content-Type': 'application/json'},
        json={'model': 'llama-3.3-70b-versatile', 'max_tokens': 400,
              'messages': [{'role': 'user',
                  'content': f'Summarize competitor intelligence for {competitor}. '
                      f'Highlight: pricing changes, new features, user complaints, '
                      f'notable announcements. Be concise.\n\n{data}'}]
        }).json()
    return resp['choices'][0]['message']['content']

Step 4: Format and send email digest

Compose and send the daily digest.

Python
import smtplib, datetime
from email.mime.text import MIMEText

def send_digest(intel, to_email):
    body = f'Competitor Digest - {datetime.date.today()}\n\n'
    for competitor, data in intel.items():
        summary = summarize(competitor, data)
        body += f'--- {competitor} ---\n{summary}\n\n'
    msg = MIMEText(body)
    msg['Subject'] = f'Competitor Digest {datetime.date.today()}'
    msg['From'] = os.environ['SMTP_USER']
    msg['To'] = to_email
    with smtplib.SMTP('smtp.gmail.com', 587) as s:
        s.starttls()
        s.login(os.environ['SMTP_USER'], os.environ['SMTP_PASS'])
        s.send_message(msg)

Python Example

Python
# Daily cost breakdown:
# Scavio: 2 competitors x (3 Google + 1 Reddit) = 8 queries x $0.005 = $0.04
# Groq: 2 summaries x ~2K tokens = ~$0.003
# Total: ~$0.043/day = ~$1.30/month for daily competitor email digests

JavaScript Example

JavaScript
const intel = await fetch('https://api.scavio.dev/api/v1/search', {
  method: 'POST',
  headers: {'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json'},
  body: JSON.stringify({platform: 'google', query: `${competitor} pricing 2026`})
}).then(r => r.json());

Expected Output

JSON
Daily email digest with competitor summaries: pricing changes, new features, user sentiment from Reddit. Groq summarization + Scavio data collection. Under $2/month.

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. Groq API key. SMTP email credentials. 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

Automated daily competitor email digest using Groq for summarization and Scavio for SERP monitoring. Under $2/month.