#3036·context7

[Docs]: Missing text/markdown import support in Google Drive API static docs

Author: MattBetancourtCreated Aug 14, 2026Updated Aug 20, 2026

[Docs]: Missing text/markdown import support in Google Drive API static docs

Documentation Location

Issue Category

Library-specific docs / API documentation

Description of the Gap

There is an asymmetry in the upstream Google Drive API documentation regarding Markdown support:

  • The ref-export-formats page explicitly documents text/markdown for Google Docs exports.
  • The manage-uploads page, however, delegates import conversion formats to the dynamic about.get(fields="importFormats") endpoint and does not explicitly list text/markdown in the static text.

Because Context7 indexes the static documentation, queries to Context7 regarding supported import MIME types do not return text/markdown as a supported conversion type for Google Docs (application/vnd.google-apps.document). This leads developers (and AI agents) to incorrectly assume that Markdown imports are not natively supported, even though they are.

Suggested Fix / Enhancement

To enrich the /websites/developers_google_workspace_drive index, we propose:

  1. Hardcoding/injecting a known mapping of importFormats (specifically text/markdown -> application/vnd.google-apps.document) into the indexed documentation for Google Drive uploads.
  2. Adding explicit annotations to the indexed manage-uploads page to highlight that Markdown (text/markdown) is a supported source format when converting to Google Docs.
  3. Potentially querying the about.get(fields="importFormats") endpoint during the indexing phase to capture all dynamically supported formats and appending them to the static documentation index.

Reproducible Evidence / Payload

Live testing against the Google Drive API v3 confirms that uploading files with text/markdown content and specifying conversion to application/vnd.google-apps.document works seamlessly.

Here is a sample curl payload demonstrating live support:

# Upload a markdown file and convert it to a native Google Doc
curl -X POST -L \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
    -F "metadata={ \
          'name': 'My Markdown Document', \
          'mimeType': 'application/vnd.google-apps.document' \
        };type=application/json;charset=UTF-8" \
    -F "[email protected];type=text/markdown" \
    "https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart"
# Sample using the Python Google API Client
from googleapiclient.http import MediaFileUpload

file_metadata = {
    'name': 'My Markdown Document',
    'mimeType': 'application/vnd.google-apps.document'
}
media = MediaFileUpload('document.md', mimetype='text/markdown', resumable=True)
file = drive_service.files().create(body=file_metadata, media_body=media, fields='id').execute()
print(f"File ID: {file.get('id')}")