Hi,
I was trying to move a file from one Nextcloud location to another (different folder), but whenever I try to do that, I get the below error:
ERROR: NextCloud Error. Status Code: 404. Message: 404 - “<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<d:error xmlns:d=“DAV:” xmlns:s=“http://sabredav.org/ns”>\n <s:exception>Sabre\DAV\Exception\NotFound</s:exception>\n <s:message>File with name /Invoices/Sample.xlsx could not be located</s:message>\n</d:error>\n”
Here’s a sample workflow:
{
"nodes": [
{
"parameters": {},
"name": "Start",
"type": "n8n-nodes-base.start",
"typeVersion": 1,
"position": [
250,
300
]
},
{
"parameters": {
"operation": "download",
"path": "Invoices/Sample.xlsx"
},
"name": "Nextcloud",
"type": "n8n-nodes-base.nextCloud",
"typeVersion": 1,
"position": [
450,
300
],
"credentials": {
"nextCloudApi": "SD Cloud"
}
},
{
"parameters": {
"options": {
"rawData": true,
"readAsString": false
}
},
"name": "Spreadsheet File",
"type": "n8n-nodes-base.spreadsheetFile",
"typeVersion": 1,
"position": [
650,
300
]
},
{
"parameters": {
"functionCode": "const newItems = []\n\nfor(let item of items) {\n item.json.activated_date = new Date(Math.round((item.json.activated_date - 25569)*86400*1000));\n item.json.expiry_date = new Date(Math.round((item.json.expiry_date - 25569)*86400*1000));\n item.json.file_name = `Sample${(new Date()).toISOString()}.xlsx`;\n newItems.push(item);\n}\nreturn newItems;"
},
"name": "Function",
"type": "n8n-nodes-base.function",
"typeVersion": 1,
"position": [
850,
300
]
},
{
"parameters": {
"operation": "move",
"path": "/Invoices/Sample.xlsx",
"toPath": "=Processed/{{$node[\"Function\"].json[\"file_name\"]}}"
},
"name": "Nextcloud1",
"type": "n8n-nodes-base.nextCloud",
"typeVersion": 1,
"position": [
1050,
300
],
"credentials": {
"nextCloudApi": "SD Cloud"
}
}
],
"connections": {
"Start": {
"main": [
[
{
"node": "Nextcloud",
"type": "main",
"index": 0
}
]
]
},
"Nextcloud": {
"main": [
[
{
"node": "Spreadsheet File",
"type": "main",
"index": 0
}
]
]
},
"Spreadsheet File": {
"main": [
[
{
"node": "Function",
"type": "main",
"index": 0
}
]
]
},
"Function": {
"main": [
[
{
"node": "Nextcloud1",
"type": "main",
"index": 0
}
]
]
}
}
}
Note that the same error occurs when I try to delete a file as well.
Thanks,
Santhosh