N8N Tools - Botpress API
Actions26
- Bot Actions
- Conversation Actions
- Message Actions
- User Actions
- Event Actions
- State Actions
Overview
The node integrates with the Botpress conversational AI platform, specifically to list events related to a conversation. It retrieves a paginated list of events that have occurred within a specified conversation, such as user messages, system triggers, or custom events.
This node is useful in scenarios where you want to monitor or analyze the sequence of events in a chat session, for example:
- Auditing conversation history for customer support.
- Triggering workflows based on specific event types.
- Extracting event data for analytics or reporting.
Practical example: You have a chatbot running on Botpress and want to fetch the last 100 events from a particular conversation to understand user interactions or debug issues.
Properties
| Name | Meaning |
|---|---|
| Conversation ID | The unique identifier of the conversation whose events you want to list (required). |
| Additional Fields | Optional parameters to refine the request: |
| - Tags | Comma-separated list of tags (not used directly in listing events but available in other ops) |
| - Integration Channel | Name of the integration channel (e.g., telegram, slack) |
| - User Name | Display name for the user |
| - User Picture URL | Profile picture URL for the user |
| - Metadata | Additional metadata as JSON (not used in listing events) |
| - State Variables | State variables as JSON object (not used in listing events) |
| - Event Type | Type of event to create (used in create event operation, not listing) |
| - Event Payload | Event payload as JSON (used in create event operation) |
| - Quick Replies | Comma-separated list of quick reply options (not used in listing events) |
| - Actions | Card/message actions as JSON array (not used in listing events) |
| - Limit | Maximum number of results to return (default 100) |
| - Page Token | Token for pagination to retrieve next page of results |
Output
The output is an array of event objects returned from the Botpress API under the json field. Each event represents an occurrence in the conversation, such as a message sent, a system trigger, or a custom event.
The structure of each event object depends on Botpress's event schema but typically includes fields like:
type: The type of event (e.g., message, custom).payload: The content or data associated with the event.timestamp: When the event occurred.- Other metadata relevant to the event.
No binary data is output by this operation.
Dependencies
- Requires an API key credential for authenticating with the Botpress API.
- Needs configuration of the Botpress API URL, access token, bot ID, and optionally an integration ID.
- Uses an HTTP proxy service (
https://n8ntools.io/api/v1/proxy/botpress) to forward requests to Botpress.
Troubleshooting
Common Issues:
- Invalid or missing conversation ID will cause the API call to fail.
- Pagination tokens must be valid; otherwise, no further results will be returned.
- API authentication errors if credentials are incorrect or expired.
Error Messages:
"Unknown event operation: listEvents": Indicates the operation parameter is incorrect or unsupported.- HTTP 401 Unauthorized: Check API key and access token validity.
- HTTP 404 Not Found: The conversation ID may not exist or is incorrect.
Resolutions:
- Verify all required parameters are set correctly.
- Ensure API credentials are up to date.
- Use correct pagination tokens when fetching multiple pages.
Links and References
- Botpress API Documentation
- Botpress Events Overview
- n8n HTTP Request Node Documentation (for understanding underlying HTTP calls)