Overview
This node acts as a webhook trigger for various events related to a coaching platform's API. It listens for specific webhook events such as new chat messages, AI coach activations, user messages to the AI coach, feedback on AI coach messages, and regenerate icon clicks. When one of these events occurs, the node receives the event data via an HTTP POST request and triggers the workflow with that data.
Common scenarios where this node is beneficial include:
- Automating responses or follow-up actions when a user sends a new chat message.
- Tracking user engagement by detecting when the AI coach is activated.
- Collecting feedback on AI coach messages to improve the coaching experience.
- Responding to user interactions like clicking the regenerate icon in the chat interface.
Practical example: A workflow could be triggered whenever a user sends a new chat message, allowing the automation to analyze the message content, log it, or send notifications.
Properties
| Name | Meaning |
|---|---|
| Events | The specific webhook event to listen for. Options are: - AI Coach Activation for User - AI Coach Message Feedback Received - New Chat Message - The Regenerate Icon Click - User Message to AI Coach |
Output
The node outputs the JSON payload received from the webhook event in the json output field. This payload contains the event-specific data sent by the coaching platform's API.
If the event is one of the supported types, the entire body of the incoming webhook request is passed through as the output JSON. There is no binary data output.
Dependencies
- Requires an API key credential for authenticating requests from the coaching platform.
- The node interacts with the external coaching platform's webhook subscription API at
https://a.coachtrigger.com. - The node must be configured with the appropriate webhook URL path based on the selected event.
- The node uses HTTP methods GET, POST, and DELETE to manage webhook subscriptions on the external service.
Troubleshooting
- Invalid trigger key error: If the incoming webhook request does not contain the expected trigger key header matching the stored API key, the node will throw an "Invalid trigger key" error. Ensure the external service is configured to send the correct key.
- Unknown event error: If the node receives an event type not listed in the supported options, it will throw an "Unknown event" error. Verify that the event name matches one of the predefined options.
- Webhook subscription failures: Errors during webhook creation or deletion may occur if the external API is unreachable or credentials are invalid. Check network connectivity and API key validity.
- Missing webhook IDs: If webhook IDs are not properly stored in static workflow data, the node might fail to delete webhooks correctly. Avoid manually clearing workflow static data.
Links and References
- Coaching platform webhook API base URL:
https://a.coachtrigger.com/webhook/ - n8n documentation on creating webhook triggers: https://docs.n8n.io/nodes/trigger-nodes/webhook/