AutomationFlowsAI & RAG › Parse Google Drive Documents to Rag-ready Markdown with Landing.ai and…

Parse Google Drive Documents to Rag-ready Markdown with Landing.ai and…

Original n8n title: Parse Google Drive Documents to Rag-ready Markdown with Landing.ai and Supabase Cache

ByAlok Kumar @alokkumar on n8n.io

Automatically watches a Google Drive folder, submits new documents to Landing.ai for parsing, caches processed files in - Supabase to avoid reprocessing, and reliably polls results with retry and timeout handling. Automated document ingestion for RAG pipelines Invoice, contract,…

Event trigger★★★★☆ complexity26 nodesGoogle Drive TriggerGoogle DriveSupabaseHTTP Request
AI & RAG Trigger: Event Nodes: 26 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #13244 — we link there as the canonical source.

This workflow follows the Google Drive → Google Drive Trigger recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "ae71b344-7c55-44c4-aa85-0bf7c98b01ed",
      "name": "Google Drive Trigger",
      "type": "n8n-nodes-base.googleDriveTrigger",
      "position": [
        -4752,
        1056
      ],
      "parameters": {
        "event": "fileCreated",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "triggerOn": "specificFolder",
        "folderToWatch": {
          "__rl": true,
          "mode": "list",
          "value": "1sRweV-tuSoNts1w9H3bYIb2ps9vfZ-G7",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1sRweV-tuSoNts1w9H3bYIb2ps9vfZ-G7",
          "cachedResultName": "n8n-Rag"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a1ddcd25-b6ed-4e7f-997d-6f0f893b5579",
      "name": "Download File",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -4512,
        1056
      ],
      "parameters": {
        "fileId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json[\"id\"] }}"
        },
        "options": {},
        "operation": "download"
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "58bfad03-641b-435b-b82b-9c0d3e7e6cfa",
      "name": "Build Metadata",
      "type": "n8n-nodes-base.code",
      "position": [
        -4256,
        1056
      ],
      "parameters": {
        "jsCode": "/**\n * BUILD METADATA \u2014 CANONICAL SHAPE\n * This node defines the contract for the rest of the workflow\n */\n\n// Prefer Drive-reported size, fall back to binary metadata if needed\nconst fileSize =\n  Number($json.size) ||\n  Number($binary?.data?.fileSize) ||\n  null;\n\nconsole.log('=== BUILD METADATA ===' );\nconsole.log('File ID:', $json.id);\nconsole.log('File Name:', $json.name);\nconsole.log('File Size:', fileSize);\n\nreturn {\n  json: {\n    // Canonical fields used everywhere downstream\n    file_id: $json.id,\n    document_name: $json.name,\n    mime_type: $json.mimeType,\n    file_size_bytes: fileSize,\n    drive_modified_time: $json.modifiedTime || null,\n    drive_created_time: $json.createdTime || null\n  },\n  binary: $binary\n};\n"
      },
      "typeVersion": 2
    },
    {
      "id": "837cba7e-cbfa-46e3-a41c-0af41cb9c79c",
      "name": "Check Cache",
      "type": "n8n-nodes-base.supabase",
      "position": [
        -4064,
        1408
      ],
      "parameters": {
        "limit": 1,
        "filters": {
          "conditions": [
            {
              "keyName": "file_id",
              "keyValue": "={{$json.file_id}}",
              "condition": "eq"
            }
          ]
        },
        "tableId": "landing_parse_cache",
        "operation": "getAll"
      },
      "credentials": {
        "supabaseApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1,
      "continueOnFail": true,
      "alwaysOutputData": true
    },
    {
      "id": "91528ec2-6093-416b-92a5-b815fccaeef8",
      "name": "Debug Cache Results",
      "type": "n8n-nodes-base.code",
      "position": [
        -3872,
        1408
      ],
      "parameters": {
        "jsCode": "\nconst metadata = $items('Build Metadata')[0].json;\nconst fileId = metadata.file_id;\n\nconsole.log('=== CHECKING CACHE ===');\nconsole.log('File ID to check:', fileId);\n\n// Get the Supabase result from the previous node\nconst supabaseResults = $items('Check Cache');\n\nconsole.log('Supabase node returned:', supabaseResults.length, 'items');\nconsole.log('Full Supabase response:', JSON.stringify(supabaseResults, null, 2));\n\nlet cacheHit = false;\nlet cacheRecord = null;\n\nif (supabaseResults && supabaseResults.length > 0) {\n  const result = supabaseResults[0].json;\n  console.log('First result:', JSON.stringify(result, null, 2));\n  \n  // Check if this is a real record with data\n  if (result && typeof result === 'object') {\n    const keys = Object.keys(result);\n    console.log('Keys in result:', keys);\n    \n    if (keys.length > 0 && result.file_id) {\n      cacheHit = true;\n      cacheRecord = result;\n      console.log('\u2705 CACHE HIT - Found record with file_id:', result.file_id);\n    } else if (keys.length === 0) {\n      console.log('\u274c CACHE MISS - Empty object returned');\n    } else {\n      console.log('\u274c CACHE MISS - No file_id in result');\n    }\n  }\n} else {\n  console.log('\u274c CACHE MISS - No results from Supabase');\n}\n\nconsole.log('Final cache_hit decision:', cacheHit);\n\nreturn {\n  json: {\n    ...metadata,\n    cache_hit: cacheHit,\n    cache_record: cacheRecord,\n    debug_supabase_length: supabaseResults.length,\n    debug_raw_response: supabaseResults.length > 0 ? supabaseResults[0].json : null\n  },\n  binary: $items('Build Metadata')[0].binary\n};\n"
      },
      "typeVersion": 2
    },
    {
      "id": "ccffb457-d7c9-42db-b844-2f2c76f8b634",
      "name": "If Cache Exists",
      "type": "n8n-nodes-base.if",
      "position": [
        -3664,
        1408
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "3e925fb1-714c-4732-93d3-adadd20bef11",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $items('Check Cache')[0]?.json?.file_id }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "43498f50-76e1-4306-9250-676af4a6472f",
      "name": "STOP \u2014 Cached",
      "type": "n8n-nodes-base.code",
      "position": [
        -3504,
        1216
      ],
      "parameters": {
        "jsCode": "console.log('\u2705 WORKFLOW STOPPED - File already in cache');\nconsole.log('File:', $json.document_name);\nconsole.log('File ID:', $json.file_id);\n\nreturn $input.all();"
      },
      "typeVersion": 2
    },
    {
      "id": "1618f07d-4cbf-417a-9398-158d1f430783",
      "name": "Submit to Landing.ai",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -3296,
        1424
      ],
      "parameters": {
        "url": "https://api.va.landing.ai/v1/ade/parse/jobs",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "document",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "data"
            },
            {
              "name": "model",
              "value": "dpt-2-latest"
            },
            {
              "name": "split_by",
              "value": "page"
            }
          ]
        },
        "genericAuthType": "httpBearerAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "organization-id",
              "value": "=t74be7bbi3yr"
            },
            {
              "name": "Accept",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "7b0eac38-d28d-4688-aa43-2d1e15735d9e",
      "name": "Merge Metadata + Job",
      "type": "n8n-nodes-base.merge",
      "position": [
        -3184,
        1072
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "5292d205-eae3-4bc8-8df2-8d757a35941c",
      "name": "Init Loop State",
      "type": "n8n-nodes-base.code",
      "position": [
        -3008,
        1264
      ],
      "parameters": {
        "jsCode": "/**\n * COMBINE METADATA + JOB ID\n * Merge file metadata with the Landing.ai job_id\n */\n\nconst metadata = $items('Debug Cache Results')[0].json;\nconst jobResponse = $items('Submit to Landing.ai')[0].json;\n\nconsole.log('=== MERGING DATA ===');\nconsole.log('Metadata:', metadata);\nconsole.log('Job Response:', jobResponse);\n\nreturn {\n  json: {\n    // File metadata\n    file_id: metadata.file_id,\n    document_name: metadata.document_name,\n    mime_type: metadata.mime_type,\n    file_size_bytes: metadata.file_size_bytes,\n    \n    // Job info\n    job_id: jobResponse.job_id,\n    \n    // Loop control\n    max_retries: 20,\n    poll_interval_sec: 10,\n    loop_start_time: Date.now(),\n    max_loop_duration_sec: 3600\n  }\n};\n"
      },
      "typeVersion": 2
    },
    {
      "id": "129dcf01-4e0a-497a-98ee-8ac9edb4d747",
      "name": "Poll Job Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2448,
        1056
      ],
      "parameters": {
        "url": "=https://api.va.landing.ai/v1/ade/parse/jobs/{{$json.job_id}}",
        "options": {},
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Accept",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "e8e00ff9-db14-48d1-9f1a-830f918cadf0",
      "name": "If Completed",
      "type": "n8n-nodes-base.if",
      "position": [
        -2144,
        1040
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "completed_status",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "completed"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "2bbc5bd9-b34a-4c8f-acea-679ea867f901",
      "name": "If Timeout",
      "type": "n8n-nodes-base.if",
      "position": [
        -1920,
        1280
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "timeout_by_retries",
              "operator": {
                "type": "number",
                "operation": "gte"
              },
              "leftValue": "={{ $runIndex }}",
              "rightValue": "={{ $json.max_retries }}"
            },
            {
              "id": "timeout_by_duration",
              "operator": {
                "type": "boolean",
                "operation": "equals",
                "singleValue": true
              },
              "leftValue": "={{ $json.is_stuck_loop }}",
              "rightValue": "true"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "bc3c2ed9-2a88-41d5-a590-517796b347cc",
      "name": "Save Parse Result",
      "type": "n8n-nodes-base.supabase",
      "position": [
        -1312,
        944
      ],
      "parameters": {
        "tableId": "landing_parse_cache",
        "fieldsUi": {
          "fieldValues": [
            {
              "fieldId": "file_id",
              "fieldValue": "={{ $('If Cache Exists').item.json.file_id }}"
            },
            {
              "fieldId": "job_status",
              "fieldValue": "completed"
            },
            {
              "fieldId": "markdown",
              "fieldValue": "={{ $json.data.markdown }}"
            },
            {
              "fieldId": "uploaded_at",
              "fieldValue": "={{$now}}"
            },
            {
              "fieldId": "workflow_run_id",
              "fieldValue": "={{$execution.id}}"
            }
          ]
        }
      },
      "credentials": {
        "supabaseApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "dfef6daa-f3d3-497d-a69e-9552ff320e38",
      "name": "Log Timeout",
      "type": "n8n-nodes-base.supabase",
      "position": [
        -1296,
        1264
      ],
      "parameters": {
        "tableId": "landing_parse_cache",
        "fieldsUi": {
          "fieldValues": [
            {
              "fieldId": "file_id",
              "fieldValue": "={{$json.file_id}}"
            },
            {
              "fieldId": "document_name",
              "fieldValue": "={{$json.document_name}}"
            },
            {
              "fieldId": "mime_type",
              "fieldValue": "={{$json.mime_type}}"
            },
            {
              "fieldId": "file_size_bytes",
              "fieldValue": "={{$json.file_size_bytes}}"
            },
            {
              "fieldId": "job_id",
              "fieldValue": "={{$json.job_id}}"
            },
            {
              "fieldId": "job_status",
              "fieldValue": "timeout"
            },
            {
              "fieldId": "page_count",
              "fieldValue": "={{$json.page_count}}"
            },
            {
              "fieldId": "markdown",
              "fieldValue": "={{$json.markdown}}"
            },
            {
              "fieldId": "failure_reason",
              "fieldValue": "={{$json.is_stuck_loop ? 'Loop exceeded max duration (' + $json.elapsed_seconds + 's)' : ($json.api_raw?.failure_reason ?? 'Max retries exceeded')}}"
            },
            {
              "fieldId": "source_system",
              "fieldValue": "landing.ai"
            },
            {
              "fieldId": "uploaded_at",
              "fieldValue": "={{$now}}"
            },
            {
              "fieldId": "workflow_run_id",
              "fieldValue": "={{$execution.id}}"
            }
          ]
        }
      },
      "credentials": {
        "supabaseApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2d1212f3-a11d-4bfa-9e89-2ffa6291744c",
      "name": "STOP \u2014 Success",
      "type": "n8n-nodes-base.code",
      "position": [
        -1104,
        944
      ],
      "parameters": {
        "jsCode": "console.log('\u2705 WORKFLOW COMPLETE - Parse successful');\nconsole.log('File:', $json.document_name);\nconsole.log('Pages:', $json.page_count);\nconsole.log('Job ID:', $json.job_id);\n\nreturn $input.all();"
      },
      "typeVersion": 2
    },
    {
      "id": "37cdc78f-7bc6-451f-a294-778f40d4caf4",
      "name": "STOP \u2014 Timeout",
      "type": "n8n-nodes-base.code",
      "position": [
        -1072,
        1264
      ],
      "parameters": {
        "jsCode": "console.log('\u274c WORKFLOW FAILED - Parse timeout');\nconsole.log('File:', $json.document_name);\nconsole.log('Retries:', $json.retry_count);\nconsole.log('Elapsed:', $json.elapsed_seconds + 's');\n\nreturn $input.all();"
      },
      "typeVersion": 2
    },
    {
      "id": "c3bdb340-189a-4d97-a9f8-d596af91eb34",
      "name": "check-large-file",
      "type": "n8n-nodes-base.if",
      "position": [
        -1920,
        928
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "95b25c8b-fea9-4f3c-8a79-0102f47a1975",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $json.output_url }}",
              "rightValue": "null"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "7b1b831c-4238-49b7-a189-91b3fa1973e8",
      "name": "HTTP Request1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1664,
        656
      ],
      "parameters": {
        "url": "={{ $json.output_url }}",
        "options": {}
      },
      "typeVersion": 4.3
    },
    {
      "id": "aa24e110-5823-45fa-9be8-4fc62b15277a",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5712,
        704
      ],
      "parameters": {
        "width": 896,
        "height": 1632,
        "content": "## Make your unstructured large documents LLM ready markdown using LandingAI Document Parsing.\n\n- Automatically watches a Google Drive folder, submits new documents to Landing.ai for parsing, caches processed files in - Supabase to avoid reprocessing, and reliably polls results with retry and timeout handling.\n---\n\n## Use Cases\n- Automated document ingestion for RAG pipelines  \n- Invoice, contract, or report parsing  \n- AI-powered document analysis workflows  \n- Knowledge base ingestion from Google Drive  \n- Preventing duplicate document processing in ETL pipelines  \n---\n\nExternal services:\n- Google Drive\n- Landing.ai\n- Supabase\n---\n\n## Credentials Required\n\n### Required\n- Google Drive OAuth2\n- Landing.ai API (HTTP Bearer Token)\n- Supabase API\n---\n\n## How it works \n\nOnce the pdf land in google drive location it trigger and it convert pdf (even more then 200 pages to LLM ready markdown). \nIt also check in database if the parsing is already done or not, this help to avoid any unnecessary landingAI api call.  \n\n## Setup Instructions\n\n### Step 1: Google Drive\n1. Create or select a folder in Google Drive\n2. Copy the folder ID\n3. Update the **Google Drive Trigger** node with this folder ID\n\n### Step 2: Landing.ai\n1. Create a Landing.ai account\n2. Generate an API key\n3. Add it in n8n as an **HTTP Bearer Auth** credential\n4. Update the `organization-id` header if required\n\n### Step 3: Supabase\n1. Create a Supabase project\n2. Create a table named `landing_parse_cache`\n3. Add fields such as:\n   - `file_id`\n   - `document_name`\n   - `mime_type`\n   - `file_size_bytes`\n   - `job_id`\n   - `job_status`\n   - `markdown`\n   - `uploaded_at`\n   - `workflow_run_id`\n4. Connect Supabase credentials in n8n\n\n## Expected Input\n- A document uploaded into the configured Google Drive folder  \n  (PDF, DOCX, or other supported formats)"
      },
      "typeVersion": 1
    },
    {
      "id": "e7d787ba-ca6a-41d1-843d-9d29e65dc47d",
      "name": "wait till interval set time",
      "type": "n8n-nodes-base.wait",
      "onError": "continueRegularOutput",
      "position": [
        -2816,
        1264
      ],
      "parameters": {
        "amount": "={{ $json.poll_interval_sec }}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "dfba2cb1-988c-4c68-9eff-63e201c5ef9a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4800,
        944
      ],
      "parameters": {
        "color": 3,
        "width": 752,
        "height": 336,
        "content": "##  Fetch file from Google drive"
      },
      "typeVersion": 1
    },
    {
      "id": "dd97df20-c80d-4ff1-b660-3489e4d43123",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4112,
        1344
      ],
      "parameters": {
        "width": 576,
        "height": 256,
        "content": "Check Cache"
      },
      "typeVersion": 1
    },
    {
      "id": "e60c91b1-aa45-4640-94b5-552e49f5e33d",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3344,
        608
      ],
      "parameters": {
        "width": 2576,
        "height": 1088,
        "content": "## Get Parse data "
      },
      "typeVersion": 1
    },
    {
      "id": "c9e65414-6724-4508-9426-15c833fc963e",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3344,
        1712
      ],
      "parameters": {
        "color": 4,
        "width": 336,
        "height": 128,
        "content": "Check how to get api key for landingAI here https://docs.landing.ai/ade/agentic-api-key"
      },
      "typeVersion": 1
    },
    {
      "id": "0b157a3e-9599-4841-a87b-cf300d237b7e",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1344,
        1488
      ],
      "parameters": {
        "color": 6,
        "width": 400,
        "height": 192,
        "content": "## Supabase setup\n\n - Create a **Supabase account** and set up a project.  \n- Create a **bucket** in Supabase (e.g., `test-n8n`).  \n- Get your **Project URL** and **Anon Key** from Supabase.  \n- In n8n, create a **Supabase API Credential** using your keys. "
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "If Timeout": {
      "main": [
        [
          {
            "node": "Log Timeout",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "wait till interval set time",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Cache": {
      "main": [
        [
          {
            "node": "Debug Cache Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Timeout": {
      "main": [
        [
          {
            "node": "STOP \u2014 Timeout",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Completed": {
      "main": [
        [
          {
            "node": "check-large-file",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "If Timeout",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download File": {
      "main": [
        [
          {
            "node": "Build Metadata",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request1": {
      "main": [
        [
          {
            "node": "Save Parse Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Metadata": {
      "main": [
        [
          {
            "node": "Check Cache",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge Metadata + Job",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Cache Exists": {
      "main": [
        [
          {
            "node": "STOP \u2014 Cached",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Submit to Landing.ai",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Init Loop State": {
      "main": [
        [
          {
            "node": "wait till interval set time",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Poll Job Status": {
      "main": [
        [
          {
            "node": "If Completed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "check-large-file": {
      "main": [
        [
          {
            "node": "HTTP Request1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Save Parse Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save Parse Result": {
      "main": [
        [
          {
            "node": "STOP \u2014 Success",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Debug Cache Results": {
      "main": [
        [
          {
            "node": "If Cache Exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive Trigger": {
      "main": [
        [
          {
            "node": "Download File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Metadata + Job": {
      "main": [
        [
          {
            "node": "Init Loop State",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Submit to Landing.ai": {
      "main": [
        [
          {
            "node": "Merge Metadata + Job",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "wait till interval set time": {
      "main": [
        [
          {
            "node": "Poll Job Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Automatically watches a Google Drive folder, submits new documents to Landing.ai for parsing, caches processed files in - Supabase to avoid reprocessing, and reliably polls results with retry and timeout handling. Automated document ingestion for RAG pipelines Invoice, contract,…

Source: https://n8n.io/workflows/13244/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Monitor Google Drive folder, parsing PDF, DOCX and image file into a destination folder, ready for further processing (e.g. RAG ingestion, translation, etc.) Keep processing log in Google Sheet and se

Google Drive Trigger, Google Drive, HTTP Request +2
AI & RAG

Transcribe audio messages from Telegram using Google Gemini for free.

Telegram, Telegram Trigger, HTTP Request +3
AI & RAG

The Problem That it Solves

Google Drive Trigger, OpenAI, Google Drive +5
AI & RAG

Content creators, YouTubers, and social media managers who want to repurpose long form videos into short clips without doing it manually. Works on self hosted n8n instances.

Google Drive Trigger, Google Drive, N8N Nodes Renderio +3
AI & RAG

Monitor a Google Drive folder, process each image based on the prompt defined in and save the new image to the specified output Google Drive folder. Maintain a processing log in Google Sheets.

Google Drive Trigger, Google Drive, HTTP Request +2