← All N8N workflows
AI & researchDocument Default Data LoaderEdit ImageEmbeddings Open AiGoogle DriveManual Trigger

Generate Image Keywords

Configured with Document Default Data Loader, Edit Image, Embeddings Open Ai, Google Drive, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
TriggerWhen clicking "Testworkflow"Manual TriggerFiles / mediaGoogle DriveGoogle DriveFiles / mediaGet Color InformationEdit ImageFiles / mediaResize ImageEdit ImageFiles / mediaDefault Data LoaderDocument Default Data Lo…TransformRecursive CharacterText SplitterText Splitter Recursive …TransformCombine Image AnalysisMergeTransformDocument for EmbeddingEdit FieldsAI & modelsEmbeddings OpenAI1Embeddings Open AiData storeIn-Memory Vector StoreVector Store In MemoryAI & modelsEmbeddings OpenAIEmbeddings Open AiData storeSearch for ImageVector Store In MemoryAI & modelsGet Image KeywordsOpen Ai

Node categories in this workflow

  • Trigger
  • Files / media
  • Transform
  • AI & models
  • Data store

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
When clicking "Test workflow"TriggerManual TriggerSee node parameters
Google DriveFiles / mediaGoogle Drivedownload
Get Color InformationFiles / mediaEdit Imageinformation
Resize ImageFiles / mediaEdit Imageresize
Default Data LoaderFiles / mediaDocument Default Data LoaderSee node parameters
Recursive Character Text SplitterTransformText Splitter Recursive Character Text SplitterSee node parameters
Combine Image AnalysisTransformMergeSee node parameters
Document for EmbeddingTransformEdit FieldsSee node parameters
Embeddings OpenAI1AI & modelsEmbeddings Open AiSee node parameters
In-Memory Vector StoreData storeVector Store In MemorySee node parameters
Embeddings OpenAIAI & modelsEmbeddings Open AiSee node parameters
Search for ImageData storeVector Store In MemorySee node parameters
Get Image KeywordsAI & modelsOpen Aiimage / analyze

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • googleDriveOAuth2Api
  • openAiApi

Workflow notes

Get Color Channels
Generate Image Keywords

Generate Image Keywords

Source: https://www.pinecone.io/learn/series/image-search/bag-of-visual-words/

Note, OpenAI Image models work best when image is resized to 512x512.

Sticky Note2

⚠️ Multimodal embedding is not designed analyze medical images for diagnostic features or disease patterns. Please do not use Multimodal embedding for medical purposes.

1. Get the Source Image

1. Get the Source Image

In this demo, we just need an image file. We'll pull an image from google drive but you can use all input trigger or source you prefer.

2. Image Embedding Methods

2. Image Embedding Methods

Read more about working with images in n8n

There are a myriad of image embedding techniques some which involve specialised models and some which do a simplified image-to-text representation. In this demo, we'll use the simplified text representation methods: collecting color channel information and using Multimodal LLMs to produce keywords for the image. Together, these will form the document we'll embed to represent our image for search.

3. Generate Embedding Doc

3. Generate Embedding Doc

It is important to define your metadata for later filtering and retrieval purposes.

3. Store in Vector Store

3. Store in Vector Store

Read more about vector stores

Once our document is ready, we can just insert into any vector store to make it ready for searching. When searching, be sure to defined the same vector store index used here! Note: Metadata is defined in the document loader which must be mapped manually.

4. Try it out!

4. Try it out!

Read more about vector stores

Here's a quick test to use a simple text prompt to search for the image. Next step would be to implement image-to-image search by using the "Embedding Doc" to search rather to store in the vector database.

Try It Out!

Try It Out!

This workflow does the following:

  • Downloads a selected image from Google Drive.
  • Extracts colour channel information from the image.
  • Generates semantic keywords of the iamge using OpenAI vision model.
  • Combines extracted and generated data to create an embedding document for the image.
  • Inserts this document into a vector store to allow for vector search on the original image.

Need Help?

Join the Discord or ask in the Forum!

Happy Hacking!

Generate Image Keywords

Generate Image Keywords

Purpose and structure

This folder contains the Generate Image Keywords workflow. Its executable nodes use documentDefaultDataLoader, editImage, embeddingsOpenAi, googleDrive, manualTrigger, merge, openAi, set, textSplitterRecursiveCharacterTextSplitter, vectorStoreInMemory. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

When clicking "Test workflow"

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Manual/0541_Manual_Stickynote_Update_Triggered.json MIT; preserve source notices.

More in AI & research