Feed Reddit posts through an ICP (Ideal Customer Profile) embedding model and get alerted when something matches.
Polls configured subreddits every 6s via RSS, embeds both your ICP descriptions and each post's title/body using sentence-transformers/all-MiniLM-L6-v2, compares with cosine similarity, and streams matches to a Trigger.dev stream plus email via Resend.
┌─────────────┐
Reddit RSS ──→ │ Embed post │ ─→ title vector
/r/devops+... │ title+body │ ─→ body vector
└─────────────┘
│
▼
┌─────────────────┐
│ Compare against │ ─→ cosine similarity × N ICPs
│ each ICP vector │
└─────────────────┘
│
┌─────────┴─────────┐
▼ ▼
Trigger.dev stream Resend email
(new-reddit-posts) (ICP match alerts)
Create a project at trigger.dev, then update the project field in trigger.config.ts with your project ID.
cp trigger/config.example.json trigger/config.json
# then edit trigger/config.json with your ICPs and subredditstrigger/config.json is gitignored — your API keys and ICP details stay local.
All configuration lives in trigger/config.json (see trigger/config.example.json for a template):
{
"similarityThreshold": 0.5,
"pollIntervalSeconds": 6,
"fromEmail": "conduit@example.com",
"toEmail": "you@gmail.com",
"redditUserAgent": "server:conduit-icp-watcher:v1.0.0",
"icps": [
{
"name": "Backend Deployment",
"description": "Developers looking for ways to deploy scalable backend jobs.",
"subreddits": ["devops", "kubernetes", "docker", "aws"]
}
]
}Add more ICPs by adding entries to the icps array. Each ICP can target different subreddits. Subreddits are unioned into a single RSS feed, and each post is scored against every ICP.
| Field | Description |
|---|---|
similarityThreshold |
Minimum score (0–1) to trigger a match |
pollIntervalSeconds |
Seconds between Reddit polls |
icps[].name |
Short label used in emails and logs |
icps[].description |
Full text embedded for similarity matching |
icps[].subreddits |
Subreddit names to watch for this ICP |
| Variable | Required | Description |
|---|---|---|
RESEND_API_KEY |
Yes | Resend API key for email alerts |
npx trigger.dev@latest deploynpx trigger.dev@latest devThe model (all-MiniLM-L6-v2) downloads on first run (~90 MB) and caches locally.
The task exposes run metadata in the Trigger.dev dashboard:
postsProcessed— total posts scored this runtotalMatches— total threshold-crossing matchesbestResult— highest-scoring post across the entire run
- Trigger.dev v3 — long-running task with while-loop polling
- @huggingface/transformers — ONNX-optimized sentence embeddings (runs locally, no API key)
- Resend — transactional email
- rss-parser — Reddit Atom feed parsing
