BorkerBorker Docs
Workflows

Daily Workflow

The daily workflow generates content for today's calendar slots using AI.

The daily workflow is Borker's core loop. Run it once each day to generate content for that day's scheduled slots.

What it does

flowchart TD
    A[Trigger daily workflow] --> B[Preflight check]
    B --> C{Blocking issues?}
    C -- Yes --> D[Abort: show errors]
    C -- No --> E[Load today's calendar slots]
    E --> F{Slots found?}
    F -- No --> G[Complete: 0 items generated]
    F -- Yes --> H[For each slot]
    H --> I[Decision Engine selects topic]
    I --> J[Generate content via Claude]
    J --> K{Auto-approval?}
    K -- On --> L[approved]
    K -- Off --> M[pending_review]
    L --> N{More slots?}
    M --> N
    N -- Yes --> H
    N -- No --> O[Workflow complete]

Step-by-step breakdown

1. Preflight check Before generating anything, Borker validates your configuration. Blocking issues (missing Anthropic key, no calendar slots, post limit reached) stop the workflow. Warnings (missing Postiz key, no brand voice) let it proceed but flag the issue.

2. Load calendar slots CalendarService reads your calendar_slots table and finds all rows where the day of week matches today. If you have three slots configured for Wednesday (e.g., X thread, LinkedIn post, Farcaster cast), all three are loaded.

3. Topic selection For each slot, the Decision Engine scores all available topics in your pools and picks the best one. It prioritizes topics that haven't been used recently, have higher engagement scores, and come from underrepresented pools.

4. Generate via Claude ContentGeneratorService calls the Anthropic Claude API with:

  • The selected topic and angle
  • Your brand voice config
  • Voice attributes (auto-adjusted for the platform)
  • Platform-specific content type formatting instructions
  • Any custom prompt template you've configured

5. Route to queue If auto-approval is on, the item moves directly to approved. If off, it lands in pending_review in your Approval Queue.

Expected output

One content item per calendar slot. If you have 3 slots configured for today, you get 3 items.

Why did I get 0 items?

Common causes:

  • No calendar slots for today's day of week: Check Settings → Scheduling. You may have slots for Mon/Wed/Fri but not Tuesday.
  • Generation limit reached: You've used all your AI generations for the month. Check Settings → Billing.
  • Anthropic key missing or invalid: The API call fails silently if the key is wrong. Check Settings → Workspace → API Keys.
  • All topics exhausted: Unlikely but possible if your topic pool is very small and you've used all topics recently.

See Preflight Checks for the full diagnostics panel.

Reading the workflow log

After the workflow completes, you can view the run log in the Workflow History panel. Each run shows:

  • Start and end time
  • Number of items generated
  • Status (completed / failed / cancelled)
  • Per-slot details: which topic was selected, generation status, any errors

The workflow log is your primary debugging tool. If content generation fails for a specific slot, the log will show the error from the Claude API call.

On this page