Outgoing Webhook Notifications
Send notifications from Valohai to external services when events occur
Configure Valohai to automatically send notifications to external services when executions, pipelines, or deployments change state. Perfect for integrating with Slack, custom dashboards, or triggering downstream processes.
What Are Outgoing Webhooks?
Outgoing webhooks let Valohai push notifications to your application when state changes occur. Unlike triggers (which receive webhooks to start work), outgoing webhooks send data out when work completes.
Common use cases:
Post execution status to Slack channels
Update external monitoring dashboards
Trigger downstream processes in other systems
Log events to external analytics platforms
Send alerts to on-call systems
Supported Events
Valohai can send notifications for these events:
Execution completes or fails
Task completes or fails
Pipeline completes or fails
Deployment completes or fails
You can configure separate webhooks for different event types and route them to different channels.
Quick Start: Slack Integration
The easiest way to get started is sending notifications to Slack.
Step 1: Create a Slack Webhook
Follow the Slack webhook documentation to create an incoming webhook
Complete the first 3 steps (create app, enable incoming webhooks, create webhook URL)
Copy the generated Webhook URL (looks like
https://hooks.slack.com/services/T00.../B00.../xxxxx)
Step 2: Configure in Valohai
Open your project settings
Navigate to Notifications tab
Click Channels → Create a new channel
Select type: Slack
Paste your Slack webhook URL
Give the channel a name (e.g., "team-ml-alerts")
Save the channel
Step 3: Create Notification Routing
Still in Notifications tab, click Project Notifications
Click Create new notification routing
Event: Select your desired event (e.g., "execution completes")
Channel: Select your Slack channel
Save the routing
Now Valohai will automatically post to Slack when the event occurs!
Custom Webhook Integration
You can send notifications to any service that accepts HTTP POST requests.
Step 1: Create a Custom Channel
Project Settings → Notifications → Channels
Click Create a new channel
Type: Select "Custom"
Name: Give your channel a descriptive name
Webhook URL: Enter your endpoint URL
Headers (optional): Add authentication headers if needed
Example:
Authorization: Bearer YOUR_TOKEN
Save the channel
Step 2: Create Notification Routing
Navigate to Project Notifications
Click Create new notification routing
Select your event and custom channel
Save the routing
Webhook Payload Structure
Valohai sends a JSON payload with event details. Here's an example for a completed execution:
{
"project": "016f3203-4a8c-969e-078c-52ab66947746",
"title": "Execution finished: demo/cool-tensorflow/#736 (completed)",
"type": "execution_completed",
"body": "Execution [demo/cool-tensorflow/#736](https://app.demo.com/p/valohai/cool-tensorflow/execution/0178f482-8686-fb28-8af1-3d36af38079d/) (by demouser)\nfinished with duration 11:01.",
"url": "/p/demo/cool-tensorflow/execution/0178f482-8686-fb28-8af1-3d36af38079d/",
"data": {
"valohai.execution-counter": 736,
"valohai.execution-ctime": "2021-04-21T12:58:18.119973+00:00",
"valohai.execution-duration": 660.0186445713043,
"valohai.execution-id": "0178f482-8686-fb28-8af1-3d36af38079d",
"valohai.execution-qtime": "2021-04-21T12:58:18.201116+00:00",
"valohai.execution-status": "complete",
"valohai.execution-step": "Train model (MNIST)",
"valohai.execution-title": null,
"valohai.project-id": "016f3203-4a8c-969e-078c-52ab66947746",
"valohai.project-name": "demo/cool-tensorflow",
"valohai.creator-id": 3323,
"valohai.creator-name": "demouser",
"valohai.commit-identifier": "4d34124453b680daa0ecb881bcf1bd735a3bf99d"
}
}Key Fields
type: Event type (e.g.,execution_completed,pipeline_failed)title: Human-readable event descriptionbody: Formatted message text (often with markdown links)url: Relative URL to the resource in Valohaidata: Structured metadata about the event
Use these fields to build custom integrations that extract the information you need.
Debugging Webhook Deliveries
Test Your Webhook
Before setting up routing, verify your webhook endpoint works:
Use a tool like Postman or
curlSend a test POST request with sample JSON
Confirm your endpoint receives and processes it correctly
curl -X POST https://your-webhook-url.com \
-H "Content-Type: application/json" \
-d '{"type":"test","title":"Test notification"}'Monitor Delivery Status
Valohai logs webhook delivery attempts:
Go to Project Settings → Notifications
Check the webhook delivery logs
Look for failed deliveries and error messages
Webhook endpoint requirements:
Must return 2xx status code to be considered successful
Should respond within 30 seconds
Must accept JSON payloads via POST
Security Considerations
Authentication
For custom webhooks, always use authentication:
API tokens: Include in headers (
Authorization: Bearer TOKEN)Shared secrets: Validate request origin
IP allowlisting: Restrict to Valohai's IP ranges
HTTPS Only
Always use HTTPS endpoints, never HTTP. This ensures:
Data is encrypted in transit
Authenticity of your endpoint
Protection against man-in-the-middle attacks
Token Management
Store webhook URLs and auth tokens securely:
Don't commit them to version control
Use environment variables or secret managers
Rotate tokens regularly
Use minimum required permissions
Next Steps
Need to receive webhooks? Check out Webhook Triggers
Want event-driven workflows? Explore Notification Triggers
Building custom integrations? See the REST API Guide
Last updated
Was this helpful?
