I’m part of a business development team, and I recently started using n8n to build an AI-driven automation project that integrates multiple tools — including Browserless for automated web interactions.
This project is critical and must be delivered within one day, so I urgently need expert help from the n8n community.
Goal of the Workflow
The workflow is designed to:
-
Retrieve login data (username, password, and platform link) from Google Sheets.
-
Use the browserless_tool (HTTP Request node) to simulate automated login on the provided platform.
-
Execute a custom JavaScript
codeblock inside Browserless to fill input fields, click buttons, and capture screenshots. -
Return the final page status or base64 screenshot to the next step.
Steps Summary
-
I use an HTTP node named browserless_tool.
-
The JSON Body contains browser configuration and the
codefield for automation. -
JavaScript in
codeinteracts with the page using Playwright APIs.
The Issue
I’ve encountered multiple issues while configuring the JSON body:
-
Initially, I got this error:
“JSON parameter needs to be valid JSON”,
which was caused by line breaks or invalid JSON syntax. -
After switching to
{{ JSON.stringify({...}) }}, the error disappeared,
but now I get a new one:
“Bad request - please check your parameters” -
It seems the Browserless API rejects extra root-level keys like
username,password, orfinalUrl, but the documentation doesn’t clearly define what’s allowed. -
I tried moving all variables into the
codeblock, but the same “Bad request” response persists, and no detailed error message is shown in “Error details → Other info”.
Attachment
I’ve attached my workflow file (.json) for review.
Request
-
I need confirmation of the correct JSON structure for the browserless_tool node in n8n.
-
Clarification on whether
codeshould exist at the root level or inside another object. -
Guidance on safely passing dynamic values (from previous nodes) into the Browserless request body.
Any help would be deeply appreciated — this is the final blocking issue before my project deadline tomorrow. ![]()