Skip to content

Quick Start

Get your first Slack notification working in minutes!

Prerequisites

Before you begin, make sure you have:

  • A Bot Token (Bot guide) OR Slack webhook URL (Webhook guide)
  • A Nextflow pipeline (v25.04.0 or later)
  • Basic familiarity with Nextflow configuration

Step 1: Add the Plugin

Add the nf-slack plugin to your nextflow.config:

plugins {
    id 'nf-slack@0.3.1'
}

Using Multiple Plugins?

If you already have a plugins block, just add the nf-slack entry:

plugins {
    id 'nf-validation'
    id 'nf-slack@0.3.1'  // Add this line
}

Step 2: Configure the Plugin

Add the Slack configuration block with your Bot Token:

slack {
    enabled = true

    // Option A: Bot User
    bot {
        token = 'xoxb-your-token'
        channel = 'general'
    }

    // Option B: Webhook
    // webhook {
    //     url = 'https://hooks.slack.com/services/YOUR/WEBHOOK/URL'
    // }
}

Security Best Practice

Don't hardcode your webhook URL! Use environment variables or Nextflow secrets instead:

slack {
    enabled = true
    bot {
        token = System.getenv("SLACK_BOT_TOKEN") // or secrets.SLACK_BOT_TOKEN
        channel = 'general'
    }
}

Step 3: Run Your Pipeline

That's it! Run your pipeline normally:

nextflow run main.nf

You'll receive Slack notifications when your pipeline:

  • 🚀 Starts
  • ✅ Completes successfully
  • ❌ Fails

Default notifications

Next Steps

Now that you have basic notifications working, learn how to:

Need Help?