Skip to main content
Get started with Visual Workflow Builder in minutes. Build your first workflow on the dashboard and execute it via API.

Prerequisites

Before you begin, make sure you have:
  • A Dari account at app.usedari.com
  • Your API key from the dashboard
  • The Dari Python SDK installed: pip install dari

Step 1: Create Your First Workflow

  1. Log in to app.usedari.com
  2. Navigate to Workflows in the sidebar
  3. Click Create New Workflow
  4. Give your workflow a name (e.g., “My First Workflow”)

Step 2: Add Workflow Steps

Add steps to your workflow using the visual builder:

Browser Action Step

Click Add StepBrowser Action and enter a natural language instruction:
Navigate to Google and search for "browser automation"

Browser Agent Step

For multi-step tasks, add a Browser Agent:
Go to example.com, fill out the contact form with my information, and submit it

Browser Code Step

For precise data extraction, add a Browser Code step:
Extract all product prices from the current page

Step 3: Define Input Variables

Make your workflow reusable by adding input variables:
  1. Click Add Variable in the workflow builder
  2. Name your variable (e.g., search_query)
  3. Use it in your steps with {{search_query}}
Example step with variable:
Search Google for "{{search_query}}"

Step 4: Save and Get Workflow ID

  1. Click Save in the top right
  2. Click Publish to make it available via API
  3. Copy your Workflow ID from the workflow details

Step 5: Execute via API

Now execute your workflow programmatically:
from dari import Dari

client = Dari(api_key="YOUR_API_KEY")

# Start the workflow
result = client.start_workflow(
    workflow_id="YOUR_WORKFLOW_ID",
    input_variables={
        "search_query": "AI automation tools"
    }
)

print(f"Execution ID: {result['workflow_execution_id']}")
print(f"Status: {result['status']}")

Step 6: Monitor Execution

Check the status and get results:
# Get execution details
execution = client.get_execution_details(
    execution_id=result['workflow_execution_id']
)

print(f"Status: {execution['status']}")
print(f"Output: {execution.get('output', {})}")

Your First Complete Workflow

Here’s a complete example that creates a meeting:

In the Dashboard:

Create a workflow with these steps:
  1. Step 1 (Browser Agent):
    Navigate to Google Calendar and create a meeting titled "{{meeting_title}}"
    scheduled for {{date}} at {{time}}
    
  2. Step 2 (Browser Code):
    Get the meeting URL from the page
    

In Your Code:

from dari import Dari
import time

client = Dari(api_key="YOUR_API_KEY")

# Start workflow
result = client.start_workflow(
    workflow_id="YOUR_WORKFLOW_ID",
    input_variables={
        "meeting_title": "Team Standup",
        "date": "tomorrow",
        "time": "10:00 AM"
    }
)

execution_id = result['workflow_execution_id']
print(f"Workflow started: {execution_id}")

# Wait for completion
while True:
    execution = client.get_execution_details(execution_id=execution_id)
    status = execution['status']

    if status in ['completed', 'failed', 'timeout']:
        break

    time.sleep(5)

# Get results
if status == 'completed':
    meeting_url = execution.get('output', {}).get('meeting_url')
    print(f"Meeting created: {meeting_url}")
else:
    print(f"Workflow {status}")

Common Patterns

Pattern 1: Data Extraction

# Workflow: Extract product data from e-commerce site
result = client.start_workflow(
    workflow_id="product-scraper",
    input_variables={
        "product_url": "https://example.com/products/123"
    }
)

# Get extracted data
execution = client.get_execution_details(execution_id=result['workflow_execution_id'])
product_data = execution.get('output', {})

Pattern 2: Form Submission

# Workflow: Fill and submit forms
result = client.start_workflow(
    workflow_id="form-filler",
    input_variables={
        "name": "John Doe",
        "email": "[email protected]",
        "message": "Hello from Dari!"
    }
)

Pattern 3: Multi-Page Navigation

# Workflow: Navigate through multiple pages
result = client.start_workflow(
    workflow_id="multi-page-workflow",
    input_variables={
        "start_url": "https://example.com",
        "search_term": "products",
        "max_pages": 5
    }
)

Next Steps

Troubleshooting

Check that:
  • Your workflow is published (not in draft mode)
  • All required input variables are provided
  • Your API key is valid
  • Increase timeout: timeout_minutes=30
  • Simplify complex workflows into smaller steps
  • Check if the target website is responsive
  • Use Browser Code for reliable element selection
  • Add wait conditions in your workflow steps
  • Verify the page loads completely before interaction
  • Ensure your Browser Code step has a return statement
  • Check that extraction selectors are correct
  • Review execution logs in the dashboard

Need Help?

For questions or support, contact us at [email protected].