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.
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.
| Node | Category | Type | Operation |
|---|---|---|---|
| When clicking "Test workflow" | Trigger | Manual Trigger | See node parameters |
| Google Drive | Files / media | Google Drive | download |
| Get Color Information | Files / media | Edit Image | information |
| Resize Image | Files / media | Edit Image | resize |
| Default Data Loader | Files / media | Document Default Data Loader | See node parameters |
| Recursive Character Text Splitter | Transform | Text Splitter Recursive Character Text Splitter | See node parameters |
| Combine Image Analysis | Transform | Merge | See node parameters |
| Document for Embedding | Transform | Edit Fields | See node parameters |
| Embeddings OpenAI1 | AI & models | Embeddings Open Ai | See node parameters |
| In-Memory Vector Store | Data store | Vector Store In Memory | See node parameters |
| Embeddings OpenAI | AI & models | Embeddings Open Ai | See node parameters |
| Search for Image | Data store | Vector Store In Memory | See node parameters |
| Get Image Keywords | AI & models | Open Ai | image / analyze |
Setup
- Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
- Connect your own credentials through n8n’s credential store. Replace
REPLACE_WITH_*values with your resource identifiers. - Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
- 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
googleDriveOAuth2ApiopenAiApi
Workflow notes
Get Color Channels
Get Color Channels
Source: https://www.pinecone.io/learn/series/image-search/color-histograms/
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
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!
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.