Browser Use Integration
Overview
The Browser Use node runs a Browser Use Cloud agent as a step in a Lamatic flow. You describe a task in plain words, and the agent does the task in a cloud browser. The node returns the answer as text, or as JSON in a shape that you define.
Use this node when a website has no API for what you need. For example, a flow can read a price from a product page, or fetch a report from a site that you sign in to.
The Browser Use node is an Action node. It runs as a step inside a flow and cannot start a flow. Each run uses the credits of the Browser Use project that owns your API key.
Features
Key Functionalities
- Action - Run a task and wait: Starts a run and waits for the result, for up to 720 seconds.
- Action - Start a task: Starts a run and returns the Run ID at once, so that a later step can read the result.
- Action - Get run: Returns the status and the result of a run, and can wait until the run ends.
- Action - Cancel run: Asks Browser Use to cancel a run.
- Action - List files: Lists the files that the agent saved during a run.
Benefits
- Text or JSON results: The node returns the answer as text, or as JSON in a shape that you define.
- Cost cap for each run: Max cost (USD) limits the model and search charges of a run. The default is 2 USD. Browser Use bills browser time and network usage separately.
- Saved logins: A Browser Use profile starts the browser already signed in to a site.
- Wait limit: When a run outlasts Max wait (seconds), the node asks Browser Use to cancel the run. You can turn this off with Cancel run on timeout.
- Long tasks: Start a task in one step, and read the result in a later step with Get run.
Prerequisites
Before you set up the Browser Use node, make sure that you have the following:
- Browser Use Cloud account: Runs use the credits of your Browser Use project. For pricing, see Billing and credits in the Browser Use docs.
- Browser Use API key: The key starts with
bu_. Create the key in Browser Use under Settings, API keys.
You need these items only for some tasks:
- Browser Use profile ID: For a site that needs a login, use a Browser Use profile that is already signed in to the site. See Profiles in the Browser Use docs.
- EU host: For a key made in the Browser Use EU dashboard, use the host
https://api.eu.browser-use.com. See EU deployment in the Browser Use docs.
Setup
Step 1: Create a Browser Use API Key
- Open Settings, API keys in Browser Use Cloud.
- Create an API key and copy it. The key starts with
bu_.
Step 2: Add the Credential in Lamatic
- Add the Browser Use node to your flow. The node is in the Apps section.
- In Credentials, add a new credential.
- Enter a Credential Name and your Browser Use API Key.
- Leave Host as it is, unless you made the key in the Browser Use EU dashboard. For an EU key, enter
https://api.eu.browser-use.com. - Click Test & Save.
Studio sends a test request to Browser Use with the key. Studio saves the credential only if Browser Use accepts the key.
Step 3: Configure the Node
- Select the credential in Credentials.
- Select an Action. The default is Run a task and wait.
- Write the Task in plain words. For a first test, use a page with a known answer. For example,
Open https://example.com and tell me the title of the page. - To get JSON back, define the fields in Output shape (optional).
- Set Max cost (USD) and Max wait (seconds) for the task.
The Configuration Reference describes every field.
Step 4: Test the Flow
A test in Studio starts a real run on Browser Use. The run uses the credits of your Browser Use project.
Run a test of the flow in Studio. When the run completes, Success is true and Answer holds the result. For the example task, Answer should name Example Domain, which is the title of that page.
Configuration Reference
Credential Configuration
| Parameter | Description | Required | Example |
|---|---|---|---|
| Credential Name | Name that identifies the credential in Lamatic | Yes | my-browser-use-key |
| Browser Use API Key | API key from Browser Use. The key starts with bu_. | Yes | bu_... |
| Host | Address of the Browser Use API. The default is https://api.browser-use.com. Use https://api.eu.browser-use.com for a key made in the EU dashboard. The host must be an https address on browser-use.com. | No | https://api.eu.browser-use.com |
Action Configuration
Every action has these fields:
| Parameter | Description | Required | Default |
|---|---|---|---|
| Name | Display name of the node in the flow | No | Browser Use |
| Credentials | The Browser Use credential to run with | Yes | None |
| Action | What the node does: Run a task and wait, Start a task, Get run, Cancel run, or List files | Yes | Run a task and wait |
The other fields depend on the action.
Run a task and wait
This action starts a run. The node then waits until the run ends or Max wait (seconds) passes.
| Parameter | Description | Required | Default |
|---|---|---|---|
| Task | What the agent should do, in plain words. For example, find the price of a product on a site. | Yes | None |
| Output shape (optional) | The JSON shape to get back in Output. Leave it empty to get text only. See Output Shape. | No | Empty |
| Max cost (USD) | The limit for the model and search charges of the run, in USD. Browser Use bills browser time and network usage separately. See Billing and credits. The value must be more than 0. Leave it empty to use the default of Browser Use. See Create Run for that default. | No | 2 |
| Max wait (seconds) | How long the node waits for the run, from 10 to 720 seconds. The node moves a value outside this range to the nearest limit. | No | 600 |
| Cancel run on timeout | When this option is on, the node asks Browser Use to cancel the run when the wait ends. If the cancellation fails, the run can continue. | No | On |
| Saved login (profile ID) | The ID of a Browser Use profile that is already signed in to the site. Create profiles in the Browser Use dashboard under Profiles. | No | Empty |
| Advanced options (JSON) | Other run fields that Browser Use accepts, such as {"model": "claude-opus-5"} or {"keepAlive": 600}. See Advanced Options. | No | Empty |
Start a task
This action starts a run and returns at once. The run continues on Browser Use. Read the result later with Get run.
The node does not wait for this run and does not cancel it. Max cost (USD) still applies.
| Parameter | Description | Required | Default |
|---|---|---|---|
| Task | What the agent should do, in plain words | Yes | None |
| Output shape (optional) | The JSON shape to get back in Output. Leave it empty to get text only. | No | Empty |
| Max cost (USD) | The limit for the model and search charges of the run, in USD. The value must be more than 0. Leave it empty to use the default of Browser Use. | No | 2 |
| Saved login (profile ID) | The ID of a Browser Use profile that is already signed in to the site | No | Empty |
| Advanced options (JSON) | Other run fields that Browser Use accepts | No | Empty |
Get run
This action returns the current status and the result of a run. It never cancels the run.
| Parameter | Description | Required | Default |
|---|---|---|---|
| Run ID | The Run ID output of a Start a task or Run a task and wait step | Yes | None |
| Wait until it ends | When this option is on, the node waits for the run to end before it returns. | No | Off |
| Max wait (seconds) | How long the node waits, from 10 to 720 seconds. The node uses this field only when Wait until it ends is on. | No | 600 |
Cancel run
This action asks Browser Use to cancel a run, and then returns the run. Cancelled is true only when the status of the run is cancelled.
| Parameter | Description | Required | Default |
|---|---|---|---|
| Run ID | The Run ID output of a Start a task or Run a task and wait step | Yes | None |
List files
This action lists the files that the agent saved in the workspace of a run. Each call returns up to 100 files.
| Parameter | Description | Required | Default |
|---|---|---|---|
| Run ID | The Run ID output of a Start a task or Run a task and wait step | Yes | None |
| Page cursor | The Next cursor output of an earlier List files step, to get the next page | No | Empty |
Output Shape
Output shape (optional) defines the JSON that the node returns in Output.
- Leave the field empty to get text only.
- In a flow config, the value is a JSON Schema object, written as text.
- The shape can be nested up to 64 levels deep.
For how Browser Use fills the shape, see Structured output in the Browser Use docs.
Advanced Options
Advanced options (JSON) takes one JSON object. The node adds each key of the object to the request that it sends to Browser Use.
- A key that the node also sets replaces the value from the node. For example,
{"maxCostUsd": 5}replaces Max cost (USD). - The node ignores a
taskkey. The node always sends the Task field. - The node merges a
browserSettingskey with the profile from Saved login (profile ID).
For the fields that Browser Use accepts, see Create Run in the Browser Use API reference.
Use Lamatic secrets for passwords. Do not type a password into Task or Advanced options (JSON).
Long Tasks
The node waits for 720 seconds at most, and a flow has a time limit of its own.
- A task that outlasts a sync flow: Set the response type of the trigger to async. See How long a flow can run.
- A task that takes more than 720 seconds: Use Start a task. Then read the result with Get run, in a later step or in another flow.
Low-Code Example
This example runs a task, waits for the result, and returns JSON.
nodes:
- nodeId: browserUseNode_1
nodeType: browserUseNode
nodeName: Browser Use
values:
credentials: my-browser-use-key
action: runTaskAndWait
task: 'Open {{triggerNode_1.output.url}} and find the name and the price of the product.'
outputSchema: |-
{
"type": "object",
"properties": {
"name": { "type": "string" },
"price": { "type": "number" }
},
"required": ["name", "price"]
}
maxCostUsd: 2
maxWaitSeconds: 600
cancelOnTimeout: true
modes: {}
needs:
- triggerNode_1This example starts a task in one step and reads the result in the next step.
nodes:
- nodeId: browserUseNode_1
nodeType: browserUseNode
nodeName: Start browser task
values:
credentials: my-browser-use-key
action: startTask
task: 'Open {{triggerNode_1.output.url}} and save the latest report as a file.'
maxCostUsd: 2
modes: {}
needs:
- triggerNode_1
- nodeId: browserUseNode_2
nodeType: browserUseNode
nodeName: Get browser run
values:
credentials: my-browser-use-key
action: getRun
runId: '{{browserUseNode_1.output.runId}}'
waitUntilDone: true
maxWaitSeconds: 600
modes: {}
needs:
- browserUseNode_1Output
The outputs of the node depend on the action.
| Output | Key | Type | Description |
|---|---|---|---|
| Run ID | runId | Text | ID of the Browser Use run. Pass it to Get run, Cancel run, or List files. |
| Session ID | sessionId | Text | ID of the Browser Use session of the run |
| Workspace ID | workspaceId | Text | ID of the workspace that holds the files of the run. Empty when the run has no workspace. |
| Status | status | Text | Status of the run, as Browser Use reports it. The node knows queued, dispatching, running, completed, failed, and cancelled. |
| Success | success | Boolean | true when the status is completed |
| Timed out | timedOut | Boolean | true when the wait of the node ended before the run ended |
| Cancelled | cancelled | Boolean | true when the status is cancelled |
| Answer | answer | Text | The result of the task, as text |
| Output | output | Object | The result as JSON, in the shape from Output shape (optional) |
| Error | error | Text | The error that Browser Use reports for the run. Empty when there is none. |
| Cost (USD) | costUsd | Number | The model and search charges of the run in USD, as Browser Use reports them. Browser time and network usage are not included. |
| Files | files | Array | The files of the run. Each file has path, size, lastModified, and a url when Browser Use provides one. |
| Next cursor | nextCursor | Text | Pass it as Page cursor to get the next page of files. Empty when no page is left. |
| Has more | hasMore | Boolean | true when more files are left to list |
Outputs by Action
| Action | Outputs |
|---|---|
| Run a task and wait | Run ID, Session ID, Workspace ID, Status, Success, Timed out, Cancelled, Answer, Output, Error, Cost (USD) |
| Start a task | Run ID, Session ID, Workspace ID, Status |
| Get run | Run ID, Session ID, Workspace ID, Status, Success, Timed out, Cancelled, Answer, Output, Error, Cost (USD) |
| Cancel run | Run ID, Session ID, Workspace ID, Status, Success, Cancelled, Answer, Output, Error, Cost (USD) |
| List files | Run ID, Workspace ID, Files, Next cursor, Has more |
Failed Runs and Timeouts
- Failed run: When Browser Use reports the status
failed, the node does not fail. The node returnssuccess: falseand the reason inerror. Check Success before you use Answer or Output. - Timeout: When the wait ends before the run ends, the node returns
timedOut: true. With Cancel run on timeout on, the node asks Browser Use to cancel the run. With the option off, the run continues, and you can read it later with Get run. - Run that ends as the wait ends: The node returns the result of the run, with
timedOut: false.
Example Output Reference
schema:
runId: string
sessionId: string
workspaceId: string
status: string
success: boolean
timedOut: boolean
cancelled: boolean
answer: string
output: object
error: string
costUsd: number
files: array
nextCursor: string
hasMore: booleanTroubleshooting
Common Issues
Credential Errors
When the test of a credential fails, Studio shows Invalid credentials with the message from the test, such as one of the first four messages in this table. The last two messages appear when the node runs.
| Problem | Solution |
|---|---|
Enter your Browser Use API key. | Browser Use API Key is empty. Paste the key, then click Test & Save again. |
Browser Use rejected the API key. Check the key and the host in the credential. | Check that you copied the whole key. For a key made in the EU dashboard, set Host to https://api.eu.browser-use.com. |
The Browser Use host must be an https address on browser-use.com. | Set Host to https://api.browser-use.com or https://api.eu.browser-use.com. |
The Browser Use host is not a valid URL. | Enter the full address in Host, with https:// at the start. |
Select a Browser Use credential. | The node has no credential. Select one in Credentials. |
The Browser Use credential has no API key. | The saved credential has no key. Add a new credential with the key, and select it in Credentials. |
Field Errors
The node checks these fields before it calls Browser Use.
| Problem | Solution |
|---|---|
Select a valid browser action. | Action has a value that the node does not know. In a flow config, use runTaskAndWait, startTask, getRun, cancelRun, or listFiles. |
Task is required. or Run ID is required. | Fill in the field. If the field uses a variable, check that the earlier step returned a value. |
Max cost must be more than 0 USD. | Set Max cost (USD) to a number above 0, or leave it empty. |
Output shape is not valid JSON. or Output shape must be a JSON object. | Correct the JSON in Output shape (optional). The value must be one JSON object. |
Output shape must not exceed 64 levels of nesting. | Use fewer levels of nesting in the shape. |
Advanced options is not valid JSON. or Advanced options must be a JSON object. | Enter one JSON object in Advanced options (JSON), for example {"keepAlive": 600}. |
Run Errors
| Problem | Solution |
|---|---|
The Browser Use project has no credits left, or the key reached its monthly spend limit. | Add credits to the Browser Use project, or raise the spend limit of the key. See Billing and credits. |
Browser Use refused the request. The key may lack a scope, or the project may block this model. | Check the scopes of the key in Browser Use. If Advanced options (JSON) sets a model, use a model that your project allows. |
Browser Use found no run, session, or workspace with that ID. | Check Run ID. Use the Run ID output of a Start a task or Run a task and wait step. |
That Browser Use session already has an active run. Wait for it to end or cancel it. | Wait for the active run to end, or cancel it with Cancel run. |
Browser Use rejected the request. or Browser Use rejected the request fields. | Browser Use did not accept a field. Any text after the message gives the reason. Check Output shape (optional) and Advanced options (JSON). |
Browser Use rate limit reached. Try again in a few seconds. | Run the step again after a few seconds. |
The Browser Use project is at its limit of concurrent sessions. | Wait for other runs to end, then run the step again. See Concurrency and limits. |
Browser Use is unavailable right now (status 500). or Could not reach Browser Use. | The status number in the message can differ. For Get run, Cancel run, or List files, run the step again later. For Run a task and wait or Start a task, a run can have started even though the message names no run. Look for the run in the Browser Use dashboard before you run the step again, because a second run uses credits again. |
Browser Use did not answer in time. | If the message names a run, see Errors That Name a Run before you run the step again. If the message names no run and the step is Run a task and wait, the run still started. Look for it in the Browser Use dashboard before you run the step again. For a Get run step, run the step again. |
Browser Use sent a response this node cannot read | Contact Lamatic support and include the full message. |
Timed out is true | The wait ended before the run ended. Raise Max wait (seconds), or use Start a task and Get run. See Long Tasks. |
Success is false and Error has text | Browser Use reported that the run failed. Read Error for the reason. |
Errors That Name a Run
When a step fails after the run started, the message can end with the run and what happened to it. In this table, RUN_ID stands for the ID of the run.
| End of the message | Meaning |
|---|---|
Browser Use run RUN_ID was cancelled. | The node cancelled the run. |
Browser Use run RUN_ID had already ended. | The run ended before the node could cancel it. Read the result with Get run. |
Browser Use run RUN_ID may still be running. Cancel it in the Browser Use dashboard. | The node could not cancel the run. Try Cancel run with that Run ID, or use the dashboard. |
Browser Use run RUN_ID is still running. | Cancel run on timeout is off, so the node left the run. Cancel the run with Cancel run. |