Critical Help Needed: n8n Browserless Node Returns “Bad Request – Please Check Your Parameters” Even with Valid JSON.stringify()

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.

:wrench: Goal of the Workflow

The workflow is designed to:

  1. Retrieve login data (username, password, and platform link) from Google Sheets.

  2. Use the browserless_tool (HTTP Request node) to simulate automated login on the provided platform.

  3. Execute a custom JavaScript code block inside Browserless to fill input fields, click buttons, and capture screenshots.

  4. Return the final page status or base64 screenshot to the next step.

:gear: Steps Summary

  • I use an HTTP node named browserless_tool.

  • The JSON Body contains browser configuration and the code field for automation.

  • JavaScript in code interacts with the page using Playwright APIs.

:police_car_light: The Issue

I’ve encountered multiple issues while configuring the JSON body:

  1. Initially, I got this error:
    “JSON parameter needs to be valid JSON”,
    which was caused by line breaks or invalid JSON syntax.

  2. After switching to {{ JSON.stringify({...}) }}, the error disappeared,
    but now I get a new one:
    “Bad request - please check your parameters”

  3. It seems the Browserless API rejects extra root-level keys like username, password, or finalUrl, but the documentation doesn’t clearly define what’s allowed.

  4. I tried moving all variables into the code block, but the same “Bad request” response persists, and no detailed error message is shown in “Error details → Other info”.

:package: Attachment

I’ve attached my workflow file (.json) for review.

:warning: Request

  • I need confirmation of the correct JSON structure for the browserless_tool node in n8n.

  • Clarification on whether code should 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. :folded_hands:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.