# Workflows Hub

Build powerful sequential automation workflows with AgenticFlow's visual drag-and-drop builder. No coding required.

## What are Workflows?

Workflows are **linear, sequential automation flows** that execute step-by-step tasks by connecting nodes together. Each workflow:

* Executes nodes **one by one, from top to bottom**
* Processes data through a **linear chain of nodes**
* Integrates with **300+ tools (MCPs)**
* Runs **on-demand or on schedule**
* Follows a **single execution path** (no branching or loops)

## How Workflows Work

### Core Concepts

<figure><img src="https://487764224-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZ3ppnJjAH1qBNXEYnDPA%2Fuploads%2FiTp74PRPzqbxvu4kwiy5%2Funnamed_2.png?alt=media&#x26;token=3d1e1c4f-4d2f-4676-b4da-22b411384054" alt="" width="563"><figcaption></figcaption></figure>

Every workflow consists of three main components:

**1. Input Schema** (What data does the workflow need?)

* Define parameters users provide when starting the workflow
* Supports multiple input types: text, numbers, files, dropdowns, JSON, etc.
* Each input has a unique name that nodes can reference

**2. Nodes** (What processing steps happen?)

* The workflow executes nodes **sequentially from top to bottom**
* Each node has a unique name (e.g., `web_scraper`, `send_email`)
* Each node performs a specific task (API call, data transform, AI generation, etc.)
* Nodes reference data using parameter substitution: `{{input_name}}` or `{{node_name.output_field}}`

**3. Output Mapping** (What data does the workflow return?)

* Define which node outputs to return as final workflow results
* Map output fields to node outputs: `{"result": "{{final_node.output}}"}`
* **Optional**: If not configured, the workflow automatically returns the last node's output

### Execution Flow

Workflows execute in a **strict linear order**:

```
User Inputs → Node 1 → Node 2 → Node 3 → ... → Node N → Workflow Output
```

* **No branching**: Every node executes every time
* **No loops**: Nodes run exactly once in sequence
* **Top-to-bottom**: Execution order matches visual layout
* **Data flows forward**: Later nodes can reference earlier nodes' outputs

### Parameter Substitution

Connect data between workflow steps using `{{...}}` syntax:

**Reference workflow inputs:**

```
{{user_email}}
{{website_url}}
{{search_query}}
```

**Reference node outputs:**

```
{{web_scraper.content}}
{{llm_analyzer.summary}}
{{api_call.response}}
```

**Use in node configurations:**

```json
{
  "email_body": "Here's your analysis: {{llm_analyzer.summary}}",
  "recipient": "{{user_email}}",
  "subject": "Results for {{search_query}}"
}
```

### Output Mapping Behavior

The workflow's output mapping is **optional** and controls what data is returned:

**When Output Mapping IS Defined:**

```json
{
  "summary": "{{analyzer.result}}",
  "status": "{{email.success}}",
  "timestamp": "{{current_time.value}}"
}
```

* Returns only the specified fields
* Can combine outputs from multiple nodes
* Gives you full control over the response structure

**When Output Mapping IS NOT Defined:**

* The workflow automatically returns **all outputs from the last node**
* Simpler for workflows where you only care about the final step's result
* No need to manually map outputs

**Example:**

```
Node 1: fetch_data → {data: [...], count: 10}
Node 2: process_data → {processed: [...], errors: []}
Node 3: save_results → {success: true, id: "123"}

Without output mapping → Returns: {success: true, id: "123"}
With output mapping → Returns: Whatever you specify
```

## When to Use Workflows

**Perfect for**:

* **Sequential automation**: Step-by-step processes with a clear order
* **Data processing pipelines**: Transform data through multiple stages
* **API orchestration**: Chain multiple API calls together
* **Scheduled tasks**: Run automated processes on a schedule
* **Tool integration**: Connect different services in sequence
* **Batch operations**: Process data in a predictable, linear way

**Use Agents instead when**:

* You need conversational interaction
* Real-time chat with users
* Interactive Q\&A systems
* Dynamic decision-making during execution

**Use Workforce instead when**:

* You need multiple AI agents collaborating
* Complex multi-agent orchestration
* Dynamic routing between different processing paths

***

## Your First Workflow: A Simple Example

Let's build a workflow that scrapes a website and sends the content via email.

### Step 1: Define Inputs

```json
{
  "website_url": {
    "type": "string",
    "title": "Website URL",
    "description": "URL to scrape"
  },
  "recipient_email": {
    "type": "string",
    "title": "Email",
    "description": "Where to send results"
  }
}
```

### Step 2: Add Nodes (Top to Bottom)

**Node 1: `web_scraper`** (Scrape the website)

* Node type: `web_scraping`
* Input config: `{"url": "{{website_url}}"}`

