Actions9
- Text Actions
- Image Actions
- Audio Actions
- Embedding Actions
Overview
This node integrates with Cloudflare Workers AI models to generate text embeddings from input text. It is designed to convert textual data into vector representations (embeddings) that can be used for various machine learning and natural language processing tasks such as semantic search, clustering, recommendation systems, or similarity comparisons.
A common use case is when you want to transform raw text into a numerical format that captures its semantic meaning, enabling downstream applications like document retrieval or content analysis.
For example, you could input product descriptions or customer reviews and obtain embeddings that help find similar items or analyze sentiment patterns.
Properties
| Name | Meaning |
|---|---|
| Text | The text string for which the node will generate embeddings. This is the main input that the embedding model processes to produce vector representations. |
Output
The node outputs JSON data containing the generated embeddings in the json field. Specifically, the output structure includes a result property holding the embedding vectors corresponding to the input text.
No binary data output is produced by this operation.
Example output snippet:
{
"result": {
"embedding": [0.123, 0.456, ...] // Vector representation of the input text
}
}
Dependencies
- Requires an active Cloudflare account with access to the Cloudflare Workers AI API.
- Needs an API authentication token credential configured in n8n to authorize requests.
- The node sends HTTP POST requests to the Cloudflare AI endpoint specific to embeddings generation.
Troubleshooting
Common issues:
- Invalid or missing API token: Ensure the API key credential is correctly set up and has necessary permissions.
- Network connectivity problems: Verify that your environment can reach the Cloudflare API endpoints.
- Input text too long or empty: Provide meaningful non-empty text within any length limits imposed by the API.
Error messages:
"Request failed": Generic failure; check the detailed error message returned by the API in the node's error output.- Errors related to authorization typically indicate invalid credentials.
- If the node returns errors about malformed input, verify the "Text" property is properly filled.
To continue processing despite errors on some items, enable the node’s "Continue On Fail" option.