Workflow Examples

This guide outlines example patterns for combining orchestration primitives into complete workflows.

Collections Outreach

A weekly collections workflow that asks staff for a list of accounts, calls each one, and routes outcomes automatically.

Flow

  1. Recurring Schedule — Every Sunday at 9 AM
  2. Email Collector — Sends an email to the collections manager: "Please reply with the accounts to call tomorrow." Parse mode is set to AI with instructions to extract account objects (name, phone, email, balance, notes). Timeout: 20 hours. Store key: accounts_queue.
  3. Store Read — Loads the accounts_queue from the store
  4. Task Agent — Picks the next account from the queue and prepares outreach data
  5. Voice Agent — Places a collection call using the account's phone number
  6. AI Router — Classifies the call outcome into one of five branches:
Outcome Branch Actions
Payment Collected Task agent drafts confirmation → Send confirmation email → Store write: remove account from queue
Not Reached Store write: increment attempt count, keep in queue for next cycle
Disputed Task agent drafts verification letter → Send verification email → Store write: move to disputed_accounts
Promise to Pay Task agent generates follow-up reminder → Store write: flag account with promise date
Refused Email collector sends formal notice and waits for written response → Store write: move to escalated_accounts

Timeline

Sun 9am → Email collector asks staff for the list
Sun/Mon  → Staff replies with accounts (CSV or text)
Mon      → AI parses reply → Store write → Voice calls begin
Mon      → Each call classified → Store updated → Ready for next cycle

The loop closes automatically: accounts that are not resolved stay in the queue for the next weekly run.


Weekly Client Check-In

A recurring workflow that checks in with a list of clients and escalates non-responders.

Flow

  1. Recurring Schedule — Every Monday at 10 AM
  2. Store Read — Load client_list and no_response_count
  3. Task Agent — For each client, generate a personalized check-in message based on their history
  4. Send Email — Send the check-in email
  5. Wait — 48 hours
  6. AI Router — Classify based on email engagement and reply content:
Outcome Branch Actions
Replied - Happy Store write: reset their no-response count to 0
Replied - Needs Attention Task agent drafts action items → Send internal notification email
No Reply Store write: increment no_response_count for this client
No Reply - Escalate (When count exceeds 3) Task agent drafts escalation summary → Voice agent calls account manager

Monthly Report Collection

Gather data from multiple departments through email, compile it, and distribute a summary.

Flow

  1. Recurring Schedule — 1st of every month at 8 AM
  2. Store Clear — Reset from last month's data
  3. Email Collector — Send to sales@company.com: "Please reply with this month's sales figures." Parse mode: AI. Store key: sales_data. Timeout: 48 hours.
  4. Email Collector — Send to support@company.com: "Please reply with this month's support metrics." Parse mode: AI. Store key: support_data. Timeout: 48 hours.
  5. Store Read — Load all collected data
  6. Task Agent — Compile sales_data and support_data into a formatted monthly summary
  7. Send Email — Distribute the summary to the leadership team

Lead Qualification Loop

Score and re-engage leads over multiple weeks until they convert or are archived.

Flow

  1. Recurring Schedule — Every Wednesday at 9 AM
  2. Store Read — Load active_leads list
  3. Task Agent — Score each lead based on engagement history and CRM data
  4. AI Router — Route based on lead score and activity:
Outcome Branch Actions
Hot Lead Voice agent places an immediate call → Task agent logs outcome → Store write: update lead status
Warm Lead Send personalized email → Store write: keep in queue, increment touch count
Cold Lead Send re-engagement email → AI router checks if touch count > 5: if yes, archive; if no, keep in queue
Converted Task agent updates CRM → Store write: remove from active_leads

Each week, converted and archived leads are removed from the queue while warm and cold leads cycle back for another touch.


Tips