HTTP Node to send file direct to Ninox RecordPictureField

What must the http-node look like if I want to send a file as shown in the screenshots?





So far it works that I load the file into the attachment of the record.

However, I would now like to load it directly into an image field of the record.

You said that so far, it worked, but the image shows an error? Does it work or not? Look like there are two steps here. First, upload the image that should return a File ID, and second link the file to a specific record using a File ID and a Record ID. What is the part you need help with?

1 Like

Hello Ricardo.
Thank you for your answer.
The screenshot with the error works. (Was a wrong API key). It writes the file into the attachment of the record.
However, I want the file to be written directly into an image field of the record.
For this, the body of the http-POST must look like this: (working example in NodeRed)
{
“filename”: {
“value”: databuffer,
“options”: {
“filename”: “Haribo.png”
}
}, “fieldId”: “M1”
}
How do I get ‘fieldId:M1’ into the body of the n8n-http-node? So far only ‘data’ is stored there.

So in addition to the binary data in the filename.value field you’d like to send a string in the fieldId field? That’s a bit tricky at the moment I am afraid and not supported by the HTTP Request node (which sends either JSON data or binary data, but not both at the same time).

@RicardoE105 provided a workaround for this a while back:

This example uses a Function node to perform a request similar to what you have in mind (the HTTP Request node from the example simply fetches an example file). Would this work for you?

Hello MutedJam
Thank you for pointing this out.
I have now solved it differently.
At the end, I send a PUT request that transfers the transferred file name to the image field. Ninox then automatically saves the transferred file from the attachment to the image field.

1 Like

Nice, glad to hear you sorted it without the function :slight_smile: