Skip to main content

Custom Workflows

To send Causely notifications to a custom destination, you route them through CauselyBot, an open source webhook service that receives the Causely notification payload and forwards it to the endpoints you configure. For arbitrary HTTP endpoints (n8n, Linear, custom services), use CauselyBot's generic hook type.

Routing and rules for Managed Notifications are configured in the Causely UI:
Set up notification routing in the UI

Setup

Step 1: Enable notifications in values.yaml

In your causely-values.yaml, enable mediator notifications:

mediator:
notifications:
enabled: true

Apply the change:

helm upgrade --install causely --create-namespace \
oci://us-docker.pkg.dev/public-causely/public/causely \
--version <version> --namespace=causely --values ./causely-values.yaml

Step 2: Deploy CauselyBot

Create a causelybot-values.yaml with your webhook configuration. For a generic HTTP endpoint:

auth:
token: "<YourCauselyBotToken>" # Required - define your token here and then use in the CauselyBot secret creation in step 3.

webhooks:
- name: "my-generic-webhook" # Provide a friendly name for the webhook
hook_type: "generic"
url: "https://<YourWebHookEndpoint>"

See the CauselyBot documentation for all supported hook types and options.

Install CauselyBot via Helm:

helm upgrade --install causelybot ./causelybot/helm/causelybot \
--namespace causelybot --values causelybot-values.yaml

Step 3: Create the notification Secret

Create a Kubernetes Secret in the causely namespace that points Causely at CauselyBot (use stringData so values are plain text; if you use data, values must be base64-encoded):

apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: causelybot-notification-config
namespace: causely
labels:
causely.ai/notif-config: CauselyBot #Required
stringData:
notif_config_name: causelybot-webhook
notif_config_global: "false"
notif_config_type: CauselyBot
notif_config_url: https://<CauselyBotURL>/webhook # or if in-cluster: http://causelybot.causelybot.svc.cluster.local.:5000/webhook
notif_config_token: "<YourCauselyBotToken>"
notif_config_filters: "[]"
notif_config_filters_enabled: "true"
note

notif_config_token must match the auth.token you set in CauselyBot's configuration. Causely sends it as Authorization: Bearer <token> so CauselyBot can authenticate the request.

Filtering notifications (notif_config_filters)

notif_config_filters is a JSON array that controls which notifications are forwarded to CauselyBot. When notif_config_filters_enabled is "false" or the array is empty ("[]"), all notifications pass through.

Multiple filters are ANDed: a notification must match all filters to be forwarded.

Filterable fields

FieldDescription
severity"Low", "Medium", "High", or "Critical"
nameProblem name (for example, "Malfunction", "CPUCongested")
entity.typeEntity type (for example, "KubernetesService", "ApplicationInstance")
labels.k8s.cluster.nameKubernetes cluster name
labels.k8s.namespace.nameKubernetes namespace name
impactsSLOtrue if the notification includes impacted SLOs

Supported operators: equals, not_equals, in, not_in

Examples

Forward only High and Critical severity notifications:

notif_config_filters: '[{"field":"severity","operator":"in","value":["High","Critical"]}]'
notif_config_filters_enabled: "true"

Forward notifications from a specific cluster only:

notif_config_filters: '[{"field":"labels.k8s.cluster.name","operator":"equals","value":"prod"}]'
notif_config_filters_enabled: "true"

Forward only SLO-impacting issues in a specific namespace:

notif_config_filters: '[{"field":"impactsSLO","operator":"equals","value":true},{"field":"labels.k8s.namespace.name","operator":"equals","value":"production"}]'
notif_config_filters_enabled: "true"

Example: GitHub via CauselyBot

  1. Deploy CauselyBot and configure a webhook with hook_type: github, url: "owner/repo", and a GitHub token (repo and issues scope). Optionally set assignee in CauselyBot's config.
  2. In the Secret above, set notif_config_url to CauselyBot's webhook URL and notif_config_token to CauselyBot's auth token.
  3. Causely sends notifications to CauselyBot; CauselyBot creates or updates GitHub issues from the payload.
tip

You can assign an issue to GitHub Copilot by setting the assignee to copilot-swe-agent, which will trigger Copilot to analyze the issue and suggest a fix in a pull request.

Example: Generic webhook (n8n, Linear, etc.)

To send to n8n or any other HTTP endpoint:

  1. In CauselyBot's causelybot-values.yaml, add a webhook with hook_type: generic and set url to your destination endpoint (for example, the n8n Webhook node URL).
  2. Create the Causely Secret as described in Step 3 above, pointing notif_config_url at CauselyBot.
  3. CauselyBot forwards the raw Causely notification payload to your endpoint.
  4. In n8n, read the incoming JSON fields (for example, name, entity, severity, description, link) from the notification payload and use them in downstream nodes (Slack, email, Linear, etc.).
n8n Workflow Example

Notification payload format

Causely sends the same structured JSON to all webhook destinations. For field descriptions and an example, see Notification Payload Format.