$cat connect/gdrive.md

Connect Google Drive.

Experimental · every plan
Experimental: Google Drive support is new and still being refined. It uses Google's narrow drive.file permission, so MDflow only ever sees the files and folders you explicitly pick or that MDflow creates — never your whole Drive. That trade-off has real edges (most notably, files already sitting in a picked folder stay hidden until you open them). Read How it works below before you rely on it.

Edit the markdown that lives in your Google Drive — notes, docs, anything in a .md file — directly from the MDflow editor. Pick the folders and files you want, open one in the sidebar, and save your changes straight back to Drive. No download, no re-upload, no copy-and-paste.

Once a workspace is connected you can:

  • Pick Drive folders and markdown files with Google's own file picker, then open them in the MDflow editor.
  • Edit with live preview, then save back to Drive — the file in your Drive is updated in place.
  • Create, rename, and delete markdown files; deletes go to your Drive trash, never a hard delete.

Google Drive integration is free on every plan — no Pro required. Files are read and written live through the Drive API and are never copied into MDflow, so Google Drive stays the source of truth.

$why gdrive

Why edit Drive markdown in MDflow?

  • A real editor for your Drive notes. Google Drive has no markdown editor of its own — MDflow gives your .md files the Monaco editor with syntax highlighting, live preview, and Edit / Visual / Split / Preview views.
  • Drive stays the source of truth. Nothing is imported or mirrored. Every save writes back to the same file in Drive, so your documents live where they always have.
  • You choose what MDflow can see. The drive.file permission is per-file — MDflow can only touch the folders and files you pick, and cannot browse or search the rest of your Drive.
  • Conflict-safe by design. If the file changed in Drive since you opened it, MDflow warns you and never overwrites silently.
  • Free on every plan. Like the GitHub integration, editing Drive markdown needs no Pro subscription.
$prerequisites

Before you start

FieldWhat to enter
An MDflow accountAny plan — the Drive integration is not Pro-gated. Sign in or sign up.
A Google accountThe Google account whose Drive holds the markdown files you want to edit. Shared drives and files shared with you are supported.
A workspaceYou connect Google Drive per workspace, so open the workspace you want your Drive files to appear in first.
$connect gdrive

Connect your account

Connecting is a one-time, browser-based sign-in — there is no token to create or paste.

1

Open Google Drive in the source rail

In the sidebar, click the Google Drive icon in the source rail — the strip of icons down the left of the sidebar that switches between your workspace, GitHub, and Drive. The Drive panel opens with a Connect Google Drive button.

MDflow — Google Drive panel
Google Drive

Connect Google Drive, then pick folders and markdown files to manage them from this workspace.

Experimental feature

Connect Google Drive
Illustration — the Drive panel before connecting.
2

Authorize MDflow on Google

MDflow sends you to Google. Sign in if you are not already, then grant access. Google's consent screen shows a per-file Drive permission — leave it checked, or the connection stores no usable Drive access. See the note below on exactly what that grants.

3

Pick folders and files

Back in your workspace, use Add folder and Open fileto choose exactly what MDflow can see. Google's own picker opens; anything you select is added to the Drive panel. Turn on Show files shared with me to include shared drives and files others shared with you.

MDflow — Google Drive
+ Add folderOpen file
Notes/
roadmap.md
standup.md
Illustration — the Drive panel: Add folder, Open file, and your picked markdown files.
Scope & security: MDflow requests Google's drive.file scope — the narrowest Drive scope Google offers, which grants access only to the files you pick and the files MDflow creates, never your whole Drive. The long-lived access and refresh tokens are encrypted at reston MDflow's server and never sent to your browser. The one exception is a short-lived picker token, which Google's file picker requires to run in the browser. Disconnecting deletes the connection; you can fully revoke MDflow from your Google Account settings.
$edit + save

Open, edit, and save

1

Open a picked file

Expand a picked folder or open a picked file in the Drive panel. Only markdown files (.md and .markdown) up to 500 KB are shown — native Google Docs are not listed. Click a file to open it in the editor with the usual Edit, Split, and Preview views.

2

Edit with live preview

Edit the file just like any MDflow document. The header shows the file's Drive name, and the same Monaco editor and preview you use everywhere else apply here.

3

Save back to Drive

Pressing Save (or ⌘S / Ctrl+S) writes the change straight back to the same file in Google Drive. There is no separate export step — the Drive file is updated in place.

mdflow.cz — roadmap.md · Google Drive
# Roadmap — your edited markdown…
Saved to DriveSave
Illustration — saving writes back to the Drive file.
If the file changed in Drive: When the file is edited elsewhere after you opened it, MDflow detects the mismatch on save and warns you instead of overwriting. Reload the latest version from Drive, then reapply your edit. Your work is only ever replaced on your explicit choice.
$new · rename · delete

Create, rename, and delete files

  • New document — create a new markdown file inside a picked folder; MDflow uploads it to Drive and opens it for editing.
  • Rename — rename a file or folder in place; the change is applied to the item in Drive.
  • Delete — deleting moves the file to your Drive trash after a confirmation. Nothing is ever hard-deleted, so you can restore it from Drive.

Everything happens on the real file in Drive, so your changes show up in Drive's own version history exactly as if you had made them there.

$how it works

How it works, and what to expect

  • A live proxy, not an import. MDflow reads and writes your files through the Google Drive API on demand. Drive files never enter your MDflow workspace.
  • Per-file access is the whole model. Picking a folder lets MDflow see that folder and any markdown file MDflow creates in it — but not the files that were already there. To edit an existing Drive file, add it with Open file, which grants access to that one file.
  • Markdown files only. Only .md / .markdown files up to 500 KB are editable. Native Google Docs have no markdown source to write back to, so they are not listed.
  • Drive features come from Drive. Because Drive files are not MDflow documents, MDflow's workspace search, version history, sharing, and comments do not apply to them — their history is Drive's own.
Experimental — known edges: This is an early feature. The drive.file model means a connected folder shows only files MDflow created, not pre-existing ones (use Open filefor those), and disconnecting clears the folders and files you picked. Google access tokens also expire about once an hour; MDflow refreshes them automatically, but if a session can't refresh you'll be prompted to reconnect.
$disconnect gdrive

Disconnect

In the Drive panel, open the connection menu and choose Disconnect. MDflow removes the connection and clears the folders and files you picked in that workspace; nothing in Google Drive is deleted. To fully revoke MDflow's access, use Google Account → Data & privacy → Third-party access.

$man troubleshooting

Troubleshooting

Google Drive connection troubleshooting: symptoms and fixes
SymptomCause & fix
No Drive files in a connected folderExpected under drive.file: a picked folder shows only files MDflow created, not files that were already there. Add existing files individually with Open file.
A file will not openOnly markdown files (.md, .markdown) up to 500 KB are editable. Native Google Docs and larger or other file types are not shown.
Can't find a shared file when pickingTurn on Show files shared with me in the Drive panel to include shared drives and files others shared with you.
Google Drive session expiredGoogle access tokens expire about hourly. MDflow refreshes them automatically; if it can't, click Reconnect Drive in the panel.
Connected, but every action failsThe Google authorization was revoked or expired. Disconnect and reconnect Drive from the panel.