02 Google Drive
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.
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.filegrants 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.
- 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; the Drive section has its own separate search),
- version history (see 06 Version History),
- sharing and comments,
- favorites,
- offline drafts.
Security
- Connecting uses Google's OAuth sign-in with the low-privilege
drive.filescope. - 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 |