NodeOperationError: Bad request - please check your parameters (item 0)

Hey guys,

this topic drives me crazy and I have tried several things.

I’m currently building a very simple n8n workflow where an incoming chat message should be forwarded via Gmail.

Workflow Setup

  • Trigger: When chat message received

  • Action: Send a message (Gmail node)

  • Gmail node configuration:

    • To: (external test address)

    • Subject: “a message from N8N”

    • Message: ={{ $json.chatInput }} (should pull the input from the trigger)

The full workflow JSON is attached.


The Issue

Whenever I run the workflow, the execution fails at the Gmail node.

Error shown in the UI:

Bad request - please check your parameters (item 0)
Precondition check failed.

Error details from the logs (screenshot 2):

{
  "error": {
    "code": 400,
    "message": "Precondition check failed.",
    "errors": [
      {
        "message": "Precondition check failed.",
        "domain": "global",
        "reason": "failedPrecondition"
      }
    ],
    "status": "FAILED_PRECONDITION"
  }
}


Expected Behavior

  • The incoming chatInput value should be passed into the Gmail node and sent as an email message.

Actual Behavior

  • The Gmail node fails immediately with HTTP 400 Bad Request.

  • The error suggests that either required parameters are missing or invalid (“Precondition check failed”).


My questions:

  • Has anyone encountered this specific error with the Gmail node before?

  • Is there a required field I’m missing (e.g. From address, encoding, or Email type)?

  • Could the problem be with the expression ={{ $json.chatInput }} not being passed correctly?

Thanks a lot for your help!

hi @Monica_Stavi !

I remember seeing some others having a similar error due to the email not being a “@gmail.com” (did a quick search and found this other thread (kudos to @Yo_its_prakash ) - so give it a check if your email admin can do this change for you (maybe first try with a regular @gmail.com just to confirm if it works :slight_smile: )

Please let me know if that worked!

Cheers!

1 Like

You are great!!! That was indeed the problem: If you use your own domain-linked Gmail account (which was actually the case for me), then you get this error message.

The link you provided says the following:

*Ask your Workspace admin to enable “Less secure app access” for your account.
This issue specifically affects non-Gmail domains due to stricter security policies on Google Workspace accounts compared to regular Gmail accounts.
*
I have asked also ChatGPT on this topic. Here the answer:

That’s exactly the catch:
:backhand_index_pointing_right: “Less secure app access” has been discontinued by Google/Gmail since 2022.

Previously, you could activate this in your Google account settings and allow apps without OAuth. Today, this is no longer possible—Google has completely disabled this option.

I have now researched this and it seems that this feature no longer exists. How exactly can I classify my own domain Gmail as secure so that it works? It would be a bit unprofessional if I had to use a “Gmail” email for my business… Do you perhaps have a solution for this? :slight_smile:

1 Like

Follow the the links on this thread: https://stackoverflow.com/questions/77300161/getting-precondition-check-failed-when-using-gmail-api-with-a-service-account

1 Like

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