Array – JSON Webhooks WP Automator – Help with Syntax

I have this JSON code:

{
  "Subscribers": [
    {
      "EmailAddress":"yikes@to.com",
       "CustomFields": [
      ],
      "Lists": [
        200575230
      ]
    }
  ]
}

I tested this on Postman, it works – it should send the email address of every new registered user to the Promoter.

But, for automation I use WP automator webhooks in WordPress. I can’t use this above code to build this automation, but the code is formatted according to automator “syntax”.

In Automator, for example – this code below:

data": {
    "customer": 123,
    "first_name": "AutomatorWP",
}

is mapped like this:

data/customer
data/first_name

And for parentheses – “parentheses ([]) put the information inside an array, so you need to put the array index like “data/0/first_name” to use this “first_name” parameter on the tag.” – Documentation

Does anyone know or can figure out how to “translate” this code first into an Automator layout?

I tried with:

subscriber/emailaddress and subscriber/0/emailaddress – but I can’t figure out how to send the email to the correct list, it’s as simple as that in neat JSON code

any help appreciated

Leave a Comment