2

We reach the maximum allowed files (400,000) per Google Shared Drive several times a year. When this happens our work is blocked due to impossibility to add new files to the Shared Drive.

We are looking for a solution that would allow us to see when a particular Google Drive approaches number of files limitations. It could be either a notification to the Shared Drive Managers when files are above 95% from the limitation or ability to see the current Shared Drive utilization.

Currently utilization is only available in the Admin Panel which is not convenient for us, because only IT team have access to the Admin Panel.

Any ideas how we can achieve this are helpful. If there is a way to achieve that from Google Drive API that would be also a possible solution.

Thanks for the provided advices in advance.

  • About `If there is a way to achieve that from Google Drive API that would be also a possible solution.`, if the number of files is retrieved using Drive API under you have 400,000 files, Drive API is used 400 times, because the metadata of 1,000 files can be retrieved by one API call. Is this included in your expected direction? – Tanaike Mar 17 '23 at 12:11

1 Answers1

1

At the moment there is no built in API method to get the number of Items saved in a Shared Drive, this is a feature request listed at: https://issuetracker.google.com/issues/201930056, it is still open so you could add your +1 there.

That post mentions the alternative to use the files: list method and count the results, I created this example using their APIs explorer, this would list the mimeType of all the items saved in the specified driveId, for example:

enter image description here

You could implement and call this API method based on a schedule or use a notification channel to get a notification when the shared drive is changed and use it as a trigger to run the files: list call.


Reference:

Bryan Monterrosa
  • 1,385
  • 1
  • 3
  • 13