NextCloud node

I think there are some issues with the NextCloud node.

My scenario is to first check if a certain directory exists using the List action on a Folder. This is to avoid errors if I upload a file to a non-existing directory in a later step. The List action returns a json with folders, but it seems not to be part of the regular json datastructure. As such I have no idea how to search through the output.

Next issue is that after the NextCloud list operation the binary data from previous nodes is gone (like in the Read PDF node before it got fixed). Thus making it impossible to upload a file.

Sorry, I do not understand what you mean with a different data structure. It looks all fine and totally normal for me:

In this case it is correct that the binary data is gone. As you request data from NextCloud all data would get overwritten. The Read PDF node just analyzes the given data and so should keep it. If you need the binary data again after that node you can simply pipe it in again with a Merge-Node.

Let me put it differently, I don’t know how to access the result set. The usual way items[0].json.xxx didn’t work. It seems the result is not part of the items[0].json object.
From my tests it looks like the result got stored as items[0]. items[1]. Which was not what I was expecting.

I will use the Merge for the binary data. Thanks!

If the data gets displayed like in my screenshot then you should also be able to access it in the way you described. If I for example use the Function-Node at the end, it overwrites totally correctly the path of the first item.

{
  "nodes": [
    {
      "parameters": {
        "functionCode": "items[0].json.path = \"overwrite\";\nreturn items;"
      },
      "name": "Function",
      "type": "n8n-nodes-base.function",
      "typeVersion": 1,
      "position": [
        1020,
        400
      ]
    }
  ],
  "connections": {}
}

Ah think now I know what you mean. Yes it would be items[0].json.path for the first item and items[1].json.path for the second one.

1 Like

Thanks. Will play around a bit with that.