Event Trigger - Captain
AI-generatedOverview
This node acts as a webhook trigger that listens for POST requests on a specified path. It is designed to trigger workflows when an event occurs at the given path, making it useful for integrating external event sources that send data via HTTP POST. For example, it can be used to trigger a workflow when a specific event happens in an external system that sends event data to the configured webhook URL.
Use Case Examples
- Trigger a workflow when a new user signs up on an external platform that sends user data to the webhook path.
- Trigger a workflow when a payment event occurs and the payment system sends a POST request to the webhook.
Properties
| Name | Meaning |
|---|---|
| workFlowPath | The URL path on which the webhook listens for incoming POST requests containing event data. |
Output
JSON
workflowData- The JSON array containing the event data received from the POST request body.
Dependencies
- Requires an environment variable UNEXO_Event_Trigger_Token for Bearer token authentication to validate incoming requests.
Troubleshooting
- If the webhook receives a request with a method other than POST, it throws an error 'Only POST requests are allowed for this webhook.' Ensure the external system sends POST requests.
- If the authorization header does not match the expected Bearer token from the environment variable, it throws 'Invalid authorization token'. Verify the token is correctly set in the environment and matches the sender's token.