snowflake-webhooks-events
Implement Snowflake event-driven patterns with alerts, notifications, and external functions. Use when setting up Snowflake alerts, email notifications, external API calls, or event-driven pipelines triggered by Snowflake data changes. Trigger with phrases like "snowflake alerts", "snowflake notifications", "snowflake events", "snowflake external function", "snowflake email".
Best use case
snowflake-webhooks-events is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Implement Snowflake event-driven patterns with alerts, notifications, and external functions. Use when setting up Snowflake alerts, email notifications, external API calls, or event-driven pipelines triggered by Snowflake data changes. Trigger with phrases like "snowflake alerts", "snowflake notifications", "snowflake events", "snowflake external function", "snowflake email".
Teams using snowflake-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/snowflake-webhooks-events/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How snowflake-webhooks-events Compares
| Feature / Agent | snowflake-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?
Implement Snowflake event-driven patterns with alerts, notifications, and external functions. Use when setting up Snowflake alerts, email notifications, external API calls, or event-driven pipelines triggered by Snowflake data changes. Trigger with phrases like "snowflake alerts", "snowflake notifications", "snowflake events", "snowflake external function", "snowflake email".
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
# Snowflake Webhooks & Events
## Overview
Snowflake uses alerts, email notifications, external functions, and notification integrations for event-driven patterns (not traditional webhooks).
## Prerequisites
- ACCOUNTADMIN or role with `CREATE ALERT` privilege
- Email notification integration configured
- For external functions: API Gateway (AWS/GCP/Azure) configured
- For S3/GCS event notifications: Snowpipe configured
## Instructions
### Step 1: Snowflake Alerts (Built-in Event System)
```sql
-- Alert when daily revenue drops below threshold
CREATE OR REPLACE ALERT revenue_drop_alert
WAREHOUSE = ANALYTICS_WH
SCHEDULE = '60 MINUTE'
IF (EXISTS (
SELECT 1
FROM daily_order_metrics
WHERE metric_date = CURRENT_DATE()
AND total_revenue < (
SELECT AVG(total_revenue) * 0.5
FROM daily_order_metrics
WHERE metric_date BETWEEN DATEADD(days, -30, CURRENT_DATE())
AND DATEADD(days, -1, CURRENT_DATE())
)
))
THEN
CALL SYSTEM$SEND_EMAIL(
'revenue_notifications',
'oncall@company.com',
'Revenue Alert: Below 50% of 30-day average',
'Daily revenue has dropped significantly. Check dashboard.'
);
ALTER ALERT revenue_drop_alert RESUME;
-- Alert when warehouse credits exceed daily budget
CREATE OR REPLACE ALERT credit_usage_alert
WAREHOUSE = ANALYTICS_WH
SCHEDULE = '30 MINUTE'
IF (EXISTS (
SELECT 1
FROM SNOWFLAKE.ACCOUNT_USAGE.WAREHOUSE_METERING_HISTORY
WHERE start_time >= CURRENT_DATE()
GROUP BY ALL
HAVING SUM(credits_used) > 100 -- Daily budget: 100 credits
))
THEN
CALL SYSTEM$SEND_EMAIL(
'ops_notifications',
'ops@company.com',
'Snowflake Credit Alert',
'Daily credit usage has exceeded 100 credits.'
);
-- Monitor alert history
SELECT *
FROM TABLE(INFORMATION_SCHEMA.ALERT_HISTORY(
SCHEDULED_TIME_RANGE_START => DATEADD(hours, -24, CURRENT_TIMESTAMP())
))
ORDER BY scheduled_time DESC;
```
### Step 2: Email Notification Integration
```sql
-- Set up email notification integration
CREATE OR REPLACE NOTIFICATION INTEGRATION email_notifications
TYPE = EMAIL
ENABLED = TRUE
ALLOWED_RECIPIENTS = (
'oncall@company.com',
'ops@company.com',
'data-team@company.com'
);
-- Send email from stored procedure
CREATE OR REPLACE PROCEDURE send_data_quality_report()
RETURNS VARCHAR
LANGUAGE SQL
AS
$$
BEGIN
LET row_count INTEGER;
SELECT COUNT(*) INTO :row_count
FROM orders WHERE order_date = CURRENT_DATE() AND amount IS NULL;
IF (row_count > 0) THEN
CALL SYSTEM$SEND_EMAIL(
'email_notifications',
'data-team@company.com',
'Data Quality Issue: NULL amounts detected',
row_count || ' orders have NULL amounts today.'
);
RETURN 'Alert sent for ' || row_count || ' records';
END IF;
RETURN 'No issues found';
END;
$$;
```
### Step 3: External Functions (Call External APIs)
```sql
-- Create API integration for external function
CREATE OR REPLACE API INTEGRATION my_api_integration
API_PROVIDER = aws_api_gateway
API_AWS_ROLE_ARN = 'arn:aws:iam::123456789:role/snowflake-api-role'
ENABLED = TRUE
API_ALLOWED_PREFIXES = ('https://api.execute-api.us-east-1.amazonaws.com/');
-- Create external function that calls your API
CREATE OR REPLACE EXTERNAL FUNCTION notify_slack(message VARCHAR)
RETURNS VARIANT
API_INTEGRATION = my_api_integration
AS 'https://api.execute-api.us-east-1.amazonaws.com/prod/slack-notify';
-- Use in a task to notify on data changes
CREATE OR REPLACE TASK notify_new_high_value_orders
WAREHOUSE = ANALYTICS_WH
SCHEDULE = '15 MINUTE'
WHEN SYSTEM$STREAM_HAS_DATA('orders_stream')
AS
SELECT notify_slack(
'New high-value order: $' || amount || ' from customer ' || customer_id
)
FROM orders_stream
WHERE METADATA$ACTION = 'INSERT' AND amount >= 10000;
```
### Step 4: Cloud Event Notifications (S3/GCS/Azure)
```sql
-- S3 event notification for auto-ingest (Snowpipe)
-- This triggers when new files land in S3
CREATE OR REPLACE PIPE auto_ingest_pipe
AUTO_INGEST = TRUE
AS
COPY INTO raw_events
FROM @my_s3_stage/events/
FILE_FORMAT = my_json_format;
-- Get the SQS queue ARN to configure S3 event notifications
SHOW PIPES LIKE 'auto_ingest_pipe';
-- Copy notification_channel value → S3 bucket event configuration
-- GCS pub/sub notification
CREATE OR REPLACE NOTIFICATION INTEGRATION gcs_notification
TYPE = QUEUE
NOTIFICATION_PROVIDER = GCP_PUBSUB
ENABLED = TRUE
GCP_PUBSUB_SUBSCRIPTION_NAME = 'projects/my-project/subscriptions/snowflake-sub';
```
### Step 5: Application-Side Event Processing
```typescript
// src/snowflake/event-processor.ts
// Poll for changes using streams (app-side consumption)
interface OrderEvent {
ORDER_ID: number;
CUSTOMER_ID: number;
AMOUNT: number;
METADATA$ACTION: 'INSERT' | 'DELETE';
}
async function processOrderEvents(conn: snowflake.Connection) {
// Check if stream has data
const hasData = await query<{ HAS_DATA: boolean }>(conn,
"SELECT SYSTEM$STREAM_HAS_DATA('orders_stream') AS HAS_DATA"
);
if (!hasData.rows[0]?.HAS_DATA) return;
// Consume stream within a transaction
await query(conn, 'BEGIN');
try {
const events = await query<OrderEvent>(conn,
'SELECT * FROM orders_stream'
);
for (const event of events.rows) {
if (event.METADATA$ACTION === 'INSERT' && event.AMOUNT >= 10000) {
await notifySlack(`High-value order: $${event.AMOUNT}`);
}
}
// Advance the stream offset by writing to target
await query(conn, `
INSERT INTO processed_orders
SELECT order_id, customer_id, amount, CURRENT_TIMESTAMP()
FROM orders_stream WHERE METADATA$ACTION = 'INSERT'
`);
await query(conn, 'COMMIT');
} catch (err) {
await query(conn, 'ROLLBACK');
throw err;
}
}
```
## Error Handling
| Issue | Cause | Solution |
|-------|-------|----------|
| Alert not firing | Alert suspended | `ALTER ALERT x RESUME` |
| Email not delivered | Recipient not in allowlist | Add to `ALLOWED_RECIPIENTS` |
| External function timeout | API too slow | Increase timeout, check API health |
| Snowpipe not triggering | S3 event config missing | Configure SQS notification from `SHOW PIPES` |
| Stream data loss | Stream stale | Recreate stream, increase retention |
## Resources
- [Snowflake Alerts](https://docs.snowflake.com/en/user-guide/alerts)
- [External Functions](https://docs.snowflake.com/en/sql-reference/external-functions)
- [Snowpipe Auto-Ingest](https://docs.snowflake.com/en/user-guide/data-load-snowpipe-intro)
## Next Steps
For performance optimization, see `snowflake-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".