JSON Parser: Missing value of required parameter 'json'

Basically, I did the same like Tom_Hudock describe in his question.

I created a webhook, checked that JSON pass-through is disabled (which it is by default) and tried to process the output by a subsequent module (CRM processing). Unlike explained by Runcorn in the above-mentioned post, the output JSON was not parsed automatically by the webhook module so there were no fields available in the subsequent (CRM) module to be used - only the plain JSON string. Enabling JSON pass-through and trying to parse the JSON string resulted in the same error mentioned in Tom_Hudock’s post:

Missing value of required parameter ‘json’

Any idea what’s going wrong?

PS: I did both to no avail, “Redetermine data structure” of webhook module and ran the scenario before I added the subsequent CRM module.

1 Like

Hi @jleo,

Can you share me the Output of Webhook module?

2 Likes

Hi @Runcorn ,
sure! There you are:

[
{
“{"event":{"checksum":"d23bc9fca55d0791e95581c331f0fe424ad87cd8650e88c829ef765386db7b11","tid":1234567890"type":"PAYMENT"},"result":{"status":"FAILURE","status_code":100,"status_text":"Successful"},"transaction":{"amount":0,"currency":"EUR","date":"2023-04-19 13:39:17","due_date":"2023-05-03","mandate_date":"2023-04-19","mandate_ref":"NN-1234567890","order_no":"1234","payment_data":{"account_holder":"Max Mustermann","bic":"DEBICXX","iban":"DEXXXXXXXXXXXXXX1956","token":"sometoken"},"payment_type":"DIRECT_DEBIT_SEPA","status":"CONFIRMED","status_code":100,"test_mode":1,"tid":1234567890},"merchant":{"project":1234,"project_name":"Developer Project","project_url":"https://my.domain.com\",\“vendor\”:4},\“customer\”:{\“billing\”:{\“city\”:\“Teststadt\”,\“country_code\”:\“DE\”,\“house_no\”:\“3\”,\“street\”:\“Teststraße\”,\“zip\”:\“12345\”},\“customer_ip\”:\“192.168.0.2\”,\“customer_no\”:\“2\”,\“email\”:\"my@email.de","first_name":"Max","gender":"u","last_name":"Mustermann","tel":"1234567889"},"custom":{"input2":"reference_tid","input3":"reference_token","inputval2":"1234567890","inputval3":"sometoken","reference_tid":1234567890,"reference_token":"sometoken"}}”: “”
}
]

Best regards,
Jan

Hi @jleo,

Seems like the JSON is not valid and I am not sure if it is due to how you copied or is the one that you are getting.

1 Like

Hi @Runcorn ,
thanks for your answer! The one sent by the API is valid. I have verified that by two ways:

  1. I’ve checked the sent JSON string directly from the sender and
  2. I had the sender sent it to another automation platform which could process it like a charm.

Best regards,
Jan

Hi @jleo,

Can you pass me the raw JSON that you have instead of the one from Make?

Cause, Reviewing it the JSON that you are passing is not valid, I tried validating it against the validator as well.

The projectURL, the

,“tid”:1234567890"type":“PAYMENT”}

they are not correctly formatted.

1 Like

If you enable the JSON passthrough,

You should see the JSON as,

1 Like

Hi @Runcorn,
here is the raw JSON which was sent:

{
“event”: {
“checksum”: “d23b*****7b11”,
“tid”: 1234567890,
“type”: “PAYMENT”
},
“result”: {
“status”: “FAILURE”,
“status_code”: 100,
“status_text”: “Successful”
},
“transaction”: {
“amount”: 0,
“currency”: “EUR”,
“date”: “2023-04-19 13:39:17”,
“due_date”: “2023-05-03”,
“mandate_date”: “2023-04-19”,
“mandate_ref”: “NN-123456789”,
“order_no”: “97”,
“payment_data”: {
“account_holder”: “Max Mustermann”,
“bic”: “ABCDEFXXX”,
“iban”: “DEXXXXXXXXXXXXXX1956”,
“token”: “R2cB16qN"
},
“payment_type”: “DIRECT_DEBIT_SEPA”,
“status”: “CONFIRMED”,
“status_code”: 100,
“test_mode”: 1,
“tid”: 1234567890
},
“merchant”: {
“project”: 1234,
“project_name”: “Developer Project”,
“project_url”: “https://my.domain.com”,
“vendor”: 4
},
“customer”: {
“billing”: {
“city”: “Teststadt”,
“country_code”: “DE”,
“house_no”: “3”,
“street”: “Teststraße”,
“zip”: “12345”
},
“customer_ip”: “1.2.3.4”,
“customer_no”: “2”,
“email”: “my@mail.de”,
“first_name”: “Max”,
“gender”: “u”,
“last_name”: “Mustermann”,
“tel”: “1234567889”
},
“custom”: {
“input2”: “reference_tid”,
“input3”: “reference_token”,
“inputval2”: “1234567890”,
“inputval3”: "02c0
TZZ1”,
“reference_tid”: 1234567890,
“reference_token”: “02c0****TZZ1”
}
}

Here is the raw JSON received:

[
{
“{"event":{"checksum":"d23bc9fca55d0791e957b11","tid":1234567890,"type":"PAYMENT"},"result":{"status":"FAILURE","status_code":100,"status_text":"Successful"},"transaction":{"amount":0,"currency":"EUR","date":"2023-04-19 13:39:17","due_date":"2023-05-03","mandate_date":"2023-04-19","mandate_ref":"NN-123456789","order_no":"97","payment_data":{"account_holder":"Max Mustermann","bic":"ABCDEFXXX","iban":"DEXXXXXXXXXXXXXX1956","token":"R2cB16qN"},"payment_type":"DIRECT_DEBIT_SEPA","status":"CONFIRMED","status_code":100,"test_mode":1,"tid":1234567890},"merchant":{"project":1234,"project_name":"Developer Project","project_url":"https://my.domain.com\",\“vendor\”:4},\“customer\”:{\“billing\”:{\“city\”:\“Teststadt\”,\“country_code\”:\“DE\”,\“house_no\”:\“3\”,\“street\”:\“Teststraße\”,\“zip\”:\“12345\”},\“customer_ip\”:\“1.2.3.4\”,\“customer_no\”:\“2\”,\“email\”:\"my@email.de","first_name":"Max","gender":"u","last_name":"Mustermann","tel":"1234567889"},"custom":{"input2":"reference_tid","input3":"reference_token","inputval2":"1438","inputval3":"02c0TZZ1","reference_tid":1234567890,"reference_token":"02c0*TZZ1"}}”: “”
}
]

Which looks like this in the scenario:
grafik

I’ve ran both JSON string against a validator successfully. So I guess the issue you detected was cause by myself when I was obfuscating the JSON message.

Best regards,
Marcus

How are you triggering the WEbhook?

I think the issue with this is how the webhooks were triggered from your end.

Seems like the content type is different which is the reason that you are getting the Webooks body but make couldn’t map it properly.

Can you ask your sender to change the Content-Type to application/json or text/plain, application/json is preferred though.

1 Like

Hi @Runcorn,
that is indeed the root cause. The content type is application/x-www-form-urlencoded.

I will ask the sender to fix it. Still, would there be an option to force Make assuming a specific content type (e.g. application/json)?

Best regards,
Marcus

Hi @jleo,

I tried to do that with webhooks, but apparently no there is no way to do it through Webhooks as only either a plain text or application/json is supported for the JSON body like you have.

Other formats are supported as well, but the request body needs to be formatted that way, for eg. application/x-www-form-urlencoded can be parsed easily if it sends the request body in accordance to the Content-Type.

1 Like