Automation
Creating Workflows

Creating Workflows

Learn how to build powerful automation workflows that connect your AI agents with your business systems and processes.

Building Your First Workflow

Creating a workflow in Mazaal AI is intuitive and visual. Let's walk through the process step by step:

Access the Automation Section

From your Mazaal AI dashboard, navigate to "Automation" and click "Create Workflow."

Name Your Workflow

Give your workflow a descriptive name and optional description that clearly indicates its purpose.

Select a Trigger

Choose what will start your workflow:

Trigger Selection Interface

Common triggers include:

  • Webhook (for form submissions or API calls)
  • Schedule (for time-based workflows)
  • New Email (for email-triggered processes)
  • App-specific triggers (e.g., new Salesforce lead, new Shopify order)

Add Actions

Click the "+" button to add actions to your workflow. These are the steps that will execute when the trigger fires.

Actions are grouped by application or function:

  • Email actions (send email, parse email)
  • CRM actions (create/update records)
  • File actions (create, read, update)
  • AI agent actions (query agent, analyze text)
  • And many more

Configure Each Action

For each action, you'll configure specific settings. For example, for a "Send Email" action:

  • Recipient email address
  • Subject line
  • Email body
  • Attachments

You can use data from previous steps by clicking the icon and selecting from available variables.

Add Logic (Optional)

For more complex workflows, add conditional logic:

  • Branch based on conditions
  • Loop through items in a list
  • Wait for specific events
  • Handle errors gracefully

Test Your Workflow

Use the "Test" button to run your workflow with sample data and verify each step works as expected.

Activate Your Workflow

Once testing is successful, toggle the workflow to "Active" status to make it operational.

The Workflow Builder Interface

Let's explore the key components of the workflow builder interface:

Workflow Canvas

The canvas is the central area where you build your workflow by connecting triggers and actions:

  • Drag and drop actions to rearrange them
  • Connect lines show the flow of data between steps
  • Zoom controls help navigate complex workflows
  • Mini-map provides an overview of large workflows
  • Grid view helps with alignment and organization

The canvas automatically saves your work as you build, so you never lose progress.

Working with Variables and Data

Understanding how data flows through your workflow is essential for building effective automations:

💡

Variables allow you to pass data between steps in your workflow. Each step produces output variables that can be used by subsequent steps.

Accessing Variables

To use data from a previous step:

  1. Click in any input field where you want to use a variable
  2. Click the {} icon to open the variable selector
  3. Browse the list of available variables from previous steps
  4. Select the variable you want to use

Variables are organized by the step that produced them, making it easy to find what you need.

Data Transformations

Sometimes you need to modify data before using it in the next step. Mazaal AI provides several ways to transform data:

Advanced Workflow Features

As you become more comfortable with basic workflows, explore these advanced capabilities:

Error Handling and Retries

    • Retry failed steps automatically
    • Alternative paths for different error types
    • Notification alerts for critical failures
    • Logging and diagnostics for troubleshooting
  • To add error handling to a step:

    1. Click on the step in your workflow
    2. Open the "Error Handling" section
    3. Choose your preferred error handling strategy:
      • Retry: Attempt the step again after a delay
      • Alternative Path: Execute different steps if this one fails
      • Ignore: Continue the workflow even if this step fails
      • Stop: Halt the entire workflow if this step fails

    Human-in-the-Loop Approvals

    For processes that require human oversight:

    1. Workflow reaches approval step
    2. Designated approver receives notification
    3. Approver reviews information and makes decision
    4. Workflow continues based on approval decision

    To add an approval step:

    1. Add the "Approval Request" action to your workflow
    2. Configure who should receive the approval request
    3. Specify what information they need to make a decision
    4. Define what happens for both approval and rejection outcomes

    Human-in-the-loop processes are essential for high-value transactions, sensitive operations, or scenarios where AI confidence is below a certain threshold.

    Parallel Processing

    Execute multiple actions simultaneously for improved efficiency:

    ─── Start
    
        ├─── Branch A (Process customer data)
        │    │
        │    └─── Update CRM
    
        ├─── Branch B (Process order data)
        │    │
        │    └─── Update inventory
    
        └─── Branch C (Process payment)
    
             └─── Send receipt

    To create parallel branches:

    1. Add a "Split" action to your workflow
    2. Create multiple branches from the split point
    3. Add actions to each branch
    4. Optionally, add a "Join" action to wait for all branches to complete before continuing

    Scheduled Reports and Alerts

    Configure workflows to run on a schedule and generate reports or alerts:

    Daily Sales Report Workflow

    1. Triggers every day at 6:00 AM
    2. Queries sales database for previous day's transactions
    3. Generates summary report with key metrics
    4. Creates visualizations of sales trends
    5. Emails report to management team
    6. Saves copy to shared drive

    Example: AI-Powered Support Ticket Triage

    Let's build a complete workflow example for automating support ticket processing:

    Create a New Workflow

    Name it "Support Ticket Triage" and add a description.

    Select the Trigger

    Choose "Email" trigger and configure it to monitor your support inbox.

    Add AI Analysis Step

    Add the "AI Agent Query" action:

    • Select your customer support AI agent
    • Set the input to the email body from the trigger
    • Configure it to analyze for:
      • Issue category
      • Sentiment
      • Priority
      • Required expertise

    Add Conditional Logic

    Add a "Branch" action that routes based on the AI analysis:

    • High priority issues go to an urgent handling path
    • Standard issues continue through normal processing

    Generate Response Draft

    Add another "AI Agent Query" action:

    • Use the same agent but with a different prompt
    • Ask it to generate a draft response based on the analysis
    • Include relevant knowledge base articles

    Create Ticket in Help Desk

    Add an action for your help desk system (e.g., Zendesk, Freshdesk):

    • Create a new ticket with information from the email
    • Include the AI analysis as internal notes
    • Attach the draft response
    • Assign to the appropriate department based on the analysis

    Send Acknowledgment

    Add a "Send Email" action:

    • Reply to the original sender
    • Include a personalized acknowledgment
    • Provide the ticket number for reference
    • Set expectations for response time

    Test the Workflow

    Run a test with sample support emails to verify each step works correctly.

    Activate the Workflow

    Once testing is successful, toggle the workflow to "Active" status.

    Workflow Templates

    To help you get started quickly, Mazaal AI provides a library of pre-built workflow templates for common business scenarios:

    To use a template:

    1. Go to the Templates gallery in the Automation section
    2. Browse or search for a template that matches your needs
    3. Click "Use Template" to create a new workflow based on the template
    4. Customize the workflow to fit your specific requirements
    5. Test and activate when ready

    Troubleshooting Common Issues

    Common Trigger Issues

    • Webhook not receiving data: Verify the webhook URL is correctly configured in the sending system
    • Schedule trigger not running: Check timezone settings and ensure the workflow is activated
    • App trigger not firing: Confirm connection credentials are valid and permissions are correct

    Troubleshooting Steps:

    1. Check the trigger configuration for errors
    2. Verify external systems are correctly sending data
    3. Review execution logs for trigger events
    4. Test the trigger manually if possible

    Next Steps

    Ready to explore more advanced automation capabilities? Check out these related topics:

    🚀

    The more you automate, the more time you'll have to focus on strategic initiatives. Start with simple workflows that solve immediate pain points, then gradually expand to more complex scenarios as you become comfortable with the platform.