n8n

How to Automate Google Drive Image Tagging Search?

Build a simple image search system for your Google Drive assets. The flow turns each picture into a text profile made from color details and AI keywords, so teams can find the right image faster. Perfect for marketing folders, product shots, and brand libraries.

On click, the workflow downloads a chosen image from Google Drive. It resizes large images to 512 by 512 for better AI results, extracts color channel information, and asks an OpenAI vision model to produce clear keywords. Both outputs are merged into one document. The system adds metadata like source and format, splits long text, generates embeddings with OpenAI, and stores them in an in memory vector store. A sample text query creates a second embedding to test search against the stored document.

Setup needs Google Drive access and an OpenAI API key. Expect less manual tagging and quicker discovery of approved assets. Useful for social content, ad creatives, product catalogs, and campaign archives. Do not use this for medical image diagnosis. You can later swap the in memory store for your preferred vector database to scale.

What are the key features?

  • Manual test trigger lets you run and validate the flow on demand
  • Google Drive download pulls the selected image file for processing
  • Image resize to 512 by 512 improves vision model results and speed
  • Color channel extraction captures a simple color profile of the image
  • OpenAI vision generates clear, human readable keywords for the image
  • Merge step combines color data and keywords into one clean document
  • Metadata loader attaches fields like source and format for later filters
  • Text splitter prepares content chunks for better embedding quality
  • OpenAI embeddings store the vector in an in memory vector database for quick search
  • Sample search embeds a text query to find the closest matching image

What are the benefits?

  • Reduce manual tagging time from hours to minutes
  • Speed up image discovery by up to 70 percent for common searches
  • Improve findability with consistent AI generated keywords
  • Connect Google Drive and OpenAI without custom code
  • Test search logic safely using an in memory store before going live
  • Add metadata to support filters like source and format

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'll need accounts with Google Drive and OpenAI. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n canvas, double click the Google Drive node. In the Credential to connect with field, click Create new credential. Choose Google Drive OAuth2, then follow the on screen steps to authorize your Google account with access to the target file or folder.
  4. In the Google Drive node, set the operation to download and select the image file Id. Confirm you can access the file by clicking Execute node to ensure a file is returned.
  5. Open the Resize Image node and keep width and height at 512. Ensure the option only if larger is enabled so small images are not upscaled too much.
  6. Open the Get Image Keywords node. In the Credential to connect with dropdown, click Create new credential for OpenAI. Paste your OpenAI API key from your OpenAI account API page and save. Choose a vision capable model in the node settings.
  7. Execute the Get Color Information and Get Image Keywords nodes. Check that color data and keyword text appear in the output.
  8. Open the Document for Embedding node. Confirm the template includes both keywords and color information and that the fields map correctly.
  9. Open the Default Data Loader and set metadata fields like source and format. Make sure the metadata values map from the Document for Embedding output.
  10. Open the Embeddings OpenAI node. Use the same OpenAI credential. Select your preferred embeddings model. Execute the node to confirm vectors are created.
  11. Check the In Memory Vector Store node. Confirm it receives the document and embeddings. Note that this store resets on workflow restart, which is good for testing.
  12. Run the full workflow with the manual trigger. In the Search for Image step, enter a plain text query and verify the closest image is returned. If you see Drive permission errors, share the file with the authorized account. If keywords are empty, verify the image is at least 512 by 512. If you hit OpenAI rate limits, retry later or lower concurrency.

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.