ChatBot Enhanced
Actions14
- Rate Limiting Actions
- Session Actions
- Message Actions
- Analytics Actions
Overview
The node "ChatBot Enhanced" provides advanced chatbot-related functionalities integrated with Redis for state management, rate limiting, analytics, and message handling. Specifically, the Analytics - Query Metrics operation allows users to retrieve performance metrics and analytics data related to chatbot interactions.
This operation is useful for monitoring chatbot usage patterns, tracking event counts, and analyzing performance over time. For example, a user can query how many messages were processed in the last hour or get aggregated counts of specific events to understand chatbot load and user engagement.
Practical scenarios include:
- Monitoring chatbot traffic and usage trends.
- Generating reports on message volume and user activity.
- Integrating analytics data into dashboards for real-time monitoring.
Properties
| Name | Meaning |
|---|---|
| Session Key | Unique identifier for the user or session; used to scope analytics queries per user/session. |
| Message Content | The content of the message being processed; can be used as context or metadata in analytics. |
| Enable Debug Mode | Enables detailed logging and debug information during execution. |
| Redis Key Prefix | Prefix string for Redis keys to avoid collisions when storing or querying data. |
Output
The output JSON structure for the Query Metrics operation includes:
message: The original message content processed.sessionId: The session key identifying the user/session.operationType: Fixed value"analytics"indicating the operation performed.eventTracked: Boolean indicating if the event was successfully tracked.analytics: An array of metric entries retrieved from the analytics store. Each entry typically contains:- Metric name
- Timestamp
- Aggregated count or value
Additionally, the node outputs performance metrics including:
- Number of events tracked.
- Number of analytics entries returned.
- Total count aggregated from all entries.
- Processing time (usually zero in static analysis).
- Redis health status (availability).
The node does not output binary data.
Dependencies
- Requires a Redis server connection configured via an API key credential.
- Uses Redis for storing and querying analytics data.
- The node expects proper Redis credentials and connectivity.
- No other external services are required.
Troubleshooting
- Redis Connection Failures: If the node cannot connect to Redis, it will throw errors indicating connection failure. Ensure Redis credentials are correct and the Redis server is reachable.
- Empty Analytics Results: If no metrics are returned, verify that relevant events have been tracked previously and that the time window for the query is correct.
- Permission Issues: Make sure the Redis user has read/write permissions for the keys used by the node.
- Debug Mode: Enabling debug mode helps trace internal operations and identify issues with metric recording or querying.