Node for GetResponse: Error in Custom fields

Hey, i am running N8n on my server and recently created a workflow that collects form-data and send them, among with the user-ID, to GetResponse.
For this purpose i am using the GetResponse node.

Even though the Node supports out of the box integrated and custom fields, it seems that the custom field logic is not working.

Current settings:
Resource: contact
Operation: update

Szenario with Integrated fields that i want to update:
works.

Szenario with custom fields that i want to update:
error message.

{"context":{},"name":"NodeApiError","cause":{"message":"400 - {\"httpStatus\":400,\"code\":1000,\"codeDescription\":\"General error of validation process, more details should be in context section\",\"message\":\"Validation error, see context section for more information\",\"moreInfo\":\"https://apidocs.getresponse.com/en/v3/errors/1000\",\"context\":[{\"validationType\":\"body\",\"fieldName\":\"customFieldValues[][values]\",\"originalValue\":\"\",\"errorDescription\":\"Value field must be specified as array\"},{\"validationType\":\"body\",\"fieldName\":\"customFieldValues[][values]\",\"originalValue\":\"\",\"errorDescription\":\"Value field must be specified as array\"},{\"validationType\":\"body\",\"fieldName\":\"customFieldValues[][values]\",\"originalValue\":\"\",\"errorDescription\":\"Value field must be specified as array\"},{\"validationType\":\"body\",\"fieldName\":\"customFieldValues[][values]\",\"originalValue\":\"\",\"errorDescription\":\"Value field must be specified as array\"}],\"uuid\":\"8b88e9c2-dbc4-49d3-899b-e61074e7a5b1\"}","name":"Error","stack":"Error: Request failed with status code 400\n    at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)\n    at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)\n    at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11)\n    at IncomingMessage.emit (node:events:525:35)\n    at endReadableNT (node:internal/streams/readable:1358:12)\n    at processTicksAndRejections (node:internal/process/task_queues:83:21)"},"timestamp":1664988330068,"message":"Bad request - please check your parameters","node":{"parameters":{"authentication":"apiKey","resource":"contact","operation":"update","contactId":"={{ $json[\"query\"][\"user-ID\"] }}","updateFields":{"customFieldsUi":{"customFieldValues":[{"customFieldId":"nw","value":"={{ $json[\"query\"][\"Vorname\"] }}"},{"customFieldId":"n7","value":"={{ $json[\"query\"][\"Nachname\"] }}"},{"customFieldId":"U","value":"={{ $json[\"query\"][\"Anrede\"] }}"},{"customFieldId":"z","value":"={{ $json[\"query\"][\"Geburtsdatum\"] }}"}]},"name":"={{ $json[\"query\"][\"Vorname\"] }} {{ $json[\"query\"][\"Nachname\"] }}"}},"id":"030a1430-9238-409c-bc49-d905f27bb836","name":"GetResponse","type":"n8n-nodes-base.getResponse","typeVersion":1,"position":[740,300],"retryOnFail":false,"alwaysOutputData":true,"notesInFlow":false,"credentials":{"getResponseApi":{"id":"1","name":"GetResponseFM"}}},"httpCode":"400","description":"Validation error, see context section for more information"}

Hi @elbrucko, welcome to the community!

I am sorry to hear you’re having trouble. From looking at the error message you’re getting from GetResponse it says “Value field must be specified as array”. Can you try writing your custom value as an expression like {{ [123] }}? This would cause n8n to use an array (in this case with a single item 123) rather than plain text:

image

Dear @ MutedJam
thank you very much for your fast reply.The Data comes from a webhook and is already inside an expression
screenshot: 2022-10-19_11-06-04

or did i forgot something

