> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kaie.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating Workflows

> Step-by-step guide to building your first automation workflow

## Creating Your First Workflow

This guide will walk you through creating a complete customer support workflow from start to finish.

## Step 1: Set Up Your Workflow

### Create a New Workflow

1. Navigate to the Workflow Builder in your Kaie dashboard
2. Click **"Create New Workflow"**
3. Choose **"Start from Scratch"** or select a template
4. Give your workflow a descriptive name (e.g., "Customer Support - FAQ Bot")

### Configure Basic Settings

<AccordionGroup>
  <Accordion title="Workflow Name & Description">
    * **Name**: Choose a clear, descriptive name
    * **Description**: Add details about what this workflow does
    * **Category**: Select the appropriate category (Support, Sales, etc.)
  </Accordion>

  <Accordion title="Trigger Configuration">
    * **Trigger Type**: Choose how the workflow starts (message received, time-based, etc.)
    * **Channel**: Select which communication channel to monitor
    * **Keywords**: Set up keywords that will activate this workflow
  </Accordion>
</AccordionGroup>

## Step 2: Build Your Workflow Logic

### Add Your First Node

1. Drag a **Message Node** from the sidebar onto the canvas
2. This will be your welcome message to customers
3. Configure the message content:

```text theme={null}
Hi! I'm your AI assistant. How can I help you today? 

You can ask me about:
• Product information
• Order status
• Returns and refunds
• Technical support
```

### Add AI Response Node

1. Drag an **AI Response Node** after your welcome message
2. Configure the AI settings:
   * **Response Type**: Choose between conversational or structured responses
   * **Knowledge Base**: Select which knowledge base to use for responses
   * **Personality**: Set the tone and style of responses

### Add Condition Node

1. Add a **Condition Node** to handle different types of inquiries
2. Set up conditions based on customer input:
   * If message contains "order" → Route to order status workflow
   * If message contains "return" → Route to returns workflow
   * If message contains "technical" → Route to technical support

### Add Action Nodes

Based on the conditions, add appropriate action nodes:

<CardGroup cols={2}>
  <Card title="Order Status" icon="package">
    * Look up order information
    * Provide status update
    * Offer next steps
  </Card>

  <Card title="Returns Process" icon="undo">
    * Explain return policy
    * Generate return label
    * Schedule pickup
  </Card>

  <Card title="Technical Support" icon="wrench">
    * Collect system information
    * Provide troubleshooting steps
    * Escalate if needed
  </Card>

  <Card title="General FAQ" icon="question">
    * Search knowledge base
    * Provide relevant answers
    * Offer to connect with human
  </Card>
</CardGroup>

## Step 3: Configure Advanced Features

### Add Delays and Timing

* **Delay Node**: Add pauses between messages for natural conversation flow
* **Timeout Settings**: Set maximum wait times for customer responses
* **Business Hours**: Configure when the workflow should be active

### Set Up Escalation

* **Human Handoff**: Create conditions for transferring to human agents
* **Priority Levels**: Set different priority levels for different issues
* **Notification System**: Alert team members when escalation is needed

### Add Data Collection

* **Form Nodes**: Collect customer information systematically
* **Variable Storage**: Store and use customer data throughout the conversation
* **Integration Points**: Connect to your CRM or other business systems

## Step 4: Test Your Workflow

### Use the Test Mode

1. Click **"Test Workflow"** in the top toolbar
2. Enter sample customer messages
3. Watch how the workflow responds
4. Check that all paths work correctly

### Test Different Scenarios

<AccordionGroup>
  <Accordion title="Happy Path Testing">
    Test the most common customer interactions to ensure smooth flow.
  </Accordion>

  <Accordion title="Edge Case Testing">
    Test unusual inputs, errors, and unexpected customer behavior.
  </Accordion>

  <Accordion title="Integration Testing">
    Verify that all external integrations work correctly.
  </Accordion>
</AccordionGroup>

## Step 5: Deploy and Monitor

### Publish Your Workflow

1. Review all settings and configurations
2. Click **"Publish Workflow"**
3. Set the workflow to **Active** status
4. Monitor the deployment status

### Set Up Monitoring

* **Analytics Dashboard**: Track workflow performance metrics
* **Error Logs**: Monitor for any issues or failures
* **Customer Feedback**: Collect feedback on workflow effectiveness

## Common Workflow Patterns

### Linear Flow

Simple, step-by-step workflows that follow a predictable path.

```
Trigger → Welcome Message → AI Response → Action → Follow-up
```

### Branching Flow

Workflows that split into different paths based on conditions.

```
Trigger → Condition → [Path A] → [Path B] → [Path C]
```

### Loop Flow

Workflows that can repeat steps or return to previous steps.

```
Trigger → Process → Condition → [Continue] or [Loop Back]
```

## Troubleshooting Common Issues

<AccordionGroup>
  <Accordion title="Workflow Not Triggering">
    * Check trigger configuration
    * Verify channel connections
    * Test with sample messages
  </Accordion>

  <Accordion title="AI Responses Not Working">
    * Verify AI Brain configuration
    * Check knowledge base connections
    * Review response templates
  </Accordion>

  <Accordion title="Integration Failures">
    * Test external API connections
    * Check authentication credentials
    * Review error logs
  </Accordion>
</AccordionGroup>

## Next Steps

Once you've created your first workflow, explore these advanced topics:

<CardGroup cols={2}>
  <Card title="Node Reference" icon="puzzle-piece" href="/workflow-builder/nodes">
    Learn about all available node types and their configurations
  </Card>

  <Card title="Trigger Setup" icon="bolt" href="/workflow-builder/triggers">
    Configure various types of triggers for your workflows
  </Card>

  <Card title="Analytics" icon="chart-line" href="/analytics/overview">
    Monitor and optimize your workflow performance
  </Card>

  <Card title="Advanced Features" icon="cog">
    Explore advanced workflow capabilities and integrations
  </Card>
</CardGroup>
