Automate Competitor Monitoring with n8n + Ollama (AI Market Intelligence)
Most companies check competitor websites manually — once a month at best. Pricing changes, new feature launches, messaging shifts, and content strategies go unnoticed for weeks. By the time you react, the competitive window has closed.
In this tutorial, you'll build an automated competitor monitoring pipeline using n8n and Ollama that runs daily, scrapes competitor pages, uses local AI to analyze changes, and sends structured intelligence reports to your team. Everything runs on your infrastructure — no data leaves your network.
Why Self-Hosted Competitor Intelligence?
Commercial competitive intelligence tools (Crayon, Klue, Kompyte) charge $15,000-$50,000/year. They also require sending your competitive strategy data to their servers. With n8n + Ollama:
- $0 ongoing cost — runs on your hardware, no per-query fees
- Complete privacy — your competitor watchlist and analysis never leaves your network
- Full customization — tailor monitoring to your exact market and competitors
- Real-time alerts — know about changes within hours, not weeks
Architecture Overview
↓
Fetch Competitor Pages (HTTP Request)
↓
Compare with Previous Snapshot (Code Node)
↓
Ollama Analysis (What changed? Why does it matter?)
↓
┌─────────────┬─────────────┬──────────────┐
Pricing Alert │ Feature Alert│ Content Alert │
└──────┬──────┴──────┬──────┴───────┬──────┘
↓ ↓ ↓
Slack/Email Dashboard Weekly Report
Prerequisites
- n8n — self-hosted (Docker or npm)
- Ollama — with
mistralorllama3model pulled - Basic familiarity with n8n workflows
Step 1: Define Your Competitor Watchlist
Start with a structured config that defines what to monitor for each competitor:
{
"competitors": [
{
"name": "CompetitorA",
"pages": {
"pricing": "https://competitora.com/pricing",
"features": "https://competitora.com/features",
"blog": "https://competitora.com/blog",
"changelog": "https://competitora.com/changelog"
},
"focus": ["pricing tiers", "enterprise features", "AI capabilities"]
},
{
"name": "CompetitorB",
"pages": {
"pricing": "https://competitorb.com/pricing",
"product": "https://competitorb.com/product"
},
"focus": ["freemium model", "integrations", "developer tools"]
}
]
}
Step 2: Fetch and Snapshot Pages
Use n8n's HTTP Request node to fetch each competitor page, then extract the meaningful text content:
// Code node: Extract text content from HTML
const html = $input.first().json.data;
const url = $input.first().json.url;
const competitor = $input.first().json.competitor;
// Strip HTML tags, scripts, styles
let text = html
.replace(/<script[\s\S]*?<\/script>/gi, '')
.replace(/<style[\s\S]*?<\/style>/gi, '')
.replace(/<[^>]+>/g, ' ')
.replace(/\s+/g, ' ')
.trim();
// Truncate to avoid overwhelming the LLM
text = text.substring(0, 8000);
return [{
json: {
competitor,
url,
content: text,
fetched_at: new Date().toISOString()
}
}];
Store Snapshots for Comparison
Save each snapshot to a local file (or database) so you can compare with the previous version:
// Code node: Compare with previous snapshot
const fs = require('fs');
const path = `/data/competitor-snapshots/${$json.competitor}-${$json.url.replace(/[^a-z0-9]/gi, '_')}.txt`;
let previousContent = '';
try {
previousContent = fs.readFileSync(path, 'utf8');
} catch (e) {
// First run — no previous snapshot
}
// Save current snapshot
fs.mkdirSync('/data/competitor-snapshots/', { recursive: true });
fs.writeFileSync(path, $json.content);
// Calculate similarity
const changed = previousContent !== $json.content;
const isNew = previousContent === '';
return [{
json: {
...$json,
previous_content: previousContent.substring(0, 4000),
changed,
is_new: isNew
}
}];
Step 3: AI-Powered Change Analysis
This is where Ollama does the heavy lifting. When a page changes, send both the old and new content to your local LLM for structured analysis:
// Ollama prompt for competitor change analysis
You are a competitive intelligence analyst. Compare the PREVIOUS and CURRENT
versions of a competitor's page and provide a structured analysis.
Competitor: {{competitor}}
Page: {{url}}
PREVIOUS VERSION:
{{previous_content}}
CURRENT VERSION:
{{content}}
Analyze the changes and respond in this exact JSON format:
{
"change_type": "pricing|feature|messaging|content|design|none",
"severity": "critical|important|minor|informational",
"summary": "One-sentence summary of what changed",
"details": "2-3 sentences explaining the change and its implications",
"action_items": ["What your team should consider doing in response"],
"competitive_impact": "How this affects your competitive position"
}
mistral for fast analysis or llama3:8b for more nuanced competitive insights. Both run well on consumer hardware.
Step 4: Smart Alerting
Not every change deserves a notification. Use an IF node to route alerts based on severity:
- Critical (pricing changes, major feature launches) → Immediate Slack alert + email to leadership
- Important (new blog posts, messaging changes) → Daily digest
- Minor/Informational (copy tweaks, design updates) → Weekly report only
// Slack message format for critical alerts
🚨 *Competitor Alert: {{competitor}}*
*Change:* {{summary}}
*Type:* {{change_type}} | *Severity:* {{severity}}
{{details}}
*Action items:*
{{#each action_items}}
• {{this}}
{{/each}}
_Detected at {{fetched_at}}_
Step 5: Weekly Intelligence Report
Aggregate all changes from the week and generate a comprehensive report:
// Ollama prompt for weekly competitive intelligence report
You are a competitive intelligence analyst writing a weekly briefing
for the executive team.
Here are all competitor changes detected this week:
{{changes_json}}
Write a concise executive briefing with these sections:
1. KEY MOVES — The 2-3 most significant competitive developments
2. PRICING & PACKAGING — Any pricing or packaging changes
3. PRODUCT — New features, deprecations, or pivots
4. CONTENT & MESSAGING — How competitors are positioning themselves
5. RECOMMENDATIONS — 3-5 specific actions our team should take
Keep it under 500 words. Be direct and actionable.
Advanced: Track Competitor SEO Strategy
Monitor what keywords your competitors are targeting by analyzing their blog content:
// Ollama prompt for SEO analysis
Analyze this competitor blog post and extract:
1. Primary keyword target (what search query is this optimized for?)
2. Secondary keywords (3-5 related terms used)
3. Content strategy signal (what audience are they targeting?)
4. Quality assessment (thin content, or genuinely valuable?)
Blog content:
{{blog_content}}
Respond as JSON:
{
"primary_keyword": "...",
"secondary_keywords": ["...", "..."],
"target_audience": "...",
"content_quality": "high|medium|low",
"strategy_insight": "What this tells us about their content strategy"
}
Monitoring Pricing Pages
Pricing changes are the highest-value competitive signal. Here's how to make pricing monitoring reliable:
Handle Dynamic Pricing Pages
Many SaaS pricing pages load prices via JavaScript. Use the n8n HTTP Request node with a headless browser approach, or fetch the API endpoints directly (inspect the page to find them).
Structured Price Extraction
// Ollama prompt for price extraction
Extract all pricing information from this page content.
Return a JSON array of pricing tiers:
[{
"tier_name": "...",
"monthly_price": "...",
"annual_price": "...",
"key_features": ["...", "..."],
"limits": "..."
}]
If you cannot find pricing information, return: {"error": "no_pricing_found"}
Page content:
{{content}}
Production Deployment
Schedule
Run the monitoring workflow on a Cron trigger — daily at 6 AM works well for most teams. Your morning Slack will have fresh competitive intelligence waiting.
Data Storage
For long-term trend analysis, store snapshots and analysis results in a database (PostgreSQL or SQLite via n8n's database nodes). This lets you track pricing trends, feature velocity, and content cadence over months.
Error Handling
Competitor websites change structure frequently. Add error handling:
- Catch HTTP errors (403, 429, 500) — don't alert on temporary outages
- Validate Ollama output is valid JSON before processing
- Set a timeout on HTTP requests (30 seconds max)
- Log all failures for debugging
Results You Can Expect
Teams using this kind of automated monitoring typically see:
- 90% faster awareness of competitor pricing changes (hours vs. weeks)
- Comprehensive coverage — monitoring 10+ competitors daily, not just the top 2-3
- Actionable insights — AI-generated analysis means your team can act immediately, not spend hours reading competitor pages
- Zero ongoing cost — compared to $15K-50K/year for commercial tools
Want All 15 AI Workflow Templates?
This competitor monitoring workflow is one of 15 production-ready AI automation templates in our n8n + Ollama workflow pack. Includes email auto-responder, lead scoring, content generation, RAG search, and more.
Get the Full Pack — $39