To get the date a file was last updated you can call getLastUpdated()
How to I get the user who did this last update in google apps script code?
I have tried to run the code under listing revisions at Advanced Drive Service
var revisions = Drive.Revisions.list(fileId);
but I get
ReferenceError: "Drive" is not defined.
https://developers.google.com/apps-script/guides/services/advanced
In Resouces > Advanced Google services, turn on Drive API...
In that same window > click Google Developer's Console >> enable both Drive API and Drive SDK...
then...
Drive.Files.get('<FILEDID>').lastModifyingUser
To make it clear:
First enable the drive API and SDK as described by Bryan P. Then you can use
var lastemailuser = Drive.Files.get(<FILEDID>).lastModifyingUser.emailAddress;
var lastnameuser = Drive.Files.get(<FILEDID>).lastModifyingUserName;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With