databricks-webhooks-events
Configure Databricks job notifications, webhooks, and event handling. Use when setting up Slack/Teams notifications, configuring alerts, or integrating Databricks events with external systems. Trigger with phrases like "databricks webhook", "databricks notifications", "databricks alerts", "job failure notification", "databricks slack".
Best use case
databricks-webhooks-events is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Configure Databricks job notifications, webhooks, and event handling. Use when setting up Slack/Teams notifications, configuring alerts, or integrating Databricks events with external systems. Trigger with phrases like "databricks webhook", "databricks notifications", "databricks alerts", "job failure notification", "databricks slack".
Teams using databricks-webhooks-events should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/databricks-webhooks-events/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How databricks-webhooks-events Compares
| Feature / Agent | databricks-webhooks-events | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Configure Databricks job notifications, webhooks, and event handling. Use when setting up Slack/Teams notifications, configuring alerts, or integrating Databricks events with external systems. Trigger with phrases like "databricks webhook", "databricks notifications", "databricks alerts", "job failure notification", "databricks slack".
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
Best AI Skills for Claude
Explore the best AI skills for Claude and Claude Code across coding, research, workflow automation, documentation, and agent operations.
ChatGPT vs Claude for Agent Skills
Compare ChatGPT and Claude for AI agent skills across coding, writing, research, and reusable workflow execution.
SKILL.md Source
# Databricks Webhooks & Events
## Overview
Configure notifications and event-driven workflows for Databricks jobs. Covers notification destinations (Slack, Teams, PagerDuty, email, generic webhooks), job lifecycle events, SQL alerts with automated triggers, and system table queries for event auditing.
## Prerequisites
- Databricks workspace admin access (for notification destinations)
- Webhook endpoint URL (Slack incoming webhook, Teams connector, etc.)
- Job permissions for notification configuration
## Instructions
### Step 1: Create Notification Destinations
```python
from databricks.sdk import WorkspaceClient
from databricks.sdk.service.settings import (
CreateNotificationDestinationRequest,
SlackConfig, EmailConfig, GenericWebhookConfig,
)
w = WorkspaceClient()
# Slack destination
slack = w.notification_destinations.create(
display_name="Engineering Slack",
config=SlackConfig(url="https://hooks.slack.com/services/T00/B00/xxxx"),
)
# Email destination
email = w.notification_destinations.create(
display_name="Oncall Email",
config=EmailConfig(addresses=["oncall@company.com", "data-team@company.com"]),
)
# Generic webhook (PagerDuty, custom endpoint)
pagerduty = w.notification_destinations.create(
display_name="PagerDuty",
config=GenericWebhookConfig(
url="https://events.pagerduty.com/integration/YOUR_KEY/enqueue",
),
)
print(f"Slack: {slack.id}, Email: {email.id}, PD: {pagerduty.id}")
```
### Step 2: Attach Notifications to Jobs
```python
from databricks.sdk.service.jobs import (
JobEmailNotifications, WebhookNotifications, Webhook,
)
# Update existing job with notifications
w.jobs.update(
job_id=123,
new_settings={
"email_notifications": JobEmailNotifications(
on_start=["team@company.com"],
on_success=["team@company.com"],
on_failure=["oncall@company.com", "team@company.com"],
no_alert_for_skipped_runs=True,
),
"webhook_notifications": WebhookNotifications(
on_start=[Webhook(id=slack.id)],
on_success=[Webhook(id=slack.id)],
on_failure=[Webhook(id=slack.id), Webhook(id=pagerduty.id)],
),
},
)
```
Or declaratively in Asset Bundles:
```yaml
# resources/jobs.yml
resources:
jobs:
daily_etl:
email_notifications:
on_failure: ["oncall@company.com"]
webhook_notifications:
on_failure:
- id: "<notification-destination-id>"
```
### Step 3: Build Custom Webhook Handler
Receive Databricks job events at your own endpoint.
```python
# webhook_handler.py — FastAPI endpoint
from fastapi import FastAPI, Request
import httpx
app = FastAPI()
@app.post("/databricks/webhook")
async def handle_event(request: Request):
payload = await request.json()
event_type = payload.get("event_type") # "jobs.on_failure", "jobs.on_success"
run_id = payload.get("run", {}).get("run_id")
job_name = payload.get("job", {}).get("name")
result = payload.get("run", {}).get("result_state") # SUCCESS, FAILED, TIMED_OUT
error_msg = payload.get("run", {}).get("state_message", "")
if result == "FAILED":
# Route to PagerDuty
await httpx.AsyncClient().post(
"https://events.pagerduty.com/v2/enqueue",
json={
"routing_key": "YOUR_INTEGRATION_KEY",
"event_action": "trigger",
"payload": {
"summary": f"Databricks job failed: {job_name}",
"severity": "critical",
"source": f"databricks-run-{run_id}",
"custom_details": {"error": error_msg, "run_id": run_id},
},
},
)
return {"status": "ok"}
```
### Step 4: Monitor Events via System Tables
Query `system.access.audit` for event monitoring without webhooks.
```sql
-- Recent job events (last 6 hours)
SELECT event_time, user_identity.email AS actor,
action_name, request_params.job_id, request_params.run_id,
response.status_code, response.error_message
FROM system.access.audit
WHERE service_name = 'jobs'
AND action_name IN ('runNow', 'submitRun', 'cancelRun', 'repairRun')
AND event_date >= current_date()
AND event_time > current_timestamp() - INTERVAL 6 HOURS
ORDER BY event_time DESC;
-- Permission changes (security audit)
SELECT event_time, user_identity.email, action_name, request_params
FROM system.access.audit
WHERE action_name IN ('changeJobPermissions', 'changeClusterPermissions',
'updatePermissions', 'grantPermission')
AND event_date >= current_date() - 7
ORDER BY event_time DESC;
```
### Step 5: SQL Alerts with Automated Triggers
Create alerts that fire when query conditions are met.
```sql
-- Alert query: detect excessive failures
-- Create in SQL Editor > Alerts > New Alert
-- Trigger: failure_count > 3
-- Schedule: every 15 minutes
-- Destination: Slack notification destination
SELECT COUNT(*) AS failure_count,
COLLECT_LIST(DISTINCT job_name) AS failed_jobs
FROM (
SELECT j.name AS job_name
FROM system.lakeflow.job_run_timeline r
JOIN system.lakeflow.jobs j ON r.job_id = j.job_id
WHERE r.result_state = 'FAILED'
AND r.start_time > current_timestamp() - INTERVAL 1 HOUR
);
```
```python
# Create alert programmatically
alert = w.alerts.create(
name="High Job Failure Rate",
query_id="<saved-query-id>",
options={"column": "failure_count", "op": ">", "value": "3"},
rearm=900, # Re-alert after 15 min if still triggered
)
```
### Step 6: Slack Message Formatter
```python
def format_slack_message(payload: dict) -> dict:
"""Format Databricks job event as a rich Slack Block Kit message."""
run = payload.get("run", {})
job = payload.get("job", {})
status = run.get("result_state", "UNKNOWN")
emoji = {"SUCCESS": ":white_check_mark:", "FAILED": ":x:", "TIMED_OUT": ":hourglass:"}.get(status, ":question:")
duration_sec = run.get("execution_duration", 0) // 1000
return {
"blocks": [
{"type": "header", "text": {"type": "plain_text", "text": f"{emoji} {job.get('name', 'Unknown')}"}},
{"type": "section", "fields": [
{"type": "mrkdwn", "text": f"*Status:* {status}"},
{"type": "mrkdwn", "text": f"*Run ID:* {run.get('run_id')}"},
{"type": "mrkdwn", "text": f"*Duration:* {duration_sec}s"},
{"type": "mrkdwn", "text": f"*Error:* {run.get('state_message', 'none')[:200]}"},
]},
]
}
```
## Output
- Notification destinations registered (Slack, email, PagerDuty)
- Job lifecycle notifications (on_start, on_success, on_failure)
- Custom webhook handler for advanced routing
- System table queries for event auditing
- SQL alerts with automated triggers and destinations
## Error Handling
| Error | Cause | Solution |
|-------|-------|----------|
| `RESOURCE_DOES_NOT_EXIST` for destination | Destination deleted or wrong workspace | `w.notification_destinations.list()` to verify |
| Webhook not triggered | URL unreachable from Databricks network | Check firewall; Databricks needs outbound access to webhook URL |
| Duplicate notifications | Same destination on job AND task level | Configure at job level only |
| Alert never fires | Query returns 0 rows or wrong column | Test query in SQL Editor first |
| System tables empty | Unity Catalog not enabled | Enable system tables in Account Console |
## Examples
### List All Notification Destinations
```bash
databricks notification-destinations list --output json | \
jq '.[] | {name: .display_name, type: .destination_type, id: .id}'
```
## Resources
- [Job Notifications](https://docs.databricks.com/aws/en/jobs/monitor)
- [Notification Destinations](https://docs.databricks.com/aws/en/admin/notification-destinations)
- [System Tables](https://docs.databricks.com/aws/en/admin/system-tables/)
- [SQL Alerts](https://docs.databricks.com/aws/en/sql/user/alerts/)
## Next Steps
For performance tuning, see `databricks-performance-tuning`.Related Skills
workhuman-webhooks-events
Workhuman webhooks events for employee recognition and rewards API. Use when integrating Workhuman Social Recognition, or building recognition workflows with HRIS systems. Trigger: "workhuman webhooks events".
wispr-webhooks-events
Wispr Flow webhooks events for voice-to-text API integration. Use when integrating Wispr Flow dictation, WebSocket streaming, or building voice-powered applications. Trigger: "wispr webhooks events".
windsurf-webhooks-events
Build Windsurf extensions and integrate with VS Code extension API events. Use when building custom Windsurf extensions, tracking editor events, or integrating Windsurf with external tools via extension development. Trigger with phrases like "windsurf extension", "windsurf events", "windsurf plugin", "build windsurf extension", "windsurf API".
webflow-webhooks-events
Implement Webflow webhook registration, signature verification, and event handling for form_submission, site_publish, ecomm_new_order, page_created, and more. Use when setting up webhook endpoints, implementing event-driven workflows, or handling Webflow notifications. Trigger with phrases like "webflow webhook", "webflow events", "webflow webhook signature", "handle webflow events", "webflow notifications".
vercel-webhooks-events
Implement Vercel webhook handling with signature verification and event processing. Use when setting up webhook endpoints, processing deployment events, or building integrations that react to Vercel deployment lifecycle. Trigger with phrases like "vercel webhook", "vercel events", "vercel deployment.ready", "handle vercel events", "vercel webhook signature".
veeva-webhooks-events
Veeva Vault webhooks events for REST API and clinical operations. Use when working with Veeva Vault document management and CRM. Trigger: "veeva webhooks events".
vastai-webhooks-events
Build event-driven workflows around Vast.ai instance lifecycle events. Use when monitoring instance status changes, implementing auto-recovery, or building event-driven GPU orchestration. Trigger with phrases like "vastai events", "vastai instance monitoring", "vastai status changes", "vastai lifecycle events".
twinmind-webhooks-events
Handle TwinMind meeting events including transcription completion, action item extraction, and calendar sync notifications. Use when implementing webhooks events, or managing TwinMind meeting AI operations. Trigger with phrases like "twinmind webhooks events", "twinmind webhooks events".
together-webhooks-events
Together AI webhooks events for inference, fine-tuning, and model deployment. Use when working with Together AI's OpenAI-compatible API. Trigger: "together webhooks events".
techsmith-webhooks-events
TechSmith webhooks events for Snagit COM API and Camtasia automation. Use when working with TechSmith screen capture and video editing automation. Trigger: "techsmith webhooks events".
supabase-webhooks-events
Implement Supabase database webhooks, pg_net async HTTP, LISTEN/NOTIFY, and Edge Function event handlers with signature verification. Use when setting up database webhooks for INSERT/UPDATE/DELETE events, sending HTTP requests from PostgreSQL triggers, handling Realtime postgres_changes as an event source, or building event-driven architectures. Trigger with phrases like "supabase webhook", "database events", "pg_net trigger", "supabase LISTEN NOTIFY", "webhook signature verify", "supabase event-driven", "supabase_functions.http_request".
stackblitz-webhooks-events
WebContainer lifecycle events: server-ready, port changes, error handling. Use when working with WebContainers or StackBlitz SDK. Trigger: "webcontainer events".