Reddit Loop Configuration — Workflows
Configure how your workflow scrapes Reddit: loop type, cadence, windows, and limits.
These fields live in the workflow document and are surfaced in workflow.html via WorkflowUI with real-time sync through SettingsStore.
Core fields
- runtimeType:
finiteorinfinite - finiteDuration: Minutes to run when
runtimeType = finite - secondsBetweenScrapes: Delay between iterations
- postAgeWindow: Maximum post age to consider (hours)
- postQuantity: Upper bound of posts to collect per loop
Subreddits scope
- Configure subreddits under
subreddits.{name}.selected - Configure flairs under
subreddits.{name}.flairs.{flairName}with:selected: include in scrapinganalysis: include in AI analysis
Change detection and saving
The UI uses a unified change detection pipeline:
WorkflowUI.extractFormData()collects the current form stateSettingsStore.detectChanges(currentFormData)computes a diff- Only changed dot-paths are sent to Firestore via
updateDoc
Subreddit and flair changes are mapped to dot paths (e.g., subreddits.technology.flairs.Discussion.selected).
Running a loop
- Configure runtime fields and subreddits/flairs
- Click Run Workflow
- The UI writes a runtime snapshot (
runtime/current) derived from the workflow
Runtime snapshot (derived)
The runtime document contains:
subreddits(selected subset)postAgeWindow,postQuantity,runtimeType,secondsBetweenScrapes,finiteDurationcomments(include settings)aiConfig(deep-copied)
Best practices
- Use
finitefor test runs and validation - Tune
secondsBetweenScrapesto balance freshness vs API limits - Start narrow (few subreddits/flairs) and expand after validation