Integrating Google Drive permissions with Zapier automation

I’m trying to set up a Zapier workflow that automatically grants write access to one or more users when a new shared folder is created in Google Drive. Zapier doesn’t have a built-in action for this, so I’m using the Drive API V3 instead.

I’m sending a POST request to the permissions endpoint with this JSON:

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

But I’m getting a 404 error saying the folder ID can’t be found. I’m pretty sure I’m using the correct folder ID variable from Zapier.

Two questions:

  1. How can I fix this error and make it work?
  2. If I want to add multiple users, do I need to change the JSON structure?

Any help would be awesome! I’m new to working with APIs in Zapier and could use some guidance.

I’ve tackled a similar challenge with Google Drive permissions in Zapier before. The 404 error you’re encountering could be due to a timing issue. Sometimes, the newly created folder isn’t immediately available for the API to access. Try adding a delay step of about 30 seconds before your API call to see if that resolves the problem.

As for adding multiple users, you’re on the right track with your JSON structure, but you’ll need to make separate API calls for each user. Consider using Zapier’s ‘Looping by Zapier’ action to iterate through a list of email addresses.

One more thing to keep in mind: make sure you’ve enabled the Google Drive API in your Google Cloud Console. It’s easy to overlook this step, but it’s crucial for the integration to work properly. Good luck with your automation!

Regarding your 404 error, it’s crucial to ensure the folder ID is correct and that the Google Drive API is properly authenticated in Zapier. Double-check your Zapier setup and make sure you’re using the correct variable for the folder ID.

For adding multiple users, you’ll need to send separate API requests for each user. The JSON structure you provided is correct for a single user, but you’ll have to iterate through your list of users and make individual calls for each email address.

Consider using Zapier’s ‘Path’ feature to handle different scenarios, like adding single vs. multiple users. This can help streamline your workflow and make it more robust.

hey surfingwave, sounds like a tricky one! have u double-checked the folder ID ur using? sometimes zapier variables can be funky. for multiple users, u might need to send separate requests for each email. also, make sure ur google drive API is properly connected in zapier. good luck mate!