‘File Not Found’ When Deleting in Shared Drives (But the File Exists)
Hi Community! 👋
If you’re trying to delete a file in a Google Shared Drive using Zenphi and you're seeing this error:
File not found: [ID]. HttpStatusCode is NotFound.
…even though the file is clearly still there, here’s why it happens.
🔍 Why This Happens
Google Shared Drives support several roles (Viewer, Commenter, Contributor, Content Manager, Manager, etc.).
However, only one role can successfully delete files using the Google Drive API:
👉 You must be a Manager.
You might assume that a Content Manager should also be able to delete files.
But no: Content Manager is not sufficient.
Google will block the deletion, and instead of giving a clear permission error, the API responds with “File Not Found.”
So the file exists, you can see it, and you can open it — but the API won’t allow a delete unless the connected account is a Manager.
🛠️ How to Fix It
✅ Option 1: Use a Manager-Level Connection (Recommended)
Make sure the connection in Zenphi belongs to a user or Service Account that has the Manager role in that Shared Drive.
✅ Option 2: Ask for a Role Update
If you’re using your own account for the flow, request that your role in that Shared Drive be upgraded to Manager.
If you’ve run into similar “file exists but API says it doesn’t” situations, feel free to share your experience below! 👇