**Node 2: `send_email`** (Email the content)

* Node type: `send_email`
* Input config:

  ```json
  {
    "recipient": "{{recipient_email}}",
    "subject": "Website Content",
    "body": "{{web_scraper.content}}"
  }
  ```

### Step 3: Define Output (Optional)

**Option A: Custom Output Mapping**

```json
{
  "status": "{{send_email.success}}",
  "content": "{{web_scraper.content}}"
}
```

**Option B: No Output Mapping**

* If you don't define output mapping, the workflow automatically returns the output from the last node (`send_email`)

### Execution

When you run this workflow:

1. User provides `website_url` and `recipient_email`
2. `web_scraper` node executes, scrapes the URL, outputs `content`
3. `send_email` node executes, sends email with scraped content
4. **Workflow returns**:
   * With custom mapping: `status` and `content` fields
   * Without mapping: All outputs from `send_email` node

***

## Getting Started

### [Workflows Quickstart](https://docs.agenticflow.ai/get-started/workflows-quickstart)

Build your first workflow in 10 minutes.

### [Data Flow & Type Handling](https://docs.agenticflow.ai/workflows/data-flow-and-types)

**Essential guide** to how data flows between nodes and handling data types correctly. Learn how to reference data and avoid type mismatch errors.

***

## Workflow Building Blocks

### [User Inputs](https://github.com/PixelML/agenticflow-docs/blob/main/docs/04-workflows/building-blocks/user-inputs/README.md)

Collect data to start your workflow:

* Text Input
* Number Input
* File Upload
* Date/Time Picker
* Dropdown Select
* Checkbox
* Multi-select
* Email Input
* URL Input
* Phone Input
* JSON Input
* Rich Text Editor

### [Variables](https://docs.agenticflow.ai/workflows/variables)

Manage constants, configuration, and secrets across your project:

* **Project Variables** - Global values shared across workflows
* **Workflow Variables** - Local configuration for a single workflow
* **System Variables** - Auto-injected runtime context (User ID, Workflow ID)
* **Secret Management** - Secure storage for API keys and tokens

### [Actions](https://github.com/PixelML/agenticflow-docs/blob/main/docs/04-workflows/building-blocks/actions/README.md)

Execute tasks and operations:

* **AI/LLM Actions** - AI model calls, text generation, embeddings
* **Data Processing** - Transform, filter, aggregate data
* **Integrations** - Connect to 300+ tools via MCPs
* **API Calls** - HTTP requests, webhooks
* **Database** - Read/write operations
* **File Operations** - Upload, download, process files
* **Notifications** - Email, Slack, SMS
* **Data Transformation** - Format, parse, convert data

### [Logic & Control](https://github.com/PixelML/agenticflow-docs/blob/main/docs/04-workflows/building-blocks/logic/README.md)

Control workflow execution:

* **Error Handling** - Handle failures gracefully
* **Delays** - Wait for time or conditions
* **Data Validation** - Verify data meets requirements

### [Outputs](https://github.com/PixelML/agenticflow-docs/blob/main/docs/04-workflows/building-blocks/outputs/README.md)

Return results and data:

* Display results
* Return JSON
* Download files
* Send notifications
* Trigger webhooks
* Store in database

***

## Advanced Features

### Error Handling

Handle failures gracefully:

* Try/catch blocks
* Retry logic
* Fallback actions
* Error notifications

***

## Workflow Templates

Start with pre-built workflow templates:

### [Browse All Templates](https://docs.agenticflow.ai/workflows/templates)

**Popular Templates**:

* Data Processing Pipeline
* Email Automation
* Lead Qualification
* Report Generation
* Content Publishing
* File Processing
* API Integration
* Notification System
* Data Synchronization
* Scheduled Batch Jobs

***

## Workflow Patterns

### Common Automation Patterns

**Sequential Processing** (Basic linear flow):

```
Input → Process → Transform → Output
```

**Multi-Step Data Pipeline**:

```
Input → Fetch Data → Transform → Enrich → Validate → Store → Output
```

**AI Analysis Chain**:

```
Input → Extract Text → Analyze with LLM → Summarize → Format → Output
```

**API Integration Flow**:

```
Input → Call API 1 → Parse Response → Call API 2 → Combine Results → Output
```

**Content Generation Pipeline**:

```
Input → Research → Generate Draft → Review → Format → Publish → Output
```

***

## Best Practices

### Workflow Design Best Practices

**Design Principles**:

* Keep workflows focused and modular
* Use clear node names
* Add comments and documentation
* Handle errors gracefully
* Test edge cases

**Performance**:

