Skip to main content

Variables

Use variables in workflow agentic actions or in agent prompts to specify dynamic information.

Overview

Using Variables in API Calls

When calling Run Workflow via the API, you can pass variables in the request body:
{
  "workflow_id": "your-workflow-id",
  "variables": {
    "username": "john_doe",
    "product_id": "12345",
    "quantity": 2,
    "customer_email": "john@example.com"
  }
}

Variable Types

Simplex supports various variable types:

String Variables

{
  "name": "John Doe",
  "email": "john@example.com",
  "account_id": "ACC-12345"
}

Numeric Variables

{
  "quantity": 5,
  "price": 99.99,
  "timeout_seconds": 30
}

Boolean Variables

{
  "use_proxy": true,
  "skip_confirmation": false,
  "enable_logging": true
}

Object Variables

{
  "shipping_address": {
    "street": "123 Main St",
    "city": "San Francisco",
    "state": "CA",
    "zip": "94105"
  }
}

Array Variables

{
  "product_ids": ["123", "456", "789"],
  "selected_options": ["color:blue", "size:large"]
}