Share a Google Drive file
Input
fileId requiredDrive file id, i.e. the <id> in drive.google.com/file/d/<id>/view.
role optionalAccess level to grant/update when email is given. Ignored when revoke is true.
email optionalEmail to grant, update, or revoke access for. Combine with role to grant/update; combine with revoke:true to remove access.
notify optionalWhether to email the person when granting access. Defaults to Drive's own default (checked/true). Ignored for revoke/linkSharing.
revoke optionalWhen true (with email), removes that person's access instead of granting/updating it.
linkSharing optionalSets the file's general link-sharing mode. Provide this instead of email/role/revoke.
Output
action requiredfileId requiredconfirmed requiredTrue if the site's own response confirmed the change (a permission id for grant, 204/200 for revoke, the new access level for link sharing). Also true on a no-op linkSharing call, where alreadySet reports the mode was already in force so no request was needed.
role optionalemail optionalalreadySet optionallinkSharing only, and always present there: true when the requested mode was already the file's current one, so nothing changed and Drive issued no request; false when this call actually changed it. Absent for grant and revoke.
linkSharing optional