What you’ll learn: - How to record browser interactions with the Optexity Recorder - How to
understand and edit automation JSON/Python - How to use parameters for dynamic values - How to
run your automation via the API
Prerequisites
Before you begin, ensure you have:- ✅ Completed the Installation guide
- ✅ Optexity running in your local environment
- ✅ Your API key from the dashboard
Install the Recorder Extension
Install the Optexity Recorder extension from the Chrome Web Store. This extension captures your browser interactions and converts them into automation workflows.1
Install the extension
Click “Add to Chrome” on the Chrome Web Store page
2
Pin the extension
Click the puzzle icon in Chrome and pin Optexity Recorder for easy access
3
Add your API key
Click the extension icon and enter your API key from the dashboard
What We’re Building
Let’s create an automation that logs into a website. This simple example demonstrates the core concepts you’ll use in every Optexity workflow:| Step | Action | Description |
|---|---|---|
| 1 | Click | Navigate to the login page by clicking “Sign in” |
| 2 | Type | Enter the email address |
| 3 | Type | Enter the password |
| 4 | Click | Submit the login form |
Step 1: Record the Automation
The fastest way to create an automation is by recording your actions directly in the browser.1
Navigate to the target website
Open Chrome and go to the website you want to automate (e.g.,
https://example.com)2
Start capturing
Click the Optexity Recorder extension icon and hit Start Capture
3
Perform your actions
Interact with the website naturally, click buttons, fill in forms, navigate pages. The
recorder captures every interaction.
4
Stop and save
When finished, click Complete Capture. The automation is automatically saved to your
dashboard as a JSON file.
Step 2: Understand the Automation Structure
Once recorded, your automation is saved as JSON on the dashboard. Let’s break down the structure using a login example.The Complete Automation
Here is a sample automation:Breaking Down Each Component
Automation — The Container
Automation — The Container
The
Automation object is the top-level container that holds your entire workflow:| Property | Purpose |
|---|---|
url | The starting URL—where the browser navigates first |
parameters | Container for variables used during execution |
nodes | Ordered list of actions to execute sequentially |
Parameters — Your Variables
Parameters — Your Variables
Parameters define the data flowing through your automation. They’re divided into two types:Input Parameters — Values you provide before execution:Generated Parameters — Values extracted during execution:
Values are stored as lists of strings. Access them using
{variable_name[index]} syntax, where index is typically 0 for single values.ActionNode — Individual Steps
ActionNode — Individual Steps
Each
ActionNode represents a single atomic action. An ActionNode contains exactly one of
these action types: | Action Type | Purpose | Example | |-------------|---------|---------| |
interaction_action | Click, type, select, scroll, navigate | Clicking a button | |
extraction_action | Extract data from the page | Scraping product prices | |
assertion_action | Verify conditions | Check if logged in | | python_script_action | Run
custom Python code | Data transformation | | fetch_2fa_action | Handle two-factor
authentication | Get OTP from email | python ActionNode( interaction_action=InteractionAction( click_element=ClickElementAction( command="""get_by_role("button", name="Submit")""", prompt_instructions="Click the submit button", ) ), before_sleep_time=0.0, # Wait before action end_sleep_time=1.0, # Wait after action ) Locators — Finding Elements
Locators — Finding Elements
Optexity uses Playwright locators to find elements on the page. The
command field accepts Playwright’s powerful locator syntax:Step 3: Edit and Customize
After recording, you may want to customize your automation. Common edits include:Parameterizing Values
Replace hardcoded values with parameters for flexibility:Adding Descriptive Instructions
Improve theprompt_instructions for better AI fallback:
Adjusting Timing
Control execution speed with timing properties:Step 4: Run Your Automation
Once your automation is defined, execute it through the inference API.Using cURL
Understanding the Request
| Field | Description |
|---|---|
endpoint_name | The name of your automation (as saved on the dashboard) |
input_parameters | Values to inject into your automation |
unique_parameter_names | Parameters that uniquely identify this run (for deduplication) |
Expected Response
A successful run returns:Common Patterns
Here are some patterns you’ll use frequently:Clicking Elements
Filling Form Fields
Selecting Dropdowns
Handling New Tabs
Troubleshooting
Element not found
Element not found
Problem: The automation fails to find an element. Solutions: 1. Improve
prompt_instructions with more visual details 2. Try a different locator strategy (role →
label → text → CSS) 3. Add before_sleep_time to wait for the element to appear 4. Check if
the element is inside an iframeAction executed too fast
Action executed too fast
Problem: The page hasn’t loaded before the next action runs. Solution: Increase
end_sleep_time on the previous action: python ActionNode( interaction_action=InteractionAction(...), end_sleep_time=3.0, # Wait 3 seconds after action ) Variable not substituted
Variable not substituted
Problem: You see
{username[0]} instead of the actual value. Solutions: 1. Ensure
the variable is defined in input_parameters 2. Check the index is correct (starts at 0) 3.
Verify the syntax: {variable_name[index]}Next Steps
Now that you’ve built your first automation, explore these topics to level up:Core Concepts
Deep dive into the automation model, nodes, and execution flow
Locators
Master element location strategies for reliable automations
Interaction Actions
Explore all available interaction types: clicks, inputs, navigation
Extraction Actions
Learn to capture data from web pages into your workflow