Skip to content

Share a Google Doc (and move Markdown in and out)

Get a doc in front of someone — view, comment, or edit — and pass your agent's Markdown into it cleanly, or pull the text back out as Markdown.

Time: the share itself is one click (or one sentence to your agent). Two un-delegable bits: a recipient with no Google account can only view (commenting and editing need one), and the Markdown round-trip needs a setting flipped on once. [confirmed] Last verified: 2026-06-07 · roles, link access, and the Markdown menu paths come from Google Docs Editors Help. [confirmed]

Before you begin

  • A Google account, signed in to the doc you want to share. The doc lives at docs.google.com.
  • The recipient's email — only if you're sharing with named people (the "Restricted" path). The "anyone with the link" path needs no email at all.
  • For the agent path: the gdoc / gog CLIs set up, so your agent can share and move Markdown without you touching the browser. One-time auth, ~5 min.

New to letting an agent drive? Start with Set up Claude Code, then How to ask your agent; come back once claude runs.

The default: ask your agent

In a chat with your agent, paste the doc link and say:

Share this Google Doc so anyone with the link can comment, and give me the link.

Your agent runs the share-gdoc flow — a direct Drive call that sets anyone-with-link → commenter and hands you the link back. [confirmed] Want something tighter? Swap the sentence:

  • Named people only: "Share this doc with alice@example.org as a commenter."gdoc share <doc> alice@example.org --role commenter
  • View-only link: "Anyone with the link can view."gog drive share <id> --to=anyone --role=reader
  • Open editing: "Anyone with the link can edit."gog drive share <id> --to=anyone --role=writer

The three roles, in plain terms

Every share — named or link — picks one of these. [confirmed]

  • Viewer — read and download. Can't comment, can't change anything.
  • Commenter — read, download, and leave comments/suggestions. Can't edit the text.
  • Editor — read, edit, and re-share. The widest grant; hand it out deliberately.

Comment vs edit is the one people get wrong. "Commenter" lets someone mark up your draft in the margin without altering it — right for review. "Editor" lets them rewrite it. If you wanted feedback and got edits, you granted Editor by mistake.

Two ways to choose who gets in

In the doc, click Share (top-right). The dialog has two halves: [confirmed]

  1. Named people (top box) — type an email, pick a role, send. Default is Restricted: only the people you list can open it. Each gets an email with the link.
  2. General access (the dropdown below) — switch from Restricted to Anyone with the link, then pick the role. Now the link itself is the key — no Google account needed to view. (Commenting or editing via the link still needs the recipient signed in to a Google account.) [confirmed]

Click Copy link and send it wherever your recipient is.

To stop or change sharing

  • Remove one person: Share → click their name → Remove access. They're out at once.
  • Kill the public link: Share → General access → set back to Restricted. The old link now shows "you need access" to everyone you didn't name. [confirmed]
  • Downgrade a role: Share → click the person (or "Anyone with the link") → pick a lower role.

The Markdown round-trip

By default, pasting an agent's Markdown into Docs dumps it as one literal block (# Heading stays as text). Flip one setting and it converts cleanly both ways.

Turn it on once: Tools → Preferences → Enable Markdown (tick the box). [confirmed]

Then:

  • Markdown in: right-click in the doc → Paste from Markdown. Headings, lists, bold, and links become real Docs formatting. [confirmed]
  • Markdown out: select text → right-click → Copy as Markdown, or File → Download → Markdown (.md) for the whole doc. [confirmed]

Letting your agent do the round-trip

Your agent skips the menus entirely and moves Markdown by command:

  • New doc straight from a Markdown file: "Make a Google Doc from this Markdown file."gdoc new "Title" --file draft.md
  • Push a local file's content into an existing doc: gdoc push draft.md (file carries the doc ID) or gdoc write <doc> draft.md (replaces the doc's contents). [confirmed]
  • Pull the doc back down as Markdown: "Download this doc as Markdown."gdoc pull <doc> out.md, or gdoc cat <doc> to read it straight to the terminal. [confirmed]

This is the cleanest path: the agent's Markdown lands formatted, and you never touch the Preferences toggle.

If it doesn't work

  • Recipient sees "You need access" / "Request access" → the doc is still Restricted and they're not on the list. Either add their email, or switch General access to Anyone with the link. If they request access, you get an email with their name and a one-click approve. [confirmed]
  • They opened the link but can't comment or edit → "Anyone with the link" lets anyone view without an account, but commenting and editing need them signed in to a Google account, and the link's role must be Commenter/Editor (not Viewer). [confirmed]
  • Markdown pasted as one literal block (# Heading shows as text) → Enable Markdown isn't on (Tools → Preferences), or you used plain Paste — use right-click → Paste from Markdown. [confirmed]
  • They can edit when you only wanted feedback → you granted Editor. Change their role to Commenter (Share → their name → Commenter). [confirmed]
  • "Anyone with the link" is greyed out → a work/school (Google Workspace) admin has restricted external sharing; you may only be able to share inside your org's domain. [unclear — Workspace admin policy varies by org; not stated in the consumer help docs, checked 2026-06-07]
  • Agent says it can't downgrade to commenter → if a parent Drive folder is already shared more broadly (e.g. anyone-can-edit), a narrower per-doc role can't override it. Loosen or move the folder. [confirmed]

Prefer to do it all by hand?

  1. Open the doc → Share (top-right).
  2. Named people: type emails in the top box, set the role, Send. Or link: under General access, switch to Anyone with the link and set the role.
  3. Copy link → paste it to your recipient.
  4. Markdown: Tools → Preferences → Enable Markdown, then right-click Paste from Markdown / Copy as Markdown, or File → Download → Markdown (.md). To import a .md file, upload it to Drive and Open with → Google Docs. [confirmed]

Watch / read

Best written walkthrough: Google's own Share files from Google Drive — the authoritative roles, Restricted vs Anyone-with-link, and stop-sharing steps, kept current. Pair it with Use Markdown in Google Docs for the round-trip. [confirmed]

Short videos (all under ~3 min; YouTube transcripts couldn't be verified from this machine this session, so titles/channels are the signal):

Other ways to share

  • They'll build on it as files or code, not just read prose? → a GitHub repository hands over the whole thing with every version tracked.
  • Just showing a finished, interactive thing they click and use? → a Claude Artifact or a deployed website — opens in any browser, no account, nothing to run.

Sources