Skip to main content

Sync OpenAI vector stores from Google Sheets with Drive and AWS S3

Workflow preview

Workflow preview
100%
Sync OpenAI vector stores from Google Sheets with Drive and AWS S3 preview
Open on n8n.io

1. Workflow Overview

Quick overview This workflow runs every two minutes to sync a Google Sheets file queue with an OpenAI Vector Store by deleting outdated entries, downloading new files from Google Drive, AWS S3, or ...

Best for

  • Document Extraction automation workflows
  • AI RAG automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.scheduletrigger, n8n-nodes-base.googlesheets, n8n-nodes-base.if, n8n-nodes-base.httprequest, n8n-nodes-base.filter, n8n-nodes-base.noop, n8n-nodes-base.switch

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Salman Mehboob.

Original n8n.io source

1.1 Workflow description

Title
Sync OpenAI vector stores from Google Sheets with Drive and AWS S3
Workflow name
Sync OpenAI vector stores from Google Sheets with Drive and AWS S3

Quick overview

This workflow runs every two minutes to sync a Google Sheets file queue with an OpenAI Vector Store by deleting outdated entries, downloading new files from Google Drive, AWS S3, or a URL, uploading them to OpenAI, and updating each row’s processing status.

How it works

  1. Runs every two minutes and reads all rows from a Google Sheets queue.
  2. For rows marked as outdated, deletes the referenced file from the OpenAI Vector Store and updates the row status to deleted in Google Sheets.
  3. Filters for rows that have a file_url and no status, then processes them one by one.
  4. Downloads each file based on its URL pattern using Google Drive, AWS S3, or an HTTP download.
  5. Uploads the downloaded file to OpenAI Files (purpose: assistants) and adds the returned file ID to the target OpenAI Vector Store.
  6. Waits and polls the OpenAI Vector Store file status until it is completed, then marks the row as active in Google Sheets.
  7. If the file status returns anything other than completed or in_progress, marks the row as error in Google Sheets and continues with the next item.

Setup

  1. Add credentials for Google Sheets OAuth2, OpenAI API, Google Drive OAuth2, and AWS (IAM) for S3 access.
  2. Replace YOUR_GOOGLE_SHEET_ID in all Google Sheets steps and ensure the sheet includes file_url, status, openai_file_id, last_updated, and a row_number column used for updates.
  3. Replace YOUR_VECTOR_STORE_ID in the OpenAI Vector Store delete, add, and poll HTTP requests.
  4. Replace YOUR_S3_BUCKET_NAME in the AWS S3 download step.
  5. Replace YOUR_ARTICLES_DOMAIN in the URL routing rules used to decide when to download via HTTP.

Additional info

Contact

LinkedIn: linkedin.com/in/salman-mehboob-pro Email: [email protected]

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Sticky Overview

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Sticky Trigger

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Sticky Delete

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Sticky Filter

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Sticky Download

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Sticky Upload

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Every 2 Minutes

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.3

Block 8 - Get Row(s) From Sheet

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 9 - If Outdated

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 10 - Delete File From Vector Store

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 11 - Mark Row as Deleted

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 12 - Filter New Files

Type / Role
n8n-nodes-base.filter - filter
Config choices
Version 2.2

Block 13 - All Files Done

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 14 - Route by File Source

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 15 - Download from Google Drive

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 16 - Upload File to OpenAI

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 2.3

Block 17 - Download from S3

Type / Role
n8n-nodes-base.awsS3 - awsS3
Config choices
Version 2

Block 18 - Download via HTTP

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 19 - Loop Over Items

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 20 - Add File to Vector Store

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 21 - Wait 30 Seconds

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 22 - Poll Vector Store File Status

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.4

Block 23 - Route by Embedding Status

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 24 - Mark Row as Active

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Showing the first 24 of 25 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Sync OpenAI vector stores from Google Sheets with Drive and AWS S3
Complexity advanced
Nodes 25
Categories Document Extraction, AI RAG
Author Salman Mehboob
Published 01 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16050/16050.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Sync OpenAI vector stores from Google Sheets with Drive and AWS S3 do?

Quick overview This workflow runs every two minutes to sync a Google Sheets file queue with an OpenAI Vector Store by deleting outdated entries, downloading new files from Google Drive, AWS S3, or ...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Document Extraction, AI RAG use case.