AI-generated Key Takeaways
-
The Google Drive Activity service in Apps Script provides programmatic access to retrieve Google Drive activity information using the Google Drive Activity API.
-
This is an advanced service that needs to be enabled before it can be used.
-
Detailed information and reference documentation for the service are available, mirroring the public API's objects, methods, and parameters.
-
A sample code is provided to demonstrate how to list recent Google Drive activity, including details about the time, actor, action, and target of each activity.
The Google Drive Activity service allows you to use the Google Drive Activity API in Apps Script. This API allows users programmatic access to retrieve information about their Google Drive activity.
Reference
For detailed information on this service, see the reference documentation for the Google Drive Activity API. Like all advanced services in Apps Script, the Google Drive Activity service uses the same objects, methods, and parameters as the public API. For more information, see How method signatures are determined.
To report issues and find other support, see the Google Drive Activity support guide.
Sample code
The sample code below uses version 2 of the API.
Get activity in Google Drive
This sample gets recent activity in a user's Google Drive and logs information about the time, actor, action, and target of each activity.