N8N Tools - Botpress API
Actions26
- Bot Actions
- Conversation Actions
- Message Actions
- User Actions
- Event Actions
- State Actions
Overview
This node integrates with the Botpress conversational AI platform, specifically enabling management of conversation events. The Create Event operation allows users to create custom events within a specific conversation. This is useful for triggering workflows, logging actions, or injecting custom data into a conversation context.
Typical use cases include:
- Sending custom event triggers to influence bot behavior.
- Logging user interactions or system states as events.
- Adding metadata or payloads to conversations for analytics or processing.
For example, you might create an event named "user_feedback" with a payload containing the user's rating and comments, which the bot can then react to or store.
Properties
| Name | Meaning |
|---|---|
| Conversation ID | The unique identifier of the conversation where the event will be created (required). |
| Additional Fields | A collection of optional fields to customize the event: |
| - Tags | Comma-separated list of tags (not used directly in this operation but available in other ops) |
| - Integration Channel | Name of the integration channel (e.g., telegram, slack) |
| - User Name | Display name for the user (not used directly here) |
| - User Picture URL | Profile picture URL for the user (not used directly here) |
| - Metadata | Additional metadata as JSON (not used directly here) |
| - State Variables | State variables as JSON object (not used directly here) |
| - Event Type | Type of event to create; defaults to "custom" if not specified. |
| - Event Payload | JSON string representing the event payload; parsed and sent as the payload field. |
| - Quick Replies | Comma-separated quick reply options (not used in this operation) |
| - Actions | Card/message actions as JSON array (not used here) |
| - Limit | Maximum number of results to return (not used here) |
| - Page Token | Token for pagination (not used here) |
Output
The node outputs the response from the Botpress API as JSON under the json property. This typically includes details about the created event such as its ID, type, timestamp, and any returned payload or status information.
No binary data output is produced by this operation.
Example output structure (simplified):
{
"id": "event-id-string",
"type": "custom",
"payload": {
// event-specific data
},
"createdAt": "2024-01-01T12:00:00Z"
}
Dependencies
- Requires an API key credential for authenticating with the Botpress API.
- Needs configuration of the Botpress API base URL, access token, bot ID, and optionally an integration ID.
- The node sends requests through a proxy service (
https://n8ntools.io/api/v1/proxy/botpress) using an additional API key for that proxy.
Troubleshooting
- Invalid Conversation ID: If the conversation ID is incorrect or does not exist, the API will likely return an error. Verify the conversation ID before running the node.
- Malformed JSON in Event Payload: The
eventPayloadmust be valid JSON. Invalid JSON strings will cause parsing errors. Use proper JSON formatting. - Missing Required Fields: The conversation ID and event type (defaults to "custom") are required. Omitting these may cause errors.
- Authentication Errors: Ensure the API key and access token credentials are correctly configured and have sufficient permissions.
- API Proxy Issues: Since requests go through a proxy, network or proxy authentication issues may cause failures.
Common error messages:
"Unknown event operation: createEvent"— indicates a misconfiguration of the operation parameter."Invalid JSON"— caused by malformed JSON in the event payload."Unauthorized"or"Forbidden"— check API keys and tokens.
Links and References
- Botpress API Documentation (general reference for Botpress REST API)
- n8n Documentation (for general usage of n8n nodes and credentials)