{"context":{},"name":"NodeApiError","cause":{"message":"400 - {\"httpStatus\":400,\"code\":1000,\"codeDescription\":\"General error of validation process, more details should be in context section\",\"message\":\"Validation error, see context section for more information\",\"moreInfo\":\"https://apidocs.getresponse.com/en/v3/errors/1000\",\"context\":[{\"validationType\":\"body\",\"fieldName\":\"customFieldValues[][values]\",\"originalValue\":\"\",\"errorDescription\":\"Value field must be specified as array\"},{\"validationType\":\"body\",\"fieldName\":\"customFieldValues[][values]\",\"originalValue\":\"\",\"errorDescription\":\"Value field must be specified as array\"},{\"validationType\":\"body\",\"fieldName\":\"customFieldValues[][values]\",\"originalValue\":\"\",\"errorDescription\":\"Value field must be specified as array\"},{\"validationType\":\"body\",\"fieldName\":\"customFieldValues[][values]\",\"originalValue\":\"\",\"errorDescription\":\"Value field must be specified as array\"}],\"uuid\":\"c2927c9d-f627-4e59-b948-b43c3d936877\"}","name":"Error","stack":"Error: Request failed with status code 400\n    at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)\n    at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)\n    at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11)\n    at IncomingMessage.emit (node:events:525:35)\n    at endReadableNT (node:internal/streams/readable:1358:12)\n    at processTicksAndRejections (node:internal/process/task_queues:83:21)"},"timestamp":1666170095105,"message":"Bad request - please check your parameters","node":{"parameters":{"authentication":"apiKey","resource":"contact","operation":"update","contactId":"={{ $json[\"query\"][\"user-ID\"] }}","updateFields":{"customFieldsUi":{"customFieldValues":[{"customFieldId":"nw","value":"={{ $json[\"query\"][\"Vorname\"] }}"},{"customFieldId":"n7","value":"={{ $json[\"query\"][\"Nachname\"] }}"},{"customFieldId":"U","value":"={{ $json[\"query\"][\"Anrede\"] }}"},{"customFieldId":"z","value":"={{ $json[\"query\"][\"Geburtsdatum\"] }}"}]},"name":"={{ $json[\"query\"][\"Vorname\"] }} {{ $json[\"query\"][\"Nachname\"] }}"}},"id":"030a1430-9238-409c-bc49-d905f27bb836","name":"GetResponse","type":"n8n-nodes-base.getResponse","typeVersion":1,"position":[740,300],"retryOnFail":false,"alwaysOutputData":true,"notesInFlow":false,"credentials":{"getResponseApi":{"id":"1","name":"GetResponseFM"}}},"httpCode":"400","description":"Validation error, see context section for more information"}

Thanks for confirming @elbrucko!

I would be surprised if the last name field from the screenshot would be the problem based on the error message. Or is this the only field you’re using in your GetResponse node?

Perhaps you can share your GetResponse node (simply select it on the n8n canvas, press Ctrl+C to copy it and then paste the result here on the forum) and confirm how exactly you have configured the custom fields used in your node in GetResponse itself?

I tried reproducing this on my own side, but just using text fields such as “Name” is working fine for me:

HI @MutedJam , please keep in mind:
GetResponse has build-in fields ( for example name). They are working correctly.
Additionally, they provide custom fields inside ( value in array). they are NOt working.

Thx @elbrucko, can try removing the custom fields one by one from the node and re-run it until you have identified the offending field? Once you know which field causes the problem, could you confirm how exactly you have configured the field in GetResponse?

hi @MutedJam i have removed all the custom fields one by one without sucess.
Only if i remove ALL of the custom fields and use only the build-in field ( "name), it works
The custom fields are text -fields (eg Vorname / Nachname), Date-fields ( birthday) and select fields ( gender). the parameters for genders are double checked, the expected value is given. Also the date-field is provided correctly. s

Okay, how did you set up your custom fields in GetResponse? They have a number of different data types so this would be important to understand.

See above. Text-field, date field and for “ernährungsweise” select-field.
if i run the getResponse node only with ONE custom field ( eg vorname), i receive the followed Error-Message::“Value field must be specified as array”
{“context”:{},“name”:“NodeApiError”,“cause”:{“message”:“400 - {"httpStatus":400,"code":1000,"codeDescription":"General error of validation process, more details should be in context section","message":"Validation error, see context section for more information","moreInfo":"https://apidocs.getresponse.com/en/v3/errors/1000\“,\“context\”:[{\“validationType\”:\“body\”,\“fieldName\”:\“customFieldValues[][values]\”,\“originalValue\”:\”\",\“errorDescription\”:\"Value field must be specified as array"}],"uuid":"8806e096-f847-4436-b5ae-540567a211ee"}”,“name”:“Error”,“stack”:“Error: Request failed with status code 400\n at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11)\n at IncomingMessage.emit (node:events:525:35)\n at endReadableNT (node:internal/streams/readable:1358:12)\n at processTicksAndRejections (node:internal/process/task_queues:83:21)”},“timestamp”:1666176181161,“message”:“Bad request - please check your parameters”,“node”:{“parameters”:{“authentication”:“apiKey”,“resource”:“contact”,“operation”:“update”,“contactId”:“={{$node["Webhook"].json["query"]["user-ID"]}}”,“updateFields”:{“customFieldsUi”:{“customFieldValues”:[{“customFieldId”:“nw”,“value”:“={{$node["Webhook"].json["query"]["Vorname"]}}”}]}}},“id”:“d89c25bb-283c-41a3-a62a-4a3918543e42”,“name”:“GetResponse1”,“type”:“n8n-nodes-base.getResponse”,“typeVersion”:1,“position”:[960,300],“credentials”:{“getResponseApi”:{“id”:“1”,“name”:“GetResponseFM”}}},“httpCode”:“400”,“description”:“Validation error, see context section for more information”}

if i use this parameter, it works like a charm. but how can i make a array out of this:

{{$node["Webhook"].json["query"]["Vorname"]}}

You could wrap the expression into square brackets like so:

{{ [ $node["Webhook"].json["query"]["Vorname"] ] }}