> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.rightbrain.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.rightbrain.ai/_mcp/server.

# AI Workflows & Automation

> Orchestrate Tasks across systems to build intelligent multi-step processes with conditional logic and data transformations

Use Rightbrain [Tasks](/docs/concepts/tasks) as AI building blocks in your workflow automation platform. Tasks are self-contained AI modules that fit naturally into tools like Zapier, Make, or n8n - you provide the orchestration and business logic, Tasks handle the AI processing with predictable, structured outputs. When you want Rightbrain to own runtime decisions, make the same Tasks available to an [agent](/docs/concepts/agents).

## Why Tasks are Perfect for Workflows

Tasks are designed as modular AI components that integrate seamlessly into any workflow platform:

* **Stateless for Reliable Chaining**: Each Task is fully self-contained. Chain them in any order, run in parallel, or retry individually. No coordination overhead and no drift from previous runs.
* **Safe Orchestration**: Schema-validated outputs ensure downstream steps always receive valid data. Your workflow logic remains stable and free from unexpected AI responses.
* **Reusable Blocks**: The same Task can be reused across multiple workflows and platforms, giving you consistent performance and full ownership of your AI components.
* **Central Monitoring:** Track every Task centrally across workflows. Direct callers use the active revision; agent attachments can follow the active revision or stay pinned to a validated one. See [Versioning & revisions](/docs/production/revisions).

## Common Workflow Patterns

#### Document Processing Pipeline

### Multi-Stage Document Intelligence

**The Problem**: Different document types need different processing, but you don't know the type until you analyse it.

**The Workflow**:

#### Upload & Classification

**Trigger**: Document uploaded to shared drive\
**Task 1**: Document classifier → Returns: "invoice" | "contract" | "receipt" | "other"\
**Logic**: Branch based on classification

#### Type-Specific Extraction

**IF Invoice**:

* Task: Invoice extractor → vendor, line items, amounts, dates
* Validate: Check against PO database
* Route: Send to accounting system

**IF Contract**:

* Task: Contract analyser → key terms, obligations, risks
* Check: Flag if non-standard clauses found
* Route: Legal review if flagged, otherwise archive

**IF Receipt**:

* Task: Receipt parser → merchant, amount, category
* Validate: Check expense policy compliance
* Route: Expense system or rejection notice

#### Completion

Log result in document management system, notify relevant team

#### Content Creation Chain

### Multi-Channel Content Generation

**The Problem**: Need to create content in multiple formats for different channels from single brief.

**The Workflow**:

#### Brief Analysis

**Trigger**: New content brief submitted\
**Task**: Brief analyser → Extracts: topic, audience, key points, tone, channels\
**Output**: Structured requirements for generation

#### Core Content Creation

**Task**: Long-form generator → Creates: comprehensive article with sections\
**Task**: Quality scorer → Checks: completeness, tone, accuracy\
**Logic**: IF quality score \< 70% → Regenerate with feedback

#### Channel Adaptation (Parallel)

Run simultaneously:

* **Task**: Social media adapter → Twitter thread + LinkedIn post
* **Task**: Email adapter → Newsletter format with CTA
* **Task**: Blog adapter → SEO-optimized blog post with meta
* **Task**: Video script adapter → Script with timing and visuals

#### Final Review

**Task**: Brand compliance checker → Validates: tone, terminology, guidelines\
**Output**: All formats ready for review or auto-publish based on confidence scores

**Why This Works**:

* A single brief generates 5+ channel-optimised pieces, gated for quality
* Only what changed re-runs: a content agent that produced a full SEO outline in 92.2s re-ran just the outline-writer task on a refinement pass, finishing in 18.4s rather than repeating the research

#### Customer Onboarding Automation

### Intelligent KYC Processing

**The Problem**: Customer onboarding requires document verification, risk assessment, and multi-level approvals.

**The Workflow**:

#### Document Collection

**Trigger**: Customer submits onboarding form with documents\
**Task**: Document validator → Checks: all required docs present, readable, recent
**Logic**: IF incomplete → Request missing items, pause workflow

