# Parse Google Drive documents to RAG-ready Markdown: n8n workflow

> Started by an event in a connected app, and works across Google Drive and Supabase. 20 steps, 4 branches, 1 loop or waits: a working afternoon to understand...

Source: https://millionrounds.com/workflow/parse-google-drive-documents-to-rag-ready-markdown (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Documents and files](https://millionrounds.com/workflows?category=Documents+and+files#library)

# Parse Google Drive documents to RAG-ready Markdown

Started by an event in a connected app, and works across Google Drive and Supabase. 20 steps, 4 branches, 1 loop or waits: a working afternoon to understand properly.

Medium

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fparse-google-drive-documents-to-rag-ready-markdown)

**20 steps** Medium: a working afternoon

**4** Branches: places the flow splits

**1** Loop or waits

**2** Services it connects to

## The flow

Starts it 1 Logic 12 Service 7

The steps in the order they run, from what starts it.

- 1 **Google Drive Trigger** Google Drive trigger *Starts it*
- 2 **Download File** Google Drive *Service*
- 3 **Build Metadata** Code *Logic*
- 4 **Check Cache** Supabase *Service*
- 5 **Merge Metadata + Job** Merge *Logic*
- 6 **Debug Cache Results** Code *Logic*
- 7 **Init Loop State** Code *Logic*
- 8 **If Cache Exists** If *Logic*
- 9 **wait till interval set time** Wait *Logic*
- 10 **STOP, Cached** Code *Logic*
- 11 **Submit to Landing.ai** Http Request *Service*
- 12 **Poll Job Status** Http Request *Service*
- 13 **If Completed** If *Logic*
- 14 **check-large-file** If *Logic*
- 15 **If Timeout** If *Logic*
- 16 **HTTP Request1** Http Request *Service*
- 17 **Save Parse Result** Supabase *Service*
- 18 **Log Timeout** Supabase *Service*
- 19 **STOP, Success** Code *Logic*
- 20 **STOP, Timeout** Code *Logic*

## How it's built

- **Starts on:** An event in a connected app
- **Steps:** 20, with 4 branches, 1 loop or waits
- **Size:** Medium: a working afternoon
- **Connects to:** Google Drive, Supabase
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

An n8n account, plus your own Google Drive and Supabase accounts. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an event in a connected app.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Plan an afternoon. 20 steps is enough that you should read each one before running it.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 20 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fparse-google-drive-documents-to-rag-ready-markdown)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Google Drive](https://millionrounds.com/workflows?service=Google+Drive#library)[Supabase](https://millionrounds.com/workflows?service=Supabase#library)

## Workflows like it

Also documents and files, with the same services where possible, closest in size first.

- [**Document-based chatbot with OpenAI and Pinecone** 20 steps · calls a model · Airtable, Google Drive](https://millionrounds.com/workflow/document-based-chatbot-with-openai-and-pinecone)
- [**Generate DOCX documents from Gmail with OpenAI** 20 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/generate-docx-documents-from-gmail-with-openai)
- [**Keep RAG system updated with Google Drive** 20 steps · calls a model · Google Drive, Supabase](https://millionrounds.com/workflow/keep-rag-system-updated-with-google-drive)
- [**Organize handwritten memos from LINE with Gemini and Drive** 20 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/organize-handwritten-memos-from-line-with-gemini-and-drive)
- [**Auto-file emailed documents to Clio matters in Google Drive** 21 steps · Email, Google Drive](https://millionrounds.com/workflow/auto-file-emailed-documents-to-clio-matters-in-google-drive)
- [**Backup n8n workflows to GitHub and Google Drive with Gmail** 19 steps · Gmail, Google Drive](https://millionrounds.com/workflow/backup-n8n-workflows-to-github-and-google-drive-with-gmail)
