App Logo
drive.google.com

Share a Google Drive file

Grant, update, or revoke a specific email's access to a Drive file (with a viewer/commenter/editor role), or toggle the file's general link-sharing mode between restricted and anyone-with-the-link.

Input

fileId required

Drive file id, i.e. the <id> in drive.google.com/file/d/<id>/view.

role optional

Access level to grant/update when email is given. Ignored when revoke is true.

email optional

Email to grant, update, or revoke access for. Combine with role to grant/update; combine with revoke:true to remove access.

notify optional

Whether to email the person when granting access. Defaults to Drive's own default (checked/true). Ignored for revoke/linkSharing.

revoke optional

When true (with email), removes that person's access instead of granting/updating it.

linkSharing optional

Sets the file's general link-sharing mode. Provide this instead of email/role/revoke.

Output

action required
fileId required
confirmed required

True 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 optional
email optional
alreadySet optional

linkSharing 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

FAQ

Grant, update, or revoke a specific email's access to a Drive file (with a viewer/commenter/editor role), or toggle the file's general link-sharing mode between restricted and anyone-with-the-link.
Required: fileId. Optional: role, email, notify, revoke, linkSharing.
It returns role, email, action, fileId, confirmed, alreadySet, linkSharing.
Yes. It acts as you on drive.google.com: on your own Chrome it reuses your session, and on a Reduck-hosted browser it loads the drive.google.com cookies saved by the Reduck extension.
It makes changes on drive.google.com, like sending, posting or booking something.
Ask an AI agent connected to Reduck to run reduck/drive.google.com/share_file, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/drive.google.com/share_file
It is part of Reduck's official curated catalogue.

Start building not clicking