@arsalagrey check the example below. Just ad your credentials to the last HTTP Node.
{
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
260,
350
]
},
{
"parameters": {
"authentication": "headerAuth",
"requestMethod": "POST",
"url": "=https://gitlab.com/api/v4/projects/grey-software/org/repository/files/:",
"options": {},
"bodyParametersUi": {
"parameter": [
{
"name": "file_path",
"value": "content/analytics/grey.software/${{new Date().toISOString().substring(0,10)}}.png"
},
{
"name": "branch",
"value": "master"
},
{
"name": "author_email",
"value": "[email protected]"
},
{
"name": "author_name",
"value": "GreyKhan"
},
{
"name": "content",
"value": "={{$node[\"Function\"].json[\"image\"]}}"
},
{
"name": "encoding",
"value": "base64"
}
]
}
},
"name": "Write to Gitlab Repo",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
1310,
350
],
"credentials": {
"httpHeaderAuth": "asasasasas"
}
},
{
"parameters": {
"url": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQLjIytMGX1vNK3aBqWsPchs8VbLnkTaglL5A&usqp=CAU",
"responseFormat": "file",
"options": {}
},
"name": "HTTP Request",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 1,
"position": [
550,
350
]
},
{
"parameters": {
"options": {}
},
"name": "Edit Image",
"type": "n8n-nodes-base.editImage",
"typeVersion": 1,
"position": [
800,
350
]
},
{
"parameters": {
"functionCode": "return [\n {\n json: {\n image: items[0].binary.data.data\n }\n }\n]"
},
"name": "Function",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [
1050,
350
]
}
],
"connections": {
"Start": {
"main": [
[
{
"node": "HTTP Request",
"type": "main",
"index": 0
}
]
]
},
"HTTP Request": {
"main": [
[
{
"node": "Edit Image",
"type": "main",
"index": 0
}
]
]
},
"Edit Image": {
"main": [
[
{
"node": "Function",
"type": "main",
"index": 0
}
]
]
},
"Function": {
"main": [
[
{
"node": "Write to Gitlab Repo",
"type": "main",
"index": 0
}
]
]
}
}
}