#### Identity Verification

**Task**: ID extractor → Name, DOB, address, ID number from government ID
**Task**: Selfie matcher → Compares ID photo to selfie (if required)
**Logic**: IF mismatch > threshold → Flag for manual review

#### Business Verification (Parallel)

Run simultaneously:

* **Task**: Business doc analyser → Registration number, directors, ownership
* **Task**: Address verifier → Confirms business address validity
* **Task**: Industry classifier → Business type and category

#### Risk Assessment

**Task**: Risk scorer → Calculates score based on: industry, geography, ownership structure, transaction patterns\
**Logic**: Route based on risk level:

* Low risk → Auto-approve
* Medium risk → Compliance review queue
* High risk → Senior compliance + legal review

#### Account Creation

**IF Approved**: Create account, send welcome email, enable services\
**IF Rejected**: Generate rejection letter with reasons, log for compliance

**Why This Works**:

* Risk-based routing ensures appropriate oversight
* Complete audit trail for regulatory requirements

#### Lead Intelligence Pipeline

### Sales Lead Enrichment & Routing

**The Problem**: Raw leads need research, scoring, personalisation before sales engagement.

**The Workflow**:

#### Lead Capture

**Trigger**: Form submission or email inquiry\
**Task**: Contact extractor → Email, company, role from unstructured input\
**Task**: Intent classifier → Request type: demo, pricing, info, partner

#### Company Research (Parallel)

Run simultaneously:

* **Task**: Firmographic enricher → Size, industry, revenue, tech stack
* **Task**: Competitive analyzer → Current vendors, pain points mentioned
* **Task**: News monitor → Recent funding, growth signals, leadership changes

#### Lead Scoring

**Task**: Qualification scorer → Combines: company fit, intent signals, engagement level\
**Output**: Score (0-100) + qualification reasoning
**Logic**:

* Score > 75 → Hot lead, immediate routing
* Score 50-75 → Warm lead, nurture sequence
* Score \< 50 → Marketing qualified, content drip

#### Personalisation

**Task**: Outreach generator → Creates personalised email referencing:

* Company's industry and challenges
* Recent news or growth signals
* Relevant case studies
* Specific product fit

#### Sales Routing

Update CRM with:

* Enriched company data
* Lead score and reasoning
* Personalised outreach copy
* Suggested next actions

Assign to rep based on: territory, industry expertise, account size

**Why This Works**:

* Sales reps get fully researched, scored leads with personalized outreach ready
* The same Tasks serve inbound leads, event attendees, and list uploads

## Enrich the tools you already use

The most durable workflows do not ask anyone to open a new tool. An event fires in a system your team already lives in, an agent does the reasoning, and the result lands back where the work happens.

Use a [trigger](/docs/concepts/triggers-and-runs) to receive the source event, a Task or agent for the AI operation, and an Integration or [Task forwarder](/docs/api/task-forwarders) to return the result. Configure idempotency on retrying webhook sources, pin revisions that require release control, and inspect retained runs and events through the API.

## Platform Integration

### Workflow Platforms

Rightbrain Tasks work with any platform that can make HTTP requests:

#### Zapier

Use Webhooks by Zapier action, pass Task outputs between steps

#### Make (Integromat)

HTTP modules with JSON transformation capabilities

#### n8n

HTTP Request nodes with credential management

> **Note**
>
> The best workflows are the ones that eliminate manual handoffs between systems. Start by mapping your current process, identify where AI can make decisions or extract data, then build the Task chain that automates it.

## Next Steps

#### [Build Your Tasks](/docs/quickstart/create-a-task)

Create the AI building blocks for your workflow

#### [Run tasks via API](/docs/api/run-tasks)

Integration guide for workflow platforms

#### [Triggers & runs](/docs/concepts/triggers-and-runs)

Start work from webhooks, schedules, Gmail, or Slack

#### [Webhooks & forwarders](/docs/api/task-forwarders)

Deliver Task results to downstream systems

#### [Agent patterns](/docs/patterns/agents)

Let an agent own runtime decisions and tool selection