Run Custom Script
AI-generatedSummary
Execute a user-defined JavaScript script using the full Playwright API context ($page, $browser, $playwright) within a sandboxed environment and return a normalized array of items as results.
Inputs
- Script Code (required) — JavaScript code to execute, which can access Playwright objects and n8n workflow variables. Must return an array of item objects.
- Browser — Choose the browser type to use: Chromium, Firefox, or Webkit. Defaults to Chromium.
- Browser Launch Options — Options to control browser behavior, including running headless (default true) and slow motion delay in milliseconds.
Output shape
a list of items
The script must return an array of objects representing workflow items; each item may contain JSON and/or binary data. If the script returns a non-array or an error occurs, an error is thrown or returned based on node settings.