@vitalymp You can simply create a new user with some bot name and then make a POST call to your nextcloud instance using that users basic auth credentials after recieving data with a webhook. Something like this:
{
"nodes": [
{
"parameters": {
"method": "POST",
"url": "https://cloud.tld.com/ocs/v2.php/apps/spreed/api/v4/chat/CHAT-ID",
"authentication": "genericCredentialType",
"genericAuthType": "httpBasicAuth",
"sendQuery": true,
"queryParameters": {
"parameters": [
{
"name": "message",
"value": "=Message content"
}
]
},
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "OCS-APIRequest",
"value": "true"
},
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Accept",
"value": "application/json"
}
]
},
"options": {}
},
"id": "3efc34ee-e77a-477f-9cbd-9e039f64e143",
"name": "Post Message to NC Talk room",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1872,
160
],
"credentials": {
"nextCloudApi": {
"id": "RQ8xpIKWFMblRfYZ",
"name": "cloud.tld.com – bot"
},
"httpHeaderAuth": {
"id": "v09VrkQtu9eIAUEl",
"name": "Header Auth account"
},
"httpBasicAuth": {
"id": "6ASiFBk1BEcktXcq",
"name": "cloud.tld.com bot"
}
}
},
{
"parameters": {
"path": "a907934a-19a1-4ced-b919-f1db35a4fa93",
"options": {}
},
"id": "f11e1143-0a6b-4867-abb2-f03a235e0ed0",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
1424,
160
],
"webhookId": "a907934a-19a1-4ced-b919-f1db35a4fa93"
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Post Message to NC Talk room",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "a382289a228a66b7e622210301ab5b6d8d06d93edb07378019866ea75d7e5793"
}
}