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 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) Step 2: Email Notification Integration Step 3: External Functions (Call External APIs) Step 4: Cloud Event Notifications (S3/GCS/Azure) S…

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

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 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) Step 2: Email Notification Integration Step 3: External Functions (Call External APIs) Step 4: Cloud Event Notifications (S3/GCS/Azure) S…

|| amount || ' from customer ' || customer_id\n )\n FROM orders_stream\n WHERE METADATA$ACTION = 'INSERT' AND amount >= 10000;","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 4: Cloud Event Notifications (S3/GCS/Azure)","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"sql"},"content":[{"text":"-- S3 event notification for auto-ingest (Snowpipe)\n-- This triggers when new files land in S3\nCREATE OR REPLACE PIPE auto_ingest_pipe\n AUTO_INGEST = TRUE\n AS\n COPY INTO raw_events\n FROM @my_s3_stage/events/\n FILE_FORMAT = my_json_format;\n\n-- Get the SQS queue ARN to configure S3 event notifications\nSHOW PIPES LIKE 'auto_ingest_pipe';\n-- Copy notification_channel value → S3 bucket event configuration\n\n-- GCS pub/sub notification\nCREATE OR REPLACE NOTIFICATION INTEGRATION gcs_notification\n TYPE = QUEUE\n NOTIFICATION_PROVIDER = GCP_PUBSUB\n ENABLED = TRUE\n GCP_PUBSUB_SUBSCRIPTION_NAME = 'projects/my-project/subscriptions/snowflake-sub';","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 5: Application-Side Event Processing","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"typescript"},"content":[{"text":"// src/snowflake/event-processor.ts\n// Poll for changes using streams (app-side consumption)\n\ninterface OrderEvent {\n ORDER_ID: number;\n CUSTOMER_ID: number;\n AMOUNT: number;\n METADATA$ACTION: 'INSERT' | 'DELETE';\n}\n\nasync function processOrderEvents(conn: snowflake.Connection) {\n // Check if stream has data\n const hasData = await query\u003c{ HAS_DATA: boolean }>(conn,\n \"SELECT SYSTEM$STREAM_HAS_DATA('orders_stream') AS HAS_DATA\"\n );\n if (!hasData.rows[0]?.HAS_DATA) return;\n\n // Consume stream within a transaction\n await query(conn, 'BEGIN');\n try {\n const events = await query\u003cOrderEvent>(conn,\n 'SELECT * FROM orders_stream'\n );\n\n for (const event of events.rows) {\n if (event.METADATA$ACTION === 'INSERT' && event.AMOUNT >= 10000) {\n await notifySlack(`High-value order: ${event.AMOUNT}`);\n }\n }\n\n // Advance the stream offset by writing to target\n await query(conn, `\n INSERT INTO processed_orders\n SELECT order_id, customer_id, amount, CURRENT_TIMESTAMP()\n FROM orders_stream WHERE METADATA$ACTION = 'INSERT'\n `);\n\n await query(conn, 'COMMIT');\n } catch (err) {\n await query(conn, 'ROLLBACK');\n throw err;\n }\n}","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Error Handling","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Issue","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Cause","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Solution","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Alert not firing","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Alert suspended","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"ALTER ALERT x RESUME","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Email not delivered","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Recipient not in allowlist","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Add to ","type":"text"},{"text":"ALLOWED_RECIPIENTS","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"External function timeout","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"API too slow","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Increase timeout, check API health","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Snowpipe not triggering","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"S3 event config missing","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Configure SQS notification from ","type":"text"},{"text":"SHOW PIPES","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Stream data loss","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Stream stale","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Recreate stream, increase retention","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Resources","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Snowflake Alerts","type":"text","marks":[{"type":"link","attrs":{"href":"https://docs.snowflake.com/en/user-guide/alerts","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"External Functions","type":"text","marks":[{"type":"link","attrs":{"href":"https://docs.snowflake.com/en/sql-reference/external-functions","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Snowpipe Auto-Ingest","type":"text","marks":[{"type":"link","attrs":{"href":"https://docs.snowflake.com/en/user-guide/data-load-snowpipe-intro","title":null}}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Next Steps","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"For performance optimization, see ","type":"text"},{"text":"snowflake-performance-tuning","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]},"metadata":{"date":"2026-06-05","name":"snowflake-webhooks-events","tags":["saas","data-warehouse","analytics","snowflake"],"author":"@skillopedia","source":{"stars":2275,"repo_name":"claude-code-plugins-plus-skills","origin_url":"https://github.com/jeremylongshore/claude-code-plugins-plus-skills/blob/HEAD/plugins/saas-packs/snowflake-pack/skills/snowflake-webhooks-events/SKILL.md","repo_owner":"jeremylongshore","body_sha256":"c9153ec5790946adb512d6503f7bbfb1ab8f8948fd4362682f0abb6be36467ad","cluster_key":"eadcefdfba501cf0208b3db6756adad5c98818ba087407855b3201d23fb571e6","clean_bundle":{"format":"clean-skill-bundle-v1","source":"jeremylongshore/claude-code-plugins-plus-skills/plugins/saas-packs/snowflake-pack/skills/snowflake-webhooks-events/SKILL.md","bundle_sha256":"f9849ee8bf2b239424ff8aa8c11b9e00a1616eda92467846f8d8a5b59cc03a5a","attachment_count":0,"text_attachments":0,"binary_attachments":0},"cluster_size":1,"skill_md_path":"plugins/saas-packs/snowflake-pack/skills/snowflake-webhooks-events/SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"data-analytics","category_label":"Data"},"exact_dupes_collapsed_into_this":0},"license":"MIT","version":"v1","category":"data-analytics","import_tag":"clean-skills-v1","description":"Implement Snowflake event-driven patterns with alerts, notifications, and external functions.\nUse when setting up Snowflake alerts, email notifications, external API calls,\nor event-driven pipelines triggered by Snowflake data changes.\nTrigger with phrases like \"snowflake alerts\", \"snowflake notifications\",\n\"snowflake events\", \"snowflake external function\", \"snowflake email\".\n","allowed-tools":"Read, Write, Edit, Bash(curl:*)","compatibility":"Designed for Claude Code"}},"renderedAt":1782981001259}

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 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) Step 2: Email Notification Integration Step 3: External Functions (Call External APIs) Step 4: Cloud Event Notifications (S3/GCS/Azure) S…