Skip to main content
Parameters control data flow in Optexity automations. They enable you to run the same automation with different inputs and capture outputs for use in subsequent steps.

Parameter Types

TypePurposeWhen SetExample Use
input_parametersData you provideBefore executionUsername, search queries
generated_parametersData extracted during executionDuring automationOrder IDs, confirmation numbers
secure_parametersSensitive data from secure storageRetrieved at runtimePasswords, API keys, TOTP codes

Defining Parameters

All parameters must be declared in the automation’s parameters object:
{
  "parameters": {
    "input_parameters": {
      "username": ["example_username"],
      "search_queries": ["query1", "query2"]
    },
    "secure_parameters": {
      "password": [{
        "onepassword": {
          "vault_name": "vault",
          "item_name": "login",
          "field_name": "password"
        }
      }]
    },
    "generated_parameters": {
      "order_ids": []
    }
  }
}
Values must always be lists: ["value"] not "value".

Accessing Parameters

Use {variable_name[index]} syntax to reference values:
SyntaxUse CaseExample
{username[0]}First (or only) valueSingle email address
{items[1]}Second valueSpecific list item
{order_ids[index]}Current loop iterationIn for_loop_node

Where Substitution Works

FieldExample
input_text"{email[0]}"
prompt_instructions"Click order {order_id[0]}"
commandget_by_text("{item[0]}")
xpath//td[text()='{id[0]}']
select_values["{country[0]}"]
task (agentic)"Search for {query[0]}"

Input Parameters

Values provided before execution. Declare placeholder values in the automation; actual values are passed in the inference request. In automation:
"input_parameters": {
  "family_name": ["placeholder"],
  "first_name": ["placeholder"]
}
In inference request:
"input_parameters": {
  "family_name": ["Smith"],
  "first_name": ["John"]
}

Generated Parameters

Values extracted during execution. Initialize as empty lists; they’re populated by extraction actions.
"generated_parameters": {
  "order_ids": [],
  "confirmation": []
}
Populate using output_variable_names in extraction actions:
{
  "extraction_action": {
    "llm": {
      "extraction_format": { "order_ids": "List[str]" },
      "extraction_instructions": "Extract all order IDs from the table",
      "output_variable_names": ["order_ids"]
    }
  }
}
After extraction, use {order_ids[index]} in subsequent actions or iterate with for_loop_node.
Only str and List[str] types can be stored as variables. Other types can be extracted but won’t be available for substitution.

Secure Parameters

Sensitive values retrieved from secure storage at runtime. Never hardcode passwords in automations.

1Password Integration

"secure_parameters": {
  "password": [{
    "onepassword": {
      "type": "raw",
      "vault_name": "my_vault",
      "item_name": "my_login",
      "field_name": "password"
    }
  }]
}

TOTP Codes

Generate 2FA codes from a TOTP secret:
"secure_parameters": {
  "auth_code": [{
    "totp": {
      "totp_secret": "BASE32SECRET"
    }
  }]
}
Or retrieve TOTP secret from 1Password:
"secure_parameters": {
  "auth_code": [{
    "onepassword": {
      "type": "totp_secret",
      "vault_name": "vault",
      "item_name": "login",
      "field_name": "totp_secret",
      "digits": 6
    }
  }]
}
See 1Password Integration and TOTP Integration for setup instructions.

Loop Index Variable

In for_loop_node, use {variable[index]} for the current iteration value:
{
  "type": "for_loop_node",
  "variable_name": "product_ids",
  "nodes": [{
    "type": "action_node",
    "interaction_action": {
      "click_element": {
        "command": "get_by_text(\"{product_ids[index]}\")",
        "prompt_instructions": "Click product {product_ids[index]}"
      }
    }
  }]
}
If product_ids = ["PROD-1", "PROD-2", "PROD-3"]:
  • Iteration 1: {product_ids[index]}"PROD-1"
  • Iteration 2: {product_ids[index]}"PROD-2"
  • Iteration 3: {product_ids[index]}"PROD-3"

Complete Example

This automation logs in, extracts order IDs, and processes each order:
{
  "url": "https://orders.example.com",
  "parameters": {
    "input_parameters": {
      "username": ["admin@example.com"]
    },
    "secure_parameters": {
      "password": [{
        "onepassword": {
          "type": "raw",
          "vault_name": "vault",
          "item_name": "orders",
          "field_name": "password"
        }
      }]
    },
    "generated_parameters": {
      "order_ids": []
    }
  },
  "nodes": [
    {
      "type": "action_node",
      "interaction_action": {
        "input_text": {
          "command": "get_by_label(\"Email\")",
          "input_text": "{username[0]}"
        }
      }
    },
    {
      "type": "action_node",
      "interaction_action": {
        "input_text": {
          "command": "get_by_label(\"Password\")",
          "input_text": "{password[0]}"
        }
      }
    },
    {
      "type": "action_node",
      "interaction_action": {
        "click_element": {
          "command": "get_by_role(\"button\", name=\"Sign In\")"
        }
      }
    },
    {
      "type": "action_node",
      "extraction_action": {
        "llm": {
          "extraction_format": { "order_ids": "List[str]" },
          "extraction_instructions": "Extract all order IDs",
          "output_variable_names": ["order_ids"]
        }
      }
    },
    {
      "type": "for_loop_node",
      "variable_name": "order_ids",
      "nodes": [{
        "type": "action_node",
        "interaction_action": {
          "click_element": {
            "command": "get_by_text(\"{order_ids[index]}\")",
            "prompt_instructions": "Click order {order_ids[index]}"
          }
        }
      }]
    }
  ]
}

Best Practices

PracticeExample
Use descriptive namespatient_date_of_birth not dob
Use placeholder values in automation["placeholder@test.com"]
Pass real values in inference requestActual user credentials
Initialize generated params as empty"order_ids": []
Always use lists["value"] not "value"