Actions2
Overview
The SmartGent Enterprise Search node enables users to perform AI-powered enterprise data searches using SmartGent's platform. It supports two main operations:
- Get Chatbots: Retrieves a list of available chatbots configured in the SmartGent system.
- Search: Executes a search query against enterprise data through a selected chatbot.
This node is beneficial for organizations that want to integrate advanced AI search capabilities into their workflows, enabling quick access to relevant enterprise information. For example, a user can select a specific chatbot representing a knowledge domain and run queries to retrieve documents, pricing info, or filtered results based on custom criteria.
Properties
| Name | Meaning |
|---|---|
| Operation | Choose between "Get Chatbots" (retrieve chatbot list) or "Search" (perform a search query). |
| Chatbot Name or ID | Select the chatbot to use for searching. Options are dynamically loaded from available chatbots. |
| Search Query | The text query string to search for within the selected chatbot's data. |
| Additional Options | Optional parameters to refine the search: |
| - Max Results | Maximum number of search results to return (default 10). |
| - Include Pricing | Whether to include pricing information in the search results (true/false). |
| - Search Filters | One or more filters to narrow down search results by specifying field-value pairs. |
Output
The node outputs JSON data with the following structure depending on the operation:
Get Chatbots:
{ "operation": "getChatbots", "success": true, "chatbots": [ /* array of chatbot objects with name and guid */ ], "chatbotCount": 5, "timestamp": "2024-06-xxTxx:xx:xx.xxxZ" }This output provides the list of available chatbots and metadata.
Search:
{ "operation": "search", "chatbotGuid": "selected-chatbot-id", "query": "user search query", "results": { /* raw search results returned by SmartGent API */ }, "timestamp": "2024-06-xxTxx:xx:xx.xxxZ", "resultCount": 10 }Contains the search results as returned by the SmartGent API, including the count and timestamp.
The node does not output binary data.
Dependencies
- Requires an API key credential for SmartGent's API, which must be configured in n8n.
- Makes HTTP requests to SmartGent endpoints:
GET /api/v1/rag/enterprise/group/chatbotto fetch chatbots.POST /api/v1/rag/enterprise/groupsearchto perform searches.
- The API key must be included in request headers as
"smartgen-api-key".
Troubleshooting
Common Issues:
- Invalid or missing API key will cause authentication failures.
- Selecting a non-existent chatbot ID may result in empty or error responses.
- Malformed search queries or invalid filter fields could lead to no results or errors.
Error Messages:
- Errors thrown during HTTP requests are caught and either stop execution or, if "Continue On Fail" is enabled, return an error object with the message.
- Typical error format:
{ "error": "Error message here", "operation": "search", "timestamp": "2024-06-xxTxx:xx:xx.xxxZ" } - To resolve, verify API credentials, ensure chatbot IDs are correct, and validate query/filter syntax.
Links and References
- SmartGent API Documentation (hypothetical link as not provided)
- n8n Expressions Documentation
- n8n HTTP Request Node Documentation