Page Summary
-
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.
programmatically access information about Google Drive activity.
The Google Drive Activity service lets you use the Google Drive Activity API in Google Apps Script. This API lets users retrieve information about their Google Drive activity.
This is an advanced service that must be enabled before use.
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 following sample code 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.