---
title: "02 Google Drive"
canonical_url: https://mdflow.cz/share/c/h0L7MvX5Cy5sST3qPnApqHOmrQ36JTVy169qJMtDMya9Kc30zm04cg9OuPSSPwvj/60305bc2-761b-4896-837f-80022655df9f
md_url: https://mdflow.cz/share/c/h0L7MvX5Cy5sST3qPnApqHOmrQ36JTVy169qJMtDMya9Kc30zm04cg9OuPSSPwvj/60305bc2-761b-4896-837f-80022655df9f.md
visibility: public
---

# Google Drive

Connect a Google Drive account to a workspace and manage the markdown files that live in your Drive directly from MDflow, saving changes straight back to Drive.

**Google Drive integration is available on every plan.**

## The mental model

Same as GitHub: **Drive files are not MDflow documents.** They are read and written **live through the Google Drive API** and are never copied into your workspace. Drive remains the single source of truth. See [01 GitHub](/doc/62a51527-90fe-45db-b5bb-1f25afa74d89).

## Connecting — and why the permissions are narrow

Connect from the dedicated **Google Drive** section in the sidebar, per workspace, and disconnect again at any time.

MDflow uses Google's least-privilege **`drive.file`** scope. This is worth understanding, because it is unusually restrained:

> `drive.file` grants access **only** to files you explicitly pick, or that MDflow creates. **Not your whole Drive.**

So you choose exactly what MDflow can touch:

- **Add a Drive folder**, or
- **Open individual markdown files**,

through **Google's own file picker**. MDflow only ever sees what you picked and what it created. It cannot enumerate your Drive, and it cannot read the files you did not choose.

## Browsing and editing

- **Browse** a connected folder's markdown files and subfolders from the sidebar. Folders **load on demand** as you expand them.
- **Open** any markdown file in the **same editor** used for MDflow documents, with Edit, Split and Preview. See [01 The Editor](/doc/3e67a2af-7882-4ac3-8530-993fe21bf253).
- **Save** writes the change back to Drive.
- **Create** markdown files and subfolders, and **rename or delete** items, straight from the sidebar.
- **Search** markdown across everything MDflow can access in your Drive, from a search box in the section.

Returning to the Google Drive section **reopens the last file you had open** in that workspace.

## Deletions go to Trash

Deleting an item from MDflow **moves it to Google Drive's Trash** rather than destroying it. Nothing is lost by accident, and you can recover it from Drive.

This is a notable contrast with MDflow's own documents, where deletion is immediate and permanent. Here, Drive's semantics win — as they should, since it is Drive's file.

## Conflicts

If a file changed on Google Drive since you opened it, MDflow **shows a conflict notice and never overwrites silently**. You decide whether to reload the latest version from Drive.

## What Drive files do not get

Because they are not MDflow documents, Drive files sit **outside**:

- workspace search (see [04 Search](/doc/43588057-54ed-4d26-84b2-d1a625c5e7ff); the Drive section has its own separate search),
- version history (see [06 Version History](/doc/9c6737c5-cb49-4eb8-83c8-d9a72e36fa3c)),
- sharing and comments,
- favorites,
- offline drafts.

## Security

- Connecting uses **Google's OAuth sign-in** with the low-privilege `drive.file` scope.
- Credentials are **encrypted at rest**, **stay on the server**, and are **revoked when you disconnect**.

## GitHub or Google Drive?

They work the same way and can both be connected to the same workspace. Choose by where the file already lives:

| | GitHub | Google Drive |
| --- | --- | --- |
| Best for | Repository markdown — READMEs, docs folders | Documents shared with colleagues in Drive |
| Writes are | Git commits, attributed to you | Ordinary Drive file saves |
| History | The repo's git history | Drive's own version history |
| Deletes | A commit removing the file | Moved to Drive Trash |
| Access granted | Repositories your account can reach | Only files you explicitly pick |
| Search in MDflow | No | Yes, within the section |
