Integrating Drive API with Zapier for Folder Permissions

I’m working on a Zapier automation to grant write access to users for newly created shared folders in Drive. Zapier doesn’t have this feature built-in, so I’m using the Drive API V3.

I’m sending JSON to the API endpoint for permissions, but I’m getting a 404 error. Here’s what I’ve tried:

{
  "permission": "editor",
  "userType": "individual",
  "userEmail": "[email protected]",
  "enableSharedDrives": true
}

The API responds with a ‘File not found’ error. I’m not sure if I’m formatting the JSON correctly or if there’s an issue with how I’m referencing the folder ID.

Also, how would I modify this to add multiple users? Any help would be appreciated!

hey sophia63, i’ve dealt with this before. make sure ur using the right folder id in the api request url. also, try this json instead:

{
  "role": "writer",
  "type": "user",
  "emailAddress": "[email protected]"
}

use post not put. for multiple users, gotta do separate requests for each. good luck!

I’ve worked with the Drive API in Zapier before, and there are a few things to watch out for. First, make sure you’re using the correct folder ID in your API request URL. The 404 error usually means it can’t find the folder you’re trying to modify.

For the JSON body, I’ve had success with this format:

{
  "role": "writer",
  "type": "user",
  "emailAddress": "[email protected]",
  "supportsAllDrives": true
}

The ‘supportsAllDrives’ parameter is crucial if you’re working with shared drives. Also, double-check that you’re using a POST request, not PUT.

For multiple users, unfortunately, you’ll need to send separate requests for each one. The API doesn’t support bulk updates for permissions. You could create a loop in Zapier to iterate through a list of email addresses if needed.

If you’re still having trouble, try testing your API calls using a tool like Postman first. It can help isolate whether the issue is with the API itself or how Zapier is handling the requests.

I’ve encountered similar issues when working with the Drive API through Zapier. The 404 error you’re getting might be due to how you’re referencing the folder ID. Make sure you’re using the correct folder ID and that it’s properly included in your API request URL.

For the JSON body, try adding the ‘role’ field instead of ‘permission’:

{
  "role": "writer",
  "type": "user",
  "emailAddress": "[email protected]"
}

Also, ensure you’re using a POST request, not PUT. For multiple users, you’ll need to send separate requests for each one, as the API doesn’t support bulk permission updates in a single call.

Lastly, double-check your OAuth scopes to ensure you have the necessary permissions to modify folder access. If you’re still stuck, consider using a tool like Postman to test your API calls directly before implementing them in Zapier.