AI Agent Management
Workflows & Automation
Build powerful automation workflows with triggers, actions, and conditional logic to automate tasks and create intelligent interactions beyond simple Q&A.
Overview
Workflows allow you to automate complex tasks and create powerful interactions beyond simple Q&A responses. With Docimal's visual workflow builder, you can connect triggers, actions, and conditions to build intelligent automation that responds to user inputs, external events, or scheduled tasks.
Visual Builder
Drag-and-drop interface to design complex workflows with triggers, actions, and conditional logic
Real-Time Execution
Workflows execute instantly in response to triggers with full error handling and retry logic
Custom Actions
Create custom actions using JavaScript/TypeScript, call external APIs, or connect to your systems
Conditional Logic
Add branching paths, if/then conditions, loops, and data transformations to your workflows
[Placeholder: Workflow Builder Overview Interface]
Visual Workflow Builder
The workflow builder provides a canvas-based interface where you can create workflows by connecting nodes. Each node represents a step in your workflow—triggers, actions, conditions, or data operations.
Creating a Workflow
Navigate to the Workflows tab in your agent dashboard
Click "Create Workflow" and give it a descriptive name
Start by adding a Trigger node—this is what starts your workflow
Add Action nodes to perform tasks when the workflow runs
Connect nodes by dragging from output ports to input ports
Configure each node by clicking on it and filling in the settings
Test your workflow using the "Test Run" button
Activate the workflow to start processing real events
[Placeholder: Workflow Canvas with Connected Nodes]
Node Types
- Trigger Nodes: Start the workflow based on events (user messages, webhooks, schedules, etc.)
- Action Nodes: Perform operations like sending emails, API calls, database updates, or custom code
- Condition Nodes: Add if/then logic to branch your workflow based on data or user input
- Data Nodes: Transform, filter, or manipulate data flowing through your workflow
- Delay Nodes: Add time delays or wait for specific conditions before continuing
Triggers
Triggers define when and how your workflow starts. Every workflow must have at least one trigger. You can configure multiple triggers for a single workflow if needed.
User Message Trigger
Starts when a user sends a message matching specific keywords, phrases, or intents
- • Keyword matching (exact or fuzzy)
- • Intent detection using AI
- • Regex pattern matching
- • Multi-language support
Schedule Trigger
Runs workflows at specific times or on recurring schedules
- • Daily, weekly, monthly schedules
- • Cron expression support
- • Timezone configuration
- • One-time scheduled runs
Webhook Trigger
Starts when an external system sends data to your unique webhook URL
- • Unique webhook URL per workflow
- • Support for JSON and form data
- • Authentication options
- • Request validation and filtering
Event Trigger
Responds to platform events like new conversations, agent updates, or user actions
- • Conversation started/ended
- • Negative feedback received
- • Knowledge base updated
- • User inactivity detected
[Placeholder: Trigger Configuration Panel]
Actions
Actions are the operations your workflow performs. Docimal provides a library of pre-built actions for common tasks, and you can create custom actions for specialized needs.
Built-in Actions
Send Email
Send transactional emails to users, team members, or external recipients. Supports HTML templates, dynamic variables, and attachments.
HTTP Request
Make API calls to external services. Supports GET, POST, PUT, DELETE methods with full header and authentication control.
Database Operations
Create, read, update, or delete records in your database. Supports SQL queries and NoSQL operations.
Send Message
Send a message to the user in the chat interface. Supports text, markdown formatting, buttons, and rich media.
[Placeholder: Action Node Configuration with Available Actions]
Custom Actions
For specialized tasks, you can create custom actions using JavaScript or TypeScript. Custom actions have access to the workflow context, user data, and conversation history.
// Example: Custom Action to Calculate Shipping Cost
export async function calculateShipping(context) {
const { weight, destination } = context.input;
// Custom business logic
const baseRate = 5.99;
const perKgRate = 2.50;
const cost = baseRate + (weight * perKgRate);
// Adjust for destination
const multiplier = destination === 'international' ? 2.5 : 1;
const total = cost * multiplier;
return {
shippingCost: total.toFixed(2),
estimatedDays: destination === 'international' ? '7-14' : '2-5'
};
}Conditions & Logic
Add conditional logic to your workflows to create different paths based on user input, data values, or external conditions. This allows you to build dynamic, intelligent automation.
If/Then Conditions
Branch your workflow based on comparisons: equals, contains, greater than, less than, regex matches
Multiple Conditions
Combine multiple conditions with AND/OR logic for complex decision trees
Expression Builder
Use JavaScript expressions for advanced logic and data transformations
Switch Cases
Create multiple branches based on a single value, similar to switch statements in code
[Placeholder: Workflow with Branching Conditions]
Condition Examples
User Intent Detection
Route users to different workflows based on what they're asking about
Business Hours Routing
Handle requests differently based on time of day
User Tier Handling
Provide different experiences based on user subscription level
Variables & Data
Workflows can store and pass data between nodes using variables. This allows you to capture user input, transform data, and use values from previous actions in subsequent steps.
Variable Types
- System Variables: Automatically available data like user ID, conversation ID, timestamp, user message, agent response
- Custom Variables: Data you define and store during workflow execution
- Action Outputs: Results returned by action nodes that can be used in subsequent steps
- External Data: Data fetched from APIs, databases, or webhooks
[Placeholder: Variable Panel Showing Available Data]
Using Variables
Reference variables in your workflow using the double curly brace syntax: {{variable_name}}
// Example: Email template using variables
Subject: Order Confirmation #{{order.id}}
Hi {{user.firstName}},
Thank you for your order! We've received your request for:
- Product: {{order.productName}}
- Quantity: {{order.quantity}}
- Total: ${{order.total}}
Your order will be shipped to:
{{user.shippingAddress}}
Estimated delivery: {{shipping.estimatedDays}} business days
Track your order: {{order.trackingUrl}}✓ Do
- • Use descriptive variable names
- • Store only necessary data
- • Transform data close to where it's used
- • Clear sensitive data after use
✗ Avoid
- • Storing sensitive data unnecessarily
- • Using unclear variable names (x, temp, data)
- • Keeping large datasets in variables
- • Overwriting system variables
Workflow Templates
Get started quickly with pre-built workflow templates for common use cases. Each template includes all necessary triggers, actions, and conditions—just customize with your specific data and credentials.
Lead Capture & Notification
PopularCollect user information and notify your sales team
Automatically detects when users express interest, captures their contact information, stores it in your CRM, and sends real-time notifications to your sales team.
Appointment Scheduling
PopularLet users book appointments through chat
Checks calendar availability, collects appointment details, creates calendar events, sends confirmation emails to users and staff, and adds reminders.
Support Ticket Creation
Automatically create support tickets from conversations
Detects when the agent can't resolve an issue, creates a support ticket in your helpdesk system, provides the user with a ticket number, and routes to human support.
Daily Analytics Report
Send automated daily performance summaries
Runs every morning to compile conversation statistics, user satisfaction scores, common questions, and sends formatted reports to your team via email or Slack.
Order Status Lookup
Provide real-time order tracking information
Extracts order number from user message, queries your order management system via API, retrieves current status and tracking info, and presents it in a formatted message.
Feedback Collection
Gather and store user feedback systematically
Triggers on negative feedback, asks follow-up questions to understand the issue, stores responses in your database, notifies relevant team members, and schedules follow-up.
[Placeholder: Workflow Templates Gallery]
Best Practices
Start with Simple Workflows
Begin with straightforward workflows (one trigger, one or two actions) and test thoroughly before adding complexity. This makes debugging easier and helps you understand how data flows through your workflow.
Test with Real Scenarios
Use the Test Run feature to simulate workflow execution with realistic data. Test edge cases, error conditions, and unexpected inputs to ensure your workflow handles all situations gracefully.
Add Error Handling
Always include error handling for external API calls, database operations, and custom actions. Configure what happens when an action fails—retry automatically, send notifications, or follow an alternative path.
Document Your Workflows
Give workflows clear, descriptive names and add comments to explain complex logic. Include notes about external dependencies, required credentials, and maintenance considerations for future reference.
Monitor Performance
Regularly review workflow execution logs and metrics. Track success rates, execution times, error frequency, and user satisfaction to identify optimization opportunities and potential issues.
Keep Workflows Focused
Each workflow should handle one specific task or process. If a workflow becomes too complex, consider splitting it into multiple smaller workflows that can be triggered independently or chained together.