Hey @Kirst, welcome to the community.
As far as I know, sending data and the file at the same time as multipart/form-data it’s yet not possible. A workaround would be sending the file and then with the ID returned doing a put with the metadata ( name and parent ) assuming, of course, the API allows you to do so. To send the file check the example below.
If something is not clear simply get back to me.
{
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
250,
300
]
},
{
"parameters": {
"requestMethod": "POST",
"url": "https://webhook.site/3786832a-7b75-43bb-a71f-3156a4c76526",
"jsonParameters": true,
"options": {
"bodyContentType": "multipart-form-data"
},
"sendBinaryData": true,
"binaryPropertyName": "file:data"
},
"name": "HTTP Request",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
890,
300
]
},
{
"parameters": {
"url": "https://i.ytimg.com/vi/MPV2METPeJU/maxresdefault.jpg",
"responseFormat": "file",
"options": {}
},
"name": "HTTP Request1",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
540,
300
]
}
],
"connections": {
"Start": {
"main": [
[
{
"node": "HTTP Request1",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request1": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
}
}
}