* Minimize AI calls (they're slower and cost more)
* Reduce unnecessary nodes in the chain
* Cache data when possible
* Keep workflows focused and concise

**Maintainability**:

* Use parameter substitution for flexibility
* Avoid hardcoding values
* Document complex logic
* Version control your workflows

**Error Handling**:

* Always handle API failures
* Provide fallback options
* Log errors for debugging
* Notify on critical failures

***

## Node Reference

AgenticFlow provides **193+ workflow nodes** across categories:

* **AI & LLM** (20+ nodes) - Text generation, embeddings, vision
* **Data** (30+ nodes) - Transform, filter, aggregate, validate
* **Integrations** (300+ MCPs) - Connect to external tools
* **Logic** (15+ nodes) - Conditionals, loops, branches
* **HTTP** (10+ nodes) - API calls, webhooks, requests
* **Files** (12+ nodes) - Upload, download, process, convert
* **Database** (15+ nodes) - SQL, NoSQL operations
* **Text** (20+ nodes) - String operations, parsing, formatting
* **Math** (10+ nodes) - Calculations, statistics
* **Date/Time** (8+ nodes) - Date operations, scheduling
* **Notifications** (10+ nodes) - Email, Slack, SMS, push
* **Utilities** (40+ nodes) - Various helper functions

See [Complete Node Reference](https://docs.agenticflow.ai/reference/nodes) for all 193+ nodes.

***

## Testing & Debugging

### Testing Your Workflow

1. Start with sample data
2. Run step-by-step
3. Inspect node outputs
4. Test error cases
5. Verify edge cases
6. Performance testing

### Debugging Tools

* Node output inspection
* Execution logs
* Error messages
* Variable inspection
* Step-through execution

***

## Deployment & Scheduling

### Execution Options

* **Manual** - Run on-demand via UI or API
* **Scheduled** - Cron-based scheduling
* **Triggered** - Webhook or event-based
* **API** - Call via REST API
* **Embedded** - Integrate in applications

### Monitoring

* Execution history
* Success/failure rates
* Performance metrics
* Credit consumption
* Error tracking

***

## Integrations

Connect workflows to 300+ tools via MCPs:

### Popular Workflow Integrations

* **Data Sources**: Google Sheets, Airtable, Databases
* **Communication**: Gmail, Slack, Discord, Telegram
* **CRM**: Salesforce, HubSpot, Pipedrive
* **Storage**: Google Drive, Dropbox, S3
* **APIs**: Custom HTTP requests
* **Databases**: PostgreSQL, MongoDB, MySQL

See [All Integrations](https://docs.agenticflow.ai/integrations/07-integrations)

***

## Troubleshooting

Common issues and solutions:

* **Workflow fails**: Check node connections and required inputs
* **Slow execution**: Optimize node count and parallel processing
* **Integration errors**: Verify MCP credentials and permissions
* **Data issues**: Validate input formats and transformations
* **Timeout errors**: Split long-running tasks, increase limits

See [Troubleshooting Guide](https://docs.agenticflow.ai/support/troubleshooting) for more help.

***

## Workflows vs Workforce vs Agents

**Use Workflows when**:

* You need **linear, sequential automation**
* Single execution path from start to finish
* Connecting tools and APIs in a predictable order
* Scheduled or triggered batch processing
* Data pipelines with fixed steps

**Use Agents when**:

* You need **conversational interaction**
* Real-time chat with users
* Dynamic decision-making during conversations
* Interactive Q\&A and assistance

**Use Workforce when**:

* You need **multiple AI agents collaborating**
* Complex multi-agent orchestration
* Dynamic routing between different agents
* Advanced coordination patterns

See [Workforce Documentation](https://docs.agenticflow.ai/workforce/05-workforce)

***

## Related Documentation

* [Agents](https://docs.agenticflow.ai/ai-agents/03-agents) - For conversational AI
* [Workforce](https://docs.agenticflow.ai/workforce/05-workforce) - For multi-agent systems
* [Integrations](https://docs.agenticflow.ai/integrations/07-integrations) - Available MCPs
* [Node Reference](https://docs.agenticflow.ai/reference/nodes) - All 193+ nodes
* [API Reference](https://github.com/PixelML/agenticflow-docs/blob/main/docs/09-developers/api/endpoints/workflows.md) - Workflow API

***

## Learn More

* [AgenticFlow 101](https://docs.agenticflow.ai/learn/courses/agenticflow-101) - Foundation course
* [Video Tutorials](https://github.com/PixelML/agenticflow-docs/blob/main/docs/02-learn/video-tutorials/README.md) - Visual learning
* [Use Cases](https://docs.agenticflow.ai/use-cases/10-use-cases) - Real-world examples
* [Community](https://docs.agenticflow.ai/support/community) - Ask questions

***

**Ready to build your first workflow?** [Start the Quickstart →](https://docs.agenticflow.ai/get-started/workflows-quickstart)
