Google Drive - Issue sharing a drive

Hello :wave:

After successfully creating a new Shared Drive with the Google Drive node, I’m trying to share it using the Share operation of the Folder resource as instructed (passing the Shared Drive ID to the node) and I’m getting a 404 File not found error. Is there another way to share the Drive ?

Here the nodes I’m using :

{
  "nodes": [
    {
      "parameters": {},
      "name": "Start",
      "type": "n8n-nodes-base.start",
      "typeVersion": 1,
      "position": [
        -80,
        300
      ]
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "resource": "drive",
        "name": "00_TEST",
        "options": {}
      },
      "name": "Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 1,
      "position": [
        150,
        300
      ],
      "credentials": {
        "googleDriveOAuth2Api": "Google Creds"
      }
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "resource": "folder",
        "operation": "share",
        "fileId": "={{$json[\"id\"]}}",
        "permissionsUi": {
          "permissionsValues": {
            "role": "writer",
            "type": "group",
            "emailAddress": "[email protected]"
          }
        },
        "options": {}
      },
      "name": "Google Drive1",
      "type": "n8n-nodes-base.googleDrive",
      "typeVersion": 1,
      "position": [
        350,
        300
      ],
      "credentials": {
        "googleDriveOAuth2Api": "Google Creds"
      }
    }
  ],
  "connections": {
    "Start": {
      "main": [
        [
          {
            "node": "Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive": {
      "main": [
        [
          {
            "node": "Google Drive1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Thanks !

Hi @Vincent_Carignan, the sharing feature isn’t currently implemented for the Drive of the Google Drive node I am afraid :frowning:

So in order to implement this right now you would need to research the required API and perform the required requests for example using the HTTP Requests node.

In addition, I have converted this question into a feature request so other users can vote on it and we can consider implementing this functionality going forward.

We use the same endpoint for files and folders. According to the docs, it should work with drives as well (or at least with shared ones).

Sadly do not have an account that allows me to create share drives for testing.

Try with Supports All Drives set to true.

2 Likes

hey @RicardoE105, thank you so much :pray: that’s indeed the option that was needed to work properly !

cc. @MutedJam not sure if the request is still valid in that case :sweat:

1 Like

Awesome, thanks @RicardoE105 and glad to hear it’s working @Vincent_Carignan!

Seeing its working I think it’s still fine to leave this request here for now - it sure is helpful for others!