airbytehq / airbytehq/airbyte

[source-google-drive] Add option to export Google Docs as Markdown instead of DOCX

Open
#75,520 2 comments 0 reactions 0 assignees View on GitHub
area/connectors autoteam connectors/source/google-drive needs-triage team/extensibility type/enhancement
Dominant language
Python
Stars
22.1k
Forks
5.3k
PR merge metrics
PR metrics pending

Description

## Feature Request

### Describe the feature request

The Source Google Drive connector currently exports native Google Docs as DOCX files via the Google Drive API. For users building AI data pipelines, Markdown is a much more practical format — it eliminates an additional transformation layer between Airbyte and downstream AI/LLM systems.

Additionally, users who upload `.docx` files to Google Drive have no way to get Markdown output from the connector.

### Describe the solution you'd like

1. **For native Google Docs:** Add a connector configuration option (e.g., `google_doc_export_format`) allowing users to choose between `docx` (default, backward-compatible) and `markdown`. The Google Drive API already supports `text/markdown` as an export MIME type for Google Docs ([reference](https://developers.google.com/workspace/drive/api/guides/ref-export-formats)). This would be a small change in `stream_reader.py` — swapping the export MIME type based on the user's config selection.

2. **For uploaded .docx files:** Add in-connector DOCX → Markdown conversion using a Python library (e.g., `markitdown` or `mammoth`). This would let the connector accept DOCX files and output Markdown content without requiring users to modify their Drive files.

### Describe alternatives you've considered

- **Google Apps Script automation:** Users could set up a Drive-side script to auto-convert DOCX uploads to native Google Docs, then the connector exports as Markdown. This works but requires user-side setup outside of Airbyte.
- **Google Drive "Convert uploads" setting:** A per-user Drive setting auto-converts uploads to Google format, but only affects new uploads and applies globally to all file types.
- **dbt transformation:** Not feasible — dbt operates on structured data in warehouses via SQL and cannot perform binary file format conversion.
- **External tool (pandoc):** Users could pre-convert files outside Airbyte, but this breaks the single-pipeline experience.

### Additional context

- The connector code that controls the export format is in `stream_reader.py` ([lines 38, 48, 230-241](https://github.com/airbytehq/airbyte/blob/master/airbyte-integrations/connectors/source-google-drive/source_google_drive/stream_reader.py#L38-L48)).
- Google added Markdown as a supported export MIME type for Google Docs in July 2024.
- Google Drive export MIME types reference: https://developers.google.com/workspace/drive/api/guides/ref-export-formats

### Use case

Using Airbyte as a connector to Google Drive for AI-ingestable data sources. The current DOCX format introduces an unnecessary transformation layer between Airbyte and AI/LLM pipelines that expect Markdown input.

### Category

- **Type:** New Feature
- **Importance:** Major Improvement
- **Connector:** source-google-drive

---
**Internal Tracking:** https://github.com/airbytehq/oncall/issues/11802

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.