Event subscriptions (7)
Last updated Apr 23, 2026 allow you to receive messages when events occur across your Cloudflare account. Cloudflare products (e.g., KV, Workers AI, Workers) can publish structured events to a queue, which you can then consume with Workers or HTTP pull consumers to build custom workflows, integrations, or logic.
For more information on Event Subscriptions, refer to the management guide.
Send build notifications
You can deploy a Worker that consumes build events and sends notifications to Slack, Discord, or any webhook endpoint:
The template sends notifications for:
- Successful builds with preview or live deployment URLs
- Failed builds with error messages
- Cancelled builds

You can customize the Worker to format messages for your webhook provider. For setup instructions, refer to the template README ↗︎.
Available Workers Builds events
build.started
Triggered when a build starts.
Example:
{
"type": "cf.workersBuilds.worker.build.started",
"source": {
"type": "workersBuilds.worker",
"workerName": "my-worker"
},
"payload": {
"buildUuid": "build-12345678-90ab-cdef-1234-567890abcdef",
"status": "running",
"buildOutcome": null,
"createdAt": "2025-05-01T02:48:57.132Z",
"initializingAt": "2025-05-01T02:48:58.132Z",
"runningAt": "2025-05-01T02:48:59.132Z",
"stoppedAt": null,
"buildTriggerMetadata": {
"buildTriggerSource": "push_event",
"branch": "main",
"commitHash": "abc123def456",
"commitMessage": "Fix bug in authentication",
"author": "developer@example.com",
"buildCommand": "npm run build",
"deployCommand": "wrangler deploy",
"rootDirectory": "/",
"repoName": "my-worker-repo",
"providerAccountName": "github-user",
"providerType": "github"
}
},
"metadata": {
"accountId": "f9f79265f388666de8122cfb508d7776",
"eventSubscriptionId": "1830c4bb612e43c3af7f4cada31fbf3f",
"eventSchemaVersion": 1,
"eventTimestamp": "2025-05-01T02:48:57.132Z"
}
}
build.failed
Triggered when a build fails.
Example:
{
"type": "cf.workersBuilds.worker.build.failed",
"source": {
"type": "workersBuilds.worker",
"workerName": "my-worker"
},
"payload": {
"buildUuid": "build-12345678-90ab-cdef-1234-567890abcdef",
"status": "failed",
"buildOutcome": "failure",
"createdAt": "2025-05-01T02:48:57.132Z",
"initializingAt": "2025-05-01T02:48:58.132Z",
"runningAt": "2025-05-01T02:48:59.132Z",
"stoppedAt": "2025-05-01T02:50:00.132Z",
"buildTriggerMetadata": {
"buildTriggerSource": "push_event",
"branch": "main",
"commitHash": "abc123def456",
"commitMessage": "Fix bug in authentication",
"author": "developer@example.com",
"buildCommand": "npm run build",
"deployCommand": "wrangler deploy",
"rootDirectory": "/",
"repoName": "my-worker-repo",
"providerAccountName": "github-user",
"providerType": "github"
}
},
"metadata": {
"accountId": "f9f79265f388666de8122cfb508d7776",
"eventSubscriptionId": "1830c4bb612e43c3af7f4cada31fbf3f",
"eventSchemaVersion": 1,
"eventTimestamp": "2025-05-01T02:48:57.132Z"
}
}
build.canceled
Triggered when a build is canceled.
Example:
{
"type": "cf.workersBuilds.worker.build.canceled",
"source": {
"type": "workersBuilds.worker",
"workerName": "my-worker"
},
"payload": {
"buildUuid": "build-12345678-90ab-cdef-1234-567890abcdef",
"status": "canceled",
"buildOutcome": "canceled",
"createdAt": "2025-05-01T02:48:57.132Z",
"initializingAt": "2025-05-01T02:48:58.132Z",
"runningAt": "2025-05-01T02:48:59.132Z",
"stoppedAt": "2025-05-01T02:49:30.132Z",
"buildTriggerMetadata": {
"buildTriggerSource": "push_event",
"branch": "main",
"commitHash": "abc123def456",
"commitMessage": "Fix bug in authentication",
"author": "developer@example.com",
"buildCommand": "npm run build",
"deployCommand": "wrangler deploy",
"rootDirectory": "/",
"repoName": "my-worker-repo",
"providerAccountName": "github-user",
"providerType": "github"
}
},
"metadata": {
"accountId": "f9f79265f388666de8122cfb508d7776",
"eventSubscriptionId": "1830c4bb612e43c3af7f4cada31fbf3f",
"eventSchemaVersion": 1,
"eventTimestamp": "2025-05-01T02:48:57.132Z"
}
}
build.succeeded
Triggered when a build succeeds.
Example:
{
"type": "cf.workersBuilds.worker.build.succeeded",
"source": {
"type": "workersBuilds.worker",
"workerName": "my-worker"
},
"payload": {
"buildUuid": "build-12345678-90ab-cdef-1234-567890abcdef",
"status": "success",
"buildOutcome": "success",
"createdAt": "2025-05-01T02:48:57.132Z",
"initializingAt": "2025-05-01T02:48:58.132Z",
"runningAt": "2025-05-01T02:48:59.132Z",
"stoppedAt": "2025-05-01T02:50:15.132Z",
"buildTriggerMetadata": {
"buildTriggerSource": "push_event",
"branch": "main",
"commitHash": "abc123def456",
"commitMessage": "Fix bug in authentication",
"author": "developer@example.com",
"buildCommand": "npm run build",
"deployCommand": "wrangler deploy",
"rootDirectory": "/",
"repoName": "my-worker-repo",
"providerAccountName": "github-user",
"providerType": "github"
}
},
"metadata": {
"accountId": "f9f79265f388666de8122cfb508d7776",
"eventSubscriptionId": "1830c4bb612e43c3af7f4cada31fbf3f",
"eventSchemaVersion": 1,
"eventTimestamp": "2025-05-01T02:48:57.132Z"
}
}
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/workers/ci-cd/builds/event-subscriptions/#page","headline":"Event subscriptions","description":"Subscribe to Workers Builds events and send notifications to Slack, Discord, or webhook endpoints.","url":"https://developers.cloudflare.com/workers/ci-cd/builds/event-subscriptions/","inLanguage":"en","image":"https://developers.cloudflare.com/workers/ci-cd/builds/event-subscriptions/og.png?v=18a0cdc2adc9e5e4","dateModified":"2026-04-23","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
description: Learn how to add and manage your Git integration for Workers Builds, including Cloudflare Artifacts. title: Git integration image: https://developers.cloudflare.com/workers/ci-cd/builds/git-integration/og.png?v=a311d5ba0fb1f71f
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/workers/llms.txt
Use this file to discover all available pages before exploring further.
