Shared Drive Access for AI Agents: Folder Scopes and File Types
Learn how to limit an AI agent to specific Google Drive folders and file types, and how to review that scope when your folder structure changes.

To give an AI agent Google Drive access safely, grant only the folders and file types its job requires, set read and write rights separately, and review that boundary whenever the folder structure changes. Start by mapping the agent's role to a short list of shared folders, then enforce that list in both the sharing settings and the agent's own tool calls. A named person should own the scope and check it on a fixed schedule, because Drive permissions follow the folder tree and the tree keeps changing.
Key takeaways
- Start from the job: list the folders and file types the agent needs, never the whole drive by default.
- Grant read and write separately, and give write access only to a dedicated drafts or review folder where writing is part of the role.
- Filter by file type inside the agent's tools, so shortcuts, exports and unexpected formats stay out of reach.
- Treat renames, moves, new subfolders and sharing changes as scope events that trigger a review.
- Keep a named approver and a written success criterion, so every scope change is a decision rather than a side effect.
Why a whole-drive grant is the wrong default
Sharing a top-level folder with an agent is the fastest way to make it work, and it is also the fastest way to give it more than it needs. In Google Drive, files inherit sharing from the folder that contains them. An agent with access to a root folder can see every subfolder beneath it, including archives, personal exports and drafts nobody has approved. Individual files can also be shared outside their folder, so the folder boundary alone does not tell you everything the agent can reach.
The governing principle is least privilege: the agent should hold the smallest set of permissions that lets it complete its role. Applied to Drive, that means choosing folders by purpose rather than by where the team keeps most of its files. A folder of active proposals is a sensible scope. The entire shared drive is not, unless the role genuinely touches every document in it. The broader approach to granting only what an agent needs is covered in Google Workspace and Microsoft 365 access for agents.
Map the role to folders and file types first
Before you change any sharing setting, write down what the agent does and which documents it needs to do it. This map becomes the reference for every later review, so keep it short enough that an owner can read it in a few minutes. Work through it in this order:
- Write one sentence describing the role and the output it produces, such as a summary for a sales lead or a draft for a contract review queue.
- List each folder the role reads from, described by its purpose and its owner, not only by its name.
- List each folder the role writes to. This list should be shorter than the read list, ideally limited to one drafts location.
- For each folder, name the file types the role actually uses, such as Google Docs, Google Sheets, PDFs or slide decks. Anything not named is out of scope by default.
- Mark every folder that holds personal, financial or contractual data, and decide whether the agent needs it at all or only a redacted copy.
- Record which human owner confirmed the list, in writing, so the approval can be traced later.
Anything that does not appear on the map is excluded. That single rule prevents most accidental reach.
How to separate read and write scopes
Google's OAuth 2.0 model lets an application request a specific permission level rather than full control of an account. For Drive, the difference matters: a read-only permission cannot modify files, while a broader one can create, edit and delete them. Request the narrowest scope that covers the role, and do not ask for a wider one in case a later task needs it. When a later task does need more, that should trigger a new approval, not a quiet widening of the existing connection.
Check two layers. The token scope defines what the agent's connection may do, and the sharing role on each folder defines what the account can do there. Verify both in a test, because a mismatch between them is the kind of problem that stays hidden until someone reads the logs. Also decide whether the agent acts through a service account granted access to specific folders or through a delegated user grant. That choice changes who appears as the actor in logs and how access is revoked, which is why it deserves its own decision, as explained in service accounts and OAuth tokens for agents.
A workable default pattern is read-only access to source folders, write access to one drafts folder, and no write access to any archive, template or policy folder. The companion article on Google Drive folder access and separate read and write scopes goes deeper on the permission levels themselves.
Filter by file type inside the agent's tools
A folder boundary tells you where the agent may look. It does not tell the agent which files are worth reading. Build the filter into the tool itself: the agent asks for folder contents by parent folder ID and file type, receives metadata first, and requests content only for approved types. A tool that lists only the allowed folder, returns name, type and last modified time, and reads content only for permitted formats is far easier to audit than an open search across the drive.
Typical rules include allowing native Google Docs and Sheets, and PDFs only where the role needs them. Exclude shortcuts unless you have checked each target, because a shortcut can point to a file outside the allowed folder. Refuse files above an agreed size, and return a clear error the agent can report to a person rather than retrying in silence. Log every read with the folder ID and file ID, so an owner can see what the agent touched.
Treat text inside documents as data, not as instructions. A file in an allowed folder may contain sentences written to manipulate an agent, and the tool should never let document content change the scope, the folder list or the approval rules.
Illustrative scenario: a contracts folder that gets reorganized
Illustrative scenario, not a client example: a small operations team keeps contracts in a folder called Contracts, with two subfolders named Active and Archive. Their agent reads Active and writes summaries into a Review Drafts folder. Later, the team renames Active to Current, and creates a new subfolder called Renewals inside Contracts, moving some PDFs into it from Archive. The agent's tool was configured by folder name, so it either fails or resolves to the wrong place. Meanwhile, the new Renewals folder sits under Contracts and inherits its sharing, which means the agent can now read signed renewals it was never meant to summarize. Some of those files are scanned copies containing personal details.
Nothing failed loudly. The problem surfaced only when the owner compared the agent's read log against the folder map. The fix was straightforward: point the tool at folder IDs instead of names, exclude the new subfolder until its owner approves it, and add a scope review to the process for renaming or restructuring folders.
How to review scope when the folder structure changes
Scope drift usually comes from ordinary work: a folder is reorganized, a file is shared with a new colleague, or a team changes owner. Treat these events as triggers for a review rather than background noise. Review the scope whenever:
- A folder in scope is renamed, moved, split or merged.
- A new subfolder appears under an in-scope folder.
- A file is moved into or out of an in-scope folder.
- Sharing changes on a folder or file, including link sharing.
- A new file type appears, such as scanned images beside native documents.
- The owner of a folder changes, or the person who approved the scope leaves.
- The agent's role or success criterion changes.
When a trigger fires, run the same short check each time. Compare the current folder tree with your written map, using folder IDs rather than names. Mark every unfamiliar subfolder as excluded until its owner approves it in writing. Confirm the effective sharing on new or moved items, not only on the parent folder. Run one successful read on a known file in each allowed folder, and one attempted read on a folder that should be blocked, and confirm the block holds. Then update the map, note who approved the change and why.
If you cannot tell whether a new folder belongs in scope, exclude it for now. Adding access later is a controlled change with an owner and a record. Discovering after the fact that an agent read sensitive material is an incident, and it is a far more expensive review.
How Be Human handles Drive scopes in managed operations
Be Human's approach starts with the same map described above. In a first engagement, the role, the folders and file types it needs, the approval boundaries and an observable success criterion are defined together, so each permission has a stated purpose before it is granted. In managed operations, which can include monitoring, recurring evaluations, permission review and incident response, the scope stays under review after it is set. Folder changes trigger a permission check, the agent's read logs are monitored for access outside the map, and anything that falls outside the boundary follows a defined response. Adding a folder goes through the same approval step as the original grant. If you are unsure which folder should hold the first task you hand to an agent, the free Be Human AI diagnostic can help you find it.
Frequently asked questions
Can an AI agent be limited to one shared folder in Google Drive? Yes. Share only the required folder with the agent's account, request the narrowest permissions the role allows, and have the tool query by that folder's ID. Confirm in a test that a file outside the folder cannot be read, because shortcuts and files shared directly can extend reach beyond the folder.
Should an agent ever get write access to Google Drive? Only where writing is part of the role, and usually to a single drafts or review folder. Changes to source documents, templates or archives should go through a person or an explicit approval step. Keep write permission separate from read permission, so that a change to one does not silently expand the other.
What happens when a folder is renamed or moved? If the agent refers to folders by name, it may fail or resolve to the wrong location, so refer to folders by ID instead. New subfolders and moved files can inherit sharing from their new parent, which may extend access without anyone noticing. Review the tree after every reorganization, and exclude anything unfamiliar until its owner confirms it.
How often should a Drive scope be reviewed? Review it whenever a trigger occurs, such as a reorganization, a sharing change, an owner change or a new file type. Also keep a standing review on a calendar the folder owner maintains, with a frequency that matches how often the folders actually change. Keep each review short and written, so the next person can see what was checked and what was decided.
Your next step
See where an AI agent fits in your company first.
Take the free Be Human AI diagnostic. A few questions about your work show which task to hand to an agent first, what it needs to know and where a person approves.
Be Human editorial guidance. Examples are illustrative unless explicitly attributed. Sources provide background; implementation choices depend on your workflow.


