How Workflows Work
The daily, weekly, and process-approved workflows: what each does and how they fit together.
Borker has three workflows. Each does a specific job. Run them in order: weekly to plan, daily to generate, process-approved to schedule.
Daily workflow
The daily workflow is the core loop. It runs once per day and generates content for that day's calendar slots.
flowchart TD
A[Start Daily Workflow] --> B[Load today's calendar slots]
B --> C{Any slots for today?}
C -- No --> D[Exit: no content generated]
C -- Yes --> E[For each slot...]
E --> F[Decision Engine: select topic from pool]
F --> G[ContentGeneratorService: call Claude API]
G --> H{Auto-approval on?}
H -- Yes --> I[Status: approved]
H -- No --> J[Status: pending_review]
I --> K[ApprovalService logs item]
J --> K
K --> L{More slots?}
L -- Yes --> E
L -- No --> M[Workflow complete]Step by step:
- Load slots: CalendarService reads today's
calendar_slotsrows (day of week matches today) - Select topic: For each slot, the Decision Engine scores all eligible topics and picks the best one
- Generate: ContentGeneratorService calls Claude with: topic, angle, platform, content type, brand config, and voice attributes
- Route: Depending on your automation setting, generated content goes to
pending_reviewor directly toapproved
Expected output: One content item per calendar slot. If you have 3 slots today, you get 3 content items.
If the daily workflow produces 0 items, check your preflight panel. The most common cause is no calendar slots configured for today's day of week. See Preflight Checks.
The Decision Engine
The Decision Engine selects which topic to use for each content slot. It avoids repetition and balances your topic pools.
Scoring factors:
| Factor | What it does |
|---|---|
| Recency | Topics used recently score lower: avoids repeating the same subject |
| Engagement score | Topics you've marked as high-engagement score higher |
| Diversity | Topics from pools that haven't been used recently score higher |
The highest-scoring eligible topic wins. If all topics have been used recently, the engine picks the least-recently-used one.
Weekly workflow
The weekly workflow plans ahead. Run it at the start of each week.
What it does:
- Reviews the upcoming week's calendar slots
- Identifies content items that can be recycled (older high-performing content that's due for another run)
- Flags gaps where no content is scheduled
- Optionally surfaces recycling candidates in your approval queue
The weekly workflow doesn't generate new content. It sets up context for the daily workflow to work from, and updates the Decision Engine's recency scores so the daily workflow knows what's been used.
Process Approved workflow
Process Approved finds all content with approved status and schedules it via Postiz.
What it does:
- Queries all
approvedcontent items - For each item, SchedulerService calculates an optimal posting time based on platform best practices and your scheduling config
- QueueService sends the item to Postiz via the API
- Postiz assigns a
postiz_id, which Borker stores in the content item's metadata - Content status moves to
scheduled
Run this workflow after a review/approval session to batch-schedule everything at once.
Cron setup
You can trigger workflows manually from the UI, or set up a cron job to run them automatically.
Recommended schedule:
- Daily workflow: Every morning at a fixed time (e.g., 6:00 AM)
- Weekly workflow: Monday morning before the daily workflow runs
- Process Approved: After the daily workflow, or after a manual review session
See Running Manually for how to trigger from the UI.
If you're running on a server, use your system's cron or a scheduler like GitHub Actions / Railway cron to hit the workflow API endpoints on schedule.