HTTP Request Webhook

I’ll apologise in advance as I suspect I’m missing something very obvious (that’s ok, right? :wink:)
I’m passing a http post request to wordpress (wp webhooks pro plugin) and all is well so far for updating a user (using the standard arguments/parameters).
However, I’m struggling with their integration for updating custom meta. Instead of the usual parameters like this:

“first_name” = “bob”

the parameter(s) need to look like this:

"update_user_meta":[
      {
        "meta_key": "first_custom_key",
        "meta_value": "Some custom value"
      },
      {
        "meta_key": "second_custom_key",
        "meta_value": "The new value"
      } 
    ]

How can I do this with N8N?

You have two options here:

1 - Set the JSON parameters to true and add that to the body as you have it.

2 - Set the body using the key/values, but the value is an expression that resolves to

[
      {
        "meta_key": "first_custom_key",
        "meta_value": "Some custom value"
      },
      {
        "meta_key": "second_custom_key",
        "meta_value": "The new value"
      } 
]

1 Like