n8n

How to Index Google Drive Images for Vector Search?

Turn Google Drive images into a fast searchable library. The flow builds a short text profile for each image using color data and AI generated keywords. It fits teams that need quick access to brand photos and product shots.

The run starts when you click Test. An image is downloaded from Google Drive and resized to 512 by 512 for better vision results. The color channels are read to capture basic visual traits. An OpenAI vision model creates simple keywords that describe the picture. Both outputs are merged into one document, split into chunks, turned into vectors with OpenAI embeddings, and saved in an in memory vector store. A final step lets you type a text prompt to find the closest image.

Setup needs Google Drive access and an OpenAI API key. Map basic metadata so you can filter later, like source and tags. Expect faster search, less manual tagging, and a repeatable way to index new images. Use it for cataloging brand assets, product galleries, and campaign graphics. Do not use it for medical images.

What are the key features?

  • Manual test trigger lets you run and validate on demand
  • Google Drive node downloads the selected image by file ID
  • Image is resized to 512 by 512 to improve vision model results
  • Color channel information is extracted for basic visual traits
  • OpenAI vision generates simple descriptive keywords for the image
  • Merge step combines keywords and color data into one record
  • Set node builds a clean embedding document and metadata
  • Text splitter prepares chunks for better embedding quality
  • OpenAI embeddings turn text into vectors for search
  • In memory vector store saves vectors and supports quick text search

What are the benefits?

  • Reduce manual image tagging from 30 minutes to 1 minute per image
  • Cut asset search time by up to 70 percent
  • Improve search accuracy by combining color data and AI keywords
  • Connect Google Drive and OpenAI in one simple flow
  • Scale to thousands of images by repeating the same steps

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You will need accounts with Google Drive and OpenAI. See the Tools Required section above for links to create accounts with these services.
  3. Open the Google Drive node. In the Credential to connect with dropdown, click Create new credential, then follow the on screen steps to connect your Google account.
  4. In the Google Drive node, set Operation to Download and paste a valid File ID from a Google Drive file link. Execute the node and confirm the file downloads.
  5. Open the Resize Image node. Keep width and height at 512 and ensure Only If Larger is enabled. Run the node and check the output size.
  6. Open the Get Image Keywords node. In the Credential to connect with dropdown, click Create new credential for OpenAI. Create an API key in your OpenAI account and paste it. Choose a vision capable model.
  7. Run the workflow up to the Get Image Keywords node. Confirm you see a list of simple keywords in the output.
  8. Open the Get Color Information node output and verify the color channels are present.
  9. Open the Document for Embedding set node. Review the data field that combines keywords and color info. Add or adjust metadata fields like source, format, and tags.
  10. Open the Default Data Loader and confirm metadata mapping matches the fields from the set node. Keep the text splitter defaults unless you need different chunk sizes.
  11. Check both Embeddings OpenAI nodes and make sure the OpenAI credential is selected. Execute them to generate vectors.
  12. Run the In Memory Vector Store node. Confirm it receives the document and the embeddings on the correct inputs.
  13. Open the Search for Image node. Enter a simple prompt like red car and execute. If results are empty, verify the File ID, OpenAI credentials, and that the document reached the vector store.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Google Drive

Sign up

Drive API: $0 (no additional cost; quota-limited)

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.