Whatsapp Node is not working properly

I am trying to automate the whatsapp node, I got connected successfully by provideing API secret key but when trying to use whatsapp node, its not populating the fields with the value. Its not allowing me to enter value, so I am not able to use this node.

wa

Hi @Sankar_Prakash, I am sorry you are having trouble.

It looks like you haven’t filled out the question template, so it’s not clear to me which version of n8n exactly you are running or how it is deployed. Do you see any error when trying to enter anything in the respective fields?

Hi @MutedJam , Can you take a look at the below details

Describe the issue/error/question

I am trying to automate the WhatsApp node, I got connected successfully by providing the API secret key but when trying to use the WhatsApp node, it’s not populating the fields with the value. It’s not allowing me to enter a value, so I am not able to use this node.

What is the error message (if any)?

wa

Please share the workflow

(Select the nodes and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow respectively)

Share the output returned by the last node

I ssues:

  • There was a problem loading the parameter options from server: “Bad request - please check your parameters”

Information on your n8n setup

  • n8n version: 0.217.2
  • Database you’re using (default: SQLite): SQLite
  • Running n8n with the execution process [own(default), main]: main
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: Docker on Droplet Digital Ocean

Hi @Sankar_Prakash, I am sorry for the trouble. Unfortunately, I am still not able to reproduce your problem so far.

I just created a fresh WhatsApp Business account from scratch and can pick values as expected:

I can also overwrite the dropdown values by switching to an expression:

As for n8n not being able to fetch the required details, did you copy the right values from Facebook’s setup screen? You’d need both a token and the account ID:

@MutedJam I just removed credentials reconfigured then tried the steps, it’s working fine for me. Sorry for my delayed response here. But I have updated it in our discord forum, forgot to update it here. Thank you so much for your responses.

1 Like

Awesome, so glad to hear it’s working now! Thank you so much for confirming :slight_smile:

1 Like

@MutedJam I have one more doubt. How to write the expression in the response body. So I will fetch the data from the previous node, and I want to wite an expression like if the condition is satisfied return 123 else return 456.
The below screen I got the value,

But I would like to write an expression rather than using if else node,

so, I want like below

Hi @Sankar_Prakash, you can execute JS code inside n8n expressions, but you would need to wrap the full code {{ }} in such cases. Also, the underlying library does not support the full JS syntax.

A simple if/else logic would work fine using the ternary operator though:

Result:

image

For more complex code (like the snippet in your screenshot) I’d suggest you use the Code node. Here’s a quick example implementing your logic:

Result:

Just make sure you return a valid n8n data structure either for a single or multiple items depending on the option you select in the Code node.

Hope this helps!

Thank you so much, @MutedJam

1 Like