Post value to array. beginners question

Hi there, i am currently working on a trigger that should update the field “A” within the array:

“customFieldId”: “A”,
“name”: “product”,
“value”: [
“BAR”
],

for this purpose, i have created a post-event and entered within the body parameter the followed expression
:
NAME:
{{[customFieldValues][customFieldId][A] }}

VALUE:
FOO

but this doesn work. ive tried ith with “” and without, rechecked the spelling but i get everytime the same error-message:
The requested resource was not found\

Could somebody help me please?
thanks in advance.
greetings

Screenshot of api doc:

Hey @elbrucko,

Are you working on a node or a workflow I can’t work it out from your post.

Hi Jon,
thank you very much for your fast reply.
Yes i am currently working on a workflow. This event is just a chain ( actually the last one. So the userID, the fieldID and the new parameter is already known).

N8N is installed on our Server, thats why i provide below some screenshots.

Goal:
i want to update custom user fields in GetResponse. This function cant be solved with your predefined events, thats why i have created a own https requst for this.

This is how the api describes the “update custom fields value”

This is how it should look like

"customFieldValues": [
{
"customFieldId": "kL6Nh",
"value": []
}
]
}

so i assume i have to put the values in a array to send it via body.
But - whatever i enter, it doesnt affect the GetResponse user.

Funfact: if i GET the customField in a ealier node and then UIPDATE the CustomField by entering the json expression into the NAME field, nothing changes at GetResponse ( but i also dont recieve a error-message)

Hey @elbrucko,

So in that case you might need to use the raw json option instead of doing it the way that you are that way you can make sure the data is correct and in the format you need to use.

thanks, but how this should look like?

Hey @elbrucko,

Exactly like you have pasted above looking at your screenshots. So you would manually build out your json to send in the format required in n8n. So you would set the Specify Body to Using JSON then you can just type in whatever json you want and add in expressions as needed.

hi, sorry for the trouble, i simply missed the field to enter the raw json.
found it, works, extremely satisfied and happy N8N consumer :wink:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.