Actions20
- AI Scrape Actions
- Analyze Sentiment Actions
- Convert to SQL Actions
- Generate Embedding Actions
- HTML to Any Actions
- Image Generation Actions
- Make Prediction Actions
- NSFW Detection Actions
- Object Detection Actions
- Process Image Actions
- Profanity Detection Actions
- Search Web Actions
- Spam Detection Actions
- Speech to Text Actions
- Spell Check Actions
- Summary Actions
- Text to Speech Actions
- Translate Actions
- Translate Image Actions
- Web Suggestion Actions
Overview
The Generate Embedding operation in this node creates vector embeddings from various types of input content. Embeddings are numerical representations of data (such as text, images, audio, or PDFs) that capture semantic meaning and can be used for tasks like similarity search, clustering, recommendation systems, or machine learning.
Typical use cases include:
- Converting textual content into embeddings to enable semantic search or document clustering.
- Generating embeddings from images or audio files for multimedia analysis or classification.
- Processing URLs or stored files to extract meaningful vector representations without manual content extraction.
For example, you could input a block of text describing a product and generate an embedding to compare it with other products semantically, or provide a PDF file to create embeddings for its content to facilitate search within documents.
Properties
Name | Meaning |
---|---|
Embedding Source | Choose the source of the content to embed: Text , URL , or File Store Key referencing uploaded files. |
Text | The raw text content to generate embeddings for (used if Embedding Source is Text ). |
URL | A web address pointing to the resource to generate embeddings for (used if Embedding Source is URL ). |
File Store Key | A key referencing a previously uploaded file in storage (used if Embedding Source is File Store Key ). |
File Content | Direct content of a file to generate embeddings for (can be used alongside other inputs). |
Type | The type of content being processed. Options: Audio , Image , PDF , Text , Text Other . |
Token Overflow Mode | Behavior when input exceeds token limits: Error to throw an error, or Truncate to cut off excess tokens. |
Output
The node outputs JSON data containing the generated embeddings. Typically, this will be an array or object representing the vector embedding(s) corresponding to the input content. This output can then be used downstream for similarity comparisons, indexing, or further processing.
If binary data is involved (e.g., image or audio embeddings), the node may handle or reference such data internally, but the main output focus is on the embedding vectors in JSON form.
Dependencies
- Requires an API key credential for authenticating with the JigsawStack API service.
- The node sends requests to the JigsawStack API endpoint at
https://api.jigsawstack.com/v1
. - Proper configuration of the API key credential in n8n is necessary for successful operation.
Troubleshooting
- Input Exceeds Token Limits: If the input content is too large, and
Token Overflow Mode
is set toError
, the node will throw an error. To resolve, either reduce input size or switch the mode toTruncate
to automatically shorten the input. - Invalid or Missing API Key: Authentication errors occur if the API key is missing or invalid. Ensure the API key credential is correctly configured in n8n.
- Unsupported Content Type: Providing a content type not supported by the API or mismatched with the actual content may cause failures. Verify the
Type
property matches the input content. - Incorrect Embedding Source: If the selected embedding source does not correspond to provided input (e.g., selecting
URL
but not providing a URL), the node may fail or produce empty results. Double-check input fields based on the chosen source.
Links and References
- JigsawStack API Documentation (for detailed API capabilities and limitations)
- Embedding Concepts and Use Cases
- n8n Documentation for configuring credentials and using custom nodes