Slack Integration
Slack notifications route through reformer-platform/services/slack-notifier.js. We use incoming webhooks to fan out messages to dedicated channels for Close CRM, testing, deployments, and general operations.
Environment Variables
Set these in Render/GitHub secrets (already present in production):
SLACK_WEBHOOK_URL=...
SLACK_WEBHOOK_CLOSE=...
SLACK_WEBHOOK_TESTING=...
SLACK_WEBHOOK_RENDER=...
RAGS_SLACK_CHANNEL=#rags
SLACK_WEBHOOK_URL— default/general channel.SLACK_WEBHOOK_CLOSE— Close CRM notifications.SLACK_WEBHOOK_TESTING— QA/test results.SLACK_WEBHOOK_RENDER— Render deployment alerts.RAGS_SLACK_CHANNEL— Optional override that forces/ragsresults into a single channel even if command is invoked elsewhere (defaults to#rags).
If a dedicated webhook is missing, the notifier logs a warning and skips sending, so make sure all four values exist.
RAGS Slash Command
The /rags command allows your team to analyze websites directly from Slack.
Setup
-
Slack App Configuration:
- Go to https://api.slack.com/apps
- Select your app (or create new one)
- Go to "Slash Commands"
- Create command:
- Command:
/rags - Request URL:
https://reformer-platform.onrender.com/api/slack/rags - Short Description:
Analyze a website's growth potential - Usage Hint:
https://example.com [traffic: 5000]
- Command:
-
Install App to Workspace:
- Go to "Install App" in your Slack app settings
- Click "Install to Workspace"
- Approve required permissions
Usage
Important: Use the /rags command in the #rags channel to keep all analysis results organized in one place.
Basic usage:
/rags https://example.com
With traffic estimate:
/rags https://example.com traffic: 5000
How it works:
- User types
/rags <url>in the#ragschannel - Slack sends request to our API
- API immediately responds with "Starting analysis..."
- Analysis runs in background (30-60 seconds)
- Results are posted to the
#ragschannel when complete
Results include:
- Growth Quotient (0-100)
- Score Breakdown: Performance, SEO, AEO, GEO
- Revenue Opportunity: Monthly/annual loss estimates
- Re-platforming Analysis: Growth potential, ROI, payback period
- Top Opportunities: Top 3 recommendations
Example Output
📈 RAGS Analysis Complete: https://example.com
📊 Growth Quotient: 38/100
Performance: 100/100 | SEO: 24/100 | AEO: 5/100 | GEO: 11/100
💰 Revenue Opportunity
Monthly Loss: $3,607 | Annual Loss: $43,284
🚀 Re-platforming Opportunity
Growth Potential: 100% improvement
ROI (12 months): 1.3x
Payback Period: 0.9 months
🎯 Top Opportunities
1. Add structured data
2. Improve SEO meta tags
3. Optimize for AI search engines
Usage
slackNotifier.sendToChannel(channel, message) picks the correct webhook based on channel:
await slackNotifier.notifyGeneral({
text: 'New client onboarded!',
blocks: [...]
});
Common helpers
notifyClose(message)— for Hunter/Close CRM enrichment updates.notifyTesting(message)— for automated test results.notifyRender(message)— for deployments.notifyGeneral(message)— catch-all announcements.
Messages use Slack Block Kit; see notifyEnrichmentSuccess for structure examples (buttons, fields, etc.).
Monitoring & Failures
If a response is non-200, the notifier logs Slack notification ... failed. Ensure webhooks remain valid and not disabled by Slack. Rotate or regenerate via Slack app management if needed.
Channel Controls & Duplicate Guard
/ragsrequests always post results into theRAGS_SLACK_CHANNEL(or#rags) even if someone triggers the command elsewhere, so stakeholder history stays centralized.- Duplicate suppression ensures only one result message posts per analysis run, fixing the previous double-post bug when Slack retried slash command requests.
Roadmap
- Add rate limiting and batching to reduce noise.
- Centralize message templates so orchestrator integrations (ClickUp, Dropbox, etc.) can call Slack notifier with consistent styling.
- Add support for new channels (e.g.,
SLACK_WEBHOOK_INCIDENTS).***