n8n-nodes-trieve
v0.1.0
Published
n8n nodes for using Trieve
Readme
n8n-nodes-trieve
This contains the n8n nodes for using Trieve with n8n.
Setup
Before using the Trieve node, you'll need to:
- Create an account at dashboard.trieve.ai
- Create a dataset in the dashboard
- Generate an API key from your dashboard settings
- Use this API and Dataset ID key when configuring the Trieve node credentials in n8n
Chunk Operations
The Trieve node provides two main operations for working with chunks:
Creating Chunks
To create a chunk in Trieve:
- Add the Trieve node to your workflow
- Select "Chunk" as the resource and "Create Chunk" as the operation
- Fill in the required fields:
- Chunk HTML: The content you want to store
- Additional Fields:
- Tag Set: Comma-separated list of tags to help organize your chunks (e.g., "important,project-x,documentation")
- Tracking ID: A unique identifier for the chunk
- Time Stamp: When the chunk was created
- Metadata: Additional JSON data to store with the chunk
Searching Chunks
To search through your chunks:
- Add the Trieve node to your workflow
- Select "Chunk" as the resource and "Search" as the operation
- Configure your search:
- Query: The text to search for
- Search Type: Choose between Fulltext, Hybrid, or Semantic search
- Page Size: Number of results to return
- Filter: JSON filter to narrow down results
The search will return matching chunks along with their relevance scores and any matching highlights.
Tool Call Operation
The tool_call operation allows you to define and execute custom functions with specific parameters. This is useful for creating structured decision-making workflows.
Using Tool Call
To use the tool_call operation:
- Add the Trieve node to your workflow
- Select "Tool Call" as the resource and "Tool Call" as the operation
- Configure the function:
- Function Input: The input text to process
- Function Name: A unique name for your function (e.g., "is_important", "classify_document")
- Function Description: A clear description of what the function does
- Parameters: Define one or more parameters for your function:
- Name: The parameter name
- Parameter Type: Choose between Boolean or Number
- Description: Explain what the parameter represents
Example configuration (in json format):
{
"function_input": "This is an important document about project X",
"function_name": "is_important",
"function_description": "A function to determine if the input is important",
"parameters": [
{
"name": "is_important",
"parameter_type": "boolean",
"description": "Whether the input is important"
},
{
"name": "importance_score",
"parameter_type": "number",
"description": "A score from 0-10 indicating importance"
}
]
}The tool_call operation will return the parameters with their determined values based on the input text.
Local development
You need the following installed on your development machine:
Install n8n with:
npm install n8n -gRun
n8nto start n8n for the first timeLoin to http://localhost:5678 and complete onboarding steps and this should create a folder in
~/.n8n.To allow the node to be loaded locally run:
mkdir ~/.n8n/custom/ ln -s "$(pwd)/n8n-nodes-trieve ~/.n8n/custom/n8n-nodes-trieveRun
npm run buildinside then8n-nodes-trievedirectoryStart
n8nagain, you should see the node in the sidebar.
