Overview
The SmartGent Enterprise Search Tool node enables users to perform enterprise-level search queries against a selected chatbot within the SmartGent platform. It is designed to integrate with AI Agent workflows in n8n, allowing users to retrieve relevant documents or information indexed by the chosen chatbot.
Typical use cases include:
- Searching internal company knowledge bases or document repositories via a chatbot interface.
- Retrieving contextual information to assist AI agents in answering user queries.
- Automating information retrieval workflows where results from enterprise chatbots are needed.
For example, a user can select a specific chatbot representing a department's knowledge base and query it for recent policy documents or technical manuals, receiving summarized search results directly in their workflow.
Properties
| Name | Meaning |
|---|---|
| Chatbot Name or ID | Select the chatbot to use for the search. Options are dynamically loaded from available chatbots. |
| Search Query | The text query string to execute against the selected chatbot's indexed data. |
| Additional Options | Collection of optional parameters: • Max Results — Maximum number of search results to return. |
Output
The node outputs an array of items, each containing a json object with the following fields:
query: The original search query string.chatbotGuid: The identifier of the chatbot used for the search.response: A formatted string summarizing the search results, including content snippets and source information (filename and page number).rawResults: The full raw response object returned by the SmartGent API, including detailed search result documents.timestamp: ISO timestamp indicating when the search was performed.resultCount: Number of search results returned.
If binary data were involved, it would be noted here, but this node only returns JSON data.
Dependencies
- Requires an API key credential for the SmartGent platform, configured in n8n credentials.
- The node makes HTTP requests to the SmartGent API endpoints:
- To list available chatbots:
GET /api/v1/rag/enterprise/group/chatbot - To perform searches:
POST /api/v1/rag/enterprise/groupsearch
- To list available chatbots:
- The API key must have appropriate permissions to access these endpoints.
Troubleshooting
Common issues:
- Invalid or missing API key credential will cause authentication failures.
- Selecting a chatbot that no longer exists or has been deleted may result in empty or error responses.
- Network connectivity problems can cause request timeouts or failures.
Error messages:
- Errors thrown during execution include descriptive messages such as "Failed to execute SmartGent Enterprise Search Tool" followed by the underlying issue.
- If
continueOnFailis enabled, errors for individual items are captured in the output JSON under anerrorfield instead of stopping the workflow.
Resolutions:
- Verify the API key credential is correctly set up and valid.
- Confirm the chatbot selection is correct and accessible.
- Check network connectivity and endpoint availability.
- Use expressions carefully when specifying chatbot IDs to avoid invalid values.
Links and References
- n8n Expressions Documentation
- SmartGent API documentation (not publicly linked here; refer to your organization's API docs)