Configure ArgoCD notifications for Slack and Microsoft Teams with webhook integration

Intermediate 25 min Apr 07, 2026 344 views
Ubuntu 24.04 Debian 12 AlmaLinux 9 Rocky Linux 9

Set up ArgoCD notification controller to send application deployment alerts and sync status updates to Slack channels and Microsoft Teams. Configure webhook integrations with custom templates and triggers for production GitOps workflows.

Prerequisites

  • Existing Kubernetes cluster with ArgoCD installed
  • Slack workspace admin access
  • Microsoft Teams admin access
  • kubectl configured

What this solves

ArgoCD notifications keep your team informed about application deployments, sync failures, and health status changes in your GitOps workflows. This tutorial configures the ArgoCD notification controller to send alerts to Slack and Microsoft Teams using webhooks, enabling real-time visibility into your Kubernetes deployments.

Step-by-step configuration

Install ArgoCD notification controller

The notification controller is a separate component that handles all notification logic for ArgoCD. Install it in your ArgoCD namespace.

kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/notifications_install.yaml

Verify notification controller deployment

Check that the notification controller pod is running and ready to process notifications.

kubectl get pods -n argocd -l app.kubernetes.io/name=argocd-notifications-controller
kubectl logs -n argocd -l app.kubernetes.io/name=argocd-notifications-controller

Create Slack webhook URL

Generate a webhook URL in your Slack workspace to receive ArgoCD notifications. Go to your Slack admin panel, create a new app, and enable incoming webhooks.

Note: Your Slack webhook URL will look like https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX

Create Microsoft Teams webhook URL

Generate a webhook connector in Microsoft Teams. Go to your Teams channel, click "Connectors", search for "Incoming Webhook", and create a new connector.

Note: Your Teams webhook URL will look like https://outlook.office.com/webhook/...

Configure notification secrets

Store your webhook URLs as Kubernetes secrets so ArgoCD can authenticate with Slack and Teams.

kubectl create secret generic argocd-notifications-secret \
  --from-literal=slack-token="https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK" \
  --from-literal=teams-webhook="https://outlook.office.com/webhook/YOUR/TEAMS/WEBHOOK" \
  -n argocd

Create notification configuration

Define notification services, templates, and triggers in the ArgoCD notifications ConfigMap.

apiVersion: v1
kind: ConfigMap
metadata:
  name: argocd-notifications-cm
  namespace: argocd
data:
  service.slack: |
    token: $slack-token
    username: ArgoCD
    channel: "#deployments"
    iconEmoji: ":rocket:"
  service.teams: |
    recipientUrls:
      general: $teams-webhook
  template.app-deployed: |
    webhook:
      teams:
        method: POST
        body: |
          {
            "@type": "MessageCard",
            "@context": "https://schema.org/extensions",
            "summary": "Application {{.app.metadata.name}} deployed",
            "themeColor": "00FF00",
            "sections": [{
              "activityTitle": "Application Deployed Successfully",
              "activitySubtitle": "{{.app.metadata.name}} in {{.app.spec.destination.namespace}}",
              "facts": [
                {"name": "Repository", "value": "{{.app.spec.source.repoURL}}"},
                {"name": "Revision", "value": "{{.app.status.sync.revision}}"},
                {"name": "Sync Status", "value": "{{.app.status.sync.status}}"}
              ]
            }]
          }
      slack:
        attachments: |
          [{
            "title": "{{.app.metadata.name}}",
            "title_link": "{{.context.argocdUrl}}/applications/{{.app.metadata.name}}",
            "color": "#18be52",
            "fields": [
              {"title": "Sync Status", "value": "{{.app.status.sync.status}}", "short": true},
              {"title": "Repository", "value": "{{.app.spec.source.repoURL}}", "short": true}
            ]
          }]
  template.app-sync-failed: |
    webhook:
      teams:
        method: POST
        body: |
          {
            "@type": "MessageCard",
            "@context": "https://schema.org/extensions",
            "summary": "Application {{.app.metadata.name}} sync failed",
            "themeColor": "FF0000",
            "sections": [{
              "activityTitle": "Application Sync Failed",
              "activitySubtitle": "{{.app.metadata.name}} in {{.app.spec.destination.namespace}}",
              "facts": [
                {"name": "Repository", "value": "{{.app.spec.source.repoURL}}"},
                {"name": "Sync Status", "value": "{{.app.status.sync.status}}"},
                {"name": "Message", "value": "{{.app.status.conditions[0].message}}"}
              ]
            }]
          }
      slack:
        attachments: |
          [{
            "title": "{{.app.metadata.name}}",
            "title_link": "{{.context.argocdUrl}}/applications/{{.app.metadata.name}}",
            "color": "#E96D76",
            "fields": [
              {"title": "Sync Status", "value": "{{.app.status.sync.status}}", "short": true},
              {"title": "Repository", "value": "{{.app.spec.source.repoURL}}", "short": true}
            ]
          }]
  trigger.on-deployed: |
    - description: Application is synced and healthy
      send:
        - app-deployed
      when: app.status.sync.status == 'Synced' and app.status.health.status == 'Healthy'
  trigger.on-sync-failed: |
    - description: Application sync failed
      send:
        - app-sync-failed
      when: app.status.sync.status == 'OutOfSync'
  subscriptions: |
    - recipients:
        - slack:deployments
        - teams:general
      triggers:
        - on-deployed
        - on-sync-failed

Apply notification configuration

Deploy the notification configuration to your ArgoCD namespace.

kubectl apply -f argocd-notifications-cm.yaml

Enable notifications for specific applications

Add notification annotations to your ArgoCD applications to enable alerts. You can do this via the UI or by updating application manifests.

kubectl patch app your-app-name -n argocd --type merge -p='{
  "metadata": {
    "annotations": {
      "notifications.argoproj.io/subscribe.on-deployed.slack": "deployments",
      "notifications.argoproj.io/subscribe.on-sync-failed.teams": "general"
    }
  }
}'

Configure global notification subscriptions

Set up default subscriptions for all applications by updating the notifications ConfigMap with global settings.

kubectl patch configmap argocd-notifications-cm -n argocd --type merge -p='{
  "data": {
    "subscriptions": "- recipients:\n    - slack:deployments\n    - teams:general\n  triggers:\n    - on-deployed\n    - on-sync-failed"
  }
}'

Create custom notification templates

Add additional templates for different notification scenarios like health status changes and sync operations.

kubectl patch configmap argocd-notifications-cm -n argocd --type merge -p='{
  "data": {
    "template.app-health-degraded": "webhook:\n  slack:\n    attachments: |\n      [{\n        \"title\": \"{{.app.metadata.name}}\",\n        \"title_link\": \"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}\",\n        \"color\": \"#f4c030\",\n        \"fields\": [\n          {\"title\": \"Health Status\", \"value\": \"{{.app.status.health.status}}\", \"short\": true},\n          {\"title\": \"Repository\", \"value\": \"{{.app.spec.source.repoURL}}\", \"short\": true}\n        ]\n      }]\n  teams:\n    method: POST\n    body: |\n      {\n        \"@type\": \"MessageCard\",\n        \"@context\": \"https://schema.org/extensions\",\n        \"summary\": \"Application {{.app.metadata.name}} health degraded\",\n        \"themeColor\": \"FFA500\",\n        \"sections\": [{\n          \"activityTitle\": \"Application Health Degraded\",\n          \"activitySubtitle\": \"{{.app.metadata.name}} in {{.app.spec.destination.namespace}}\",\n          \"facts\": [\n            {\"name\": \"Health Status\", \"value\": \"{{.app.status.health.status}}\"},\n            {\"name\": \"Repository\", \"value\": \"{{.app.spec.source.repoURL}}\"}\n          ]\n        }]\n      }",
    "trigger.on-health-degraded": "- description: Application health degraded\n  send:\n    - app-health-degraded\n  when: app.status.health.status == 'Degraded'"
  }
}'

Restart notification controller

Restart the notification controller to load the new configuration and templates.

kubectl rollout restart deployment argocd-notifications-controller -n argocd
kubectl rollout status deployment argocd-notifications-controller -n argocd

Configure advanced notification features

Set up notification timing controls

Configure notification frequency and timing to prevent spam and ensure relevant alerts only.

kubectl patch configmap argocd-notifications-cm -n argocd --type merge -p='{
  "data": {
    "trigger.on-sync-status-unknown": "- description: Application sync status unknown for 10 minutes\n  send:\n    - app-sync-failed\n  when: app.status.sync.status == 'Unknown'\n  oncePer: app.status.sync.revision"
  }
}'

Configure notification filtering

Set up filters to send notifications only for specific namespaces, projects, or application labels.

kubectl patch configmap argocd-notifications-cm -n argocd --type merge -p='{
  "data": {
    "trigger.on-deployed-production": "- description: Production application deployed\n  send:\n    - app-deployed\n  when: app.status.sync.status == 'Synced' and app.status.health.status == 'Healthy' and app.spec.destination.namespace == 'production'"
  }
}'

Verify your setup

kubectl get configmap argocd-notifications-cm -n argocd -o yaml
kubectl get secret argocd-notifications-secret -n argocd
kubectl logs -n argocd -l app.kubernetes.io/name=argocd-notifications-controller
kubectl get apps -n argocd -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.metadata.annotations}{"\n"}{end}'

Test notifications by triggering a sync operation or changing application health status. You can also use the ArgoCD CLI to send test notifications.

argocd admin notifications trigger on-deployed --app-name your-app-name --recipient slack:deployments

Common issues

SymptomCauseFix
Notifications not sentWrong webhook URL formatVerify webhook URLs in secret and test manually with curl
Controller pod crashloopInvalid YAML in ConfigMapCheck ConfigMap syntax with kubectl apply --dry-run=client
Teams notifications malformedInvalid JSON in templateValidate JSON template with online validator
Slack attachments not showingMissing webhook permissionsRecreate Slack app with correct scopes
Triggers not firingWrong condition syntaxCheck trigger conditions match actual app status

Next steps

Automated install script

Run this to automate the entire setup

Need help?

Don't want to manage this yourself?

We handle managed devops services for businesses that depend on uptime. From initial setup to ongoing operations.