Actions12
- Profile Management Actions
- Page Interaction Actions
- Browser Automation Actions
Page Interaction → Run JavaScript
AI-generatedSummary
Execute the supplied JavaScript in a browser tab associated with a profile by sending it to the configured browser API. Choose Local, Docker, or Tunnel (Custom URL) as the connection environment; the operation returns the API response for each input item.
Inputs
- Environment — Connection target: Local (default), Docker, or Tunnel. For Tunnel, provide the required tunnel URL.
- Tunnel URL — Required when Environment is Tunnel; the tunnel URL for the browser API.
- Profile ID (required) — ID of the browser profile to use.
- JavaScript Code (required) — JavaScript code to execute in the browser.
- Tab Index — Browser tab index; defaults to 0.
- Auto Start Profile — Whether to start the profile automatically if it is not running; defaults to false.
Output shape
One item per input item, containing the browser API response in its JSON field.
Each output is paired with its source input item. API or execution errors fail the operation unless n8n is configured to continue on error; in that case the item contains an error field.
Examples
Example 1: Execute JavaScript in a profile tab
Select a connection environment, enter the profile ID and JavaScript code, and optionally choose a tab index or enable automatic profile startup.