Skip to content

nf-slack

Get Slack notifications for your Nextflow workflows - automatically notified when pipelines start, complete, or fail.

Default Slack notification

Features

  • ๐Ÿš€ Automatic Notifications: Get notified when workflows start, complete, or fail
  • ๐Ÿ’ฌ Custom Messages: Send custom messages from within your workflow scripts
  • ๐Ÿค– Bot & Webhook Support: Supports both bot and webhook authentication
  • ๐Ÿงต Threading: Keep channels clean by threading workflow notifications (Bot only)
  • ๐ŸŽจ Rich Formatting: Beautiful Slack messages with colors and custom fields
  • โš™๏ธ Highly Configurable: Control what notifications are sent and when

Quick Start

Get started in just 3 simple steps:

  1. Set up a Bot User - Create a Slack App and Bot User (Recommended)
  2. Configure your pipeline - Add the plugin to your nextflow.config
  3. Run your workflow - That's it! Notifications will be sent automatically

Get Started โ†’

What You Get

Once configured, you'll automatically receive Slack messages for:

  • ๐Ÿš€ Pipeline starts - Know when your workflow begins
  • โœ… Successful completions - Celebrate when pipelines finish
  • โŒ Failures - Get alerted immediately when something goes wrong

Each message includes relevant details like run name, duration, and error information.

Basic Example

Add to your nextflow.config:

plugins {
    id 'nf-slack@0.3.1'
}

slack {
    enabled = true
    bot {
        token = 'xoxb-your-bot-token'
        channel = 'general'
    }
}

That's it! Your workflow will now send notifications to Slack.

Customize Your Notifications

Choose Which Events to Notify

slack {
    enabled = true
    bot {
        token = 'xoxb-your-bot-token'
        channel = 'general'
    }

    onStart.enabled = false     // Do not notify when pipeline starts
    onComplete.enabled = true   // Notify on successful completion
    onError.enabled = true      // Notify on failures
}

Selective notifications

Customize Message Text

slack {
    bot {
        token = 'xoxb-your-bot-token'
        channel = 'general'
    }

    onStart {
        message = '๐ŸŽฌ *My analysis pipeline is starting!*'
    }

    onComplete {
        message = '๐ŸŽ‰ *Analysis completed successfully!*'
    }

    onError {
        message = '๐Ÿ’ฅ *Pipeline encountered an error!*'
    }
}

Custom messages

Send Custom Messages from Your Workflow

include { slackMessage } from 'plugin/nf-slack'

params.sample_id = "SAMPLE_001"

workflow {
    slackMessage("๐Ÿ”ฌ Starting analysis for sample ${params.sample_id}")

    // Your workflow processes here

    slackMessage("โœ… Analysis complete!")
}

Custom workflow messages

Learn More

Support

License

Copyright 2025, Seqera Labs. Licensed under the Apache License, Version 2.0.