Setup Instructions
Follow these steps to enable and configure webhook monitoring for your webhooks.
Enabling Monitoring
To enable monitoring for a webhook:
- While creating or editing a webhook, click the Enable Monitoring button.
- This will open the "Enable Webhook Monitoring" configuration slider on the right.
Configuration Steps
The configuration slider outlines the three steps required to integrate your service with Syntropic's monitoring:
1. Include Log ID in Your Payload
Syntropic needs a way to associate the status report from your service back to the specific webhook execution that triggered it. To achieve this, you must include a unique identifier in the payload of your webhook.
-
Modify the Payload definition for your webhook to include the
{{webhook_log_id}}placeholder. Syntropic will automatically replace this placeholder with a unique ID each time the webhook is sent.{"data": "your_data",// Add this line"webhook_log_id": "{{webhook_log_id}}"} -
Your receiving service should parse this
webhook_log_idfrom the incoming request payload and store it for later use.
2. Generate a Webhook Token
To securely report the status back to Syntropic, your service needs to authenticate its requests.
- Click the Generate button in the slider.
- A unique authentication token, scoped specifically to this webhook, will be generated and displayed in the text box. Copy this token and store it securely in your service's configuration. You will need it to authorize the status reporting requests for this webhook.
- Generating the token also automatically updates the sample code snippets in the next step with the correct API endpoint and placeholders.
3. Report Webhook Status
Your service must send a POST request back to the Syntropic API endpoint (https://api.getsyntropic.com/api/v1/webhook-responses/status) upon completion of the job triggered by the webhook.
- The slider provides sample code snippets in Python, cURL, and Node.js (selectable via the dropdown) that demonstrate how to structure this request.
- You need to integrate this logic into your service.
Request Body Fields:
id(string, required): Thewebhook_log_idreceived in the original webhook payload.status(string, required): Must be either'success'or'error'.error_message(string, optional): Provide a descriptive error message if the status is'error'.
Once these steps are completed in your service, click the Enable Monitoring button at the bottom of the slider to save the configuration in Syntropic.
Your webhook executions will now be tracked in the Monitoring tab for the corresponding table.