Slack Integration

Connect Defense Catalyst to Slack to send messages, post updates, and automate team communication.


What It Enables

The Slack integration allows you to:

Common Use Cases

Alerts & Notifications

Status Updates

Data Sharing

Team Coordination


Prerequisites

Before connecting Slack to Defense Catalyst:

Permissions Needed

The Slack integration requests these permissions (scopes):

You can review and approve these during the OAuth flow.


How to Connect

Step 1: Add Slack Action to Your Flow

  1. Open your flow in Defense Catalyst
  2. Click ”+” to add a new action
  3. Search for “Slack”
  4. Select “Send Message to Channel” (or another Slack action)

Step 2: Create New Connection

  1. In the Connection field, click ”+ New Connection”
  2. A popup will appear
  3. Click “Connect to Slack”

Step 3: Authorize Defense Catalyst

  1. You’ll be redirected to Slack’s authorization page
  2. Select your workspace from the dropdown (if you’re in multiple workspaces)
  3. Review the permissions Defense Catalyst is requesting
  4. Click “Allow” to authorize

Step 4: Return to Defense Catalyst

  1. You’ll be automatically redirected back to Defense Catalyst
  2. Your Slack connection is now created and selected
  3. You can now configure your Slack action

Step 5: Test the Connection

  1. Select a channel from the dropdown
  2. Enter a test message
  3. Click “Test” to send the message
  4. Check your Slack channel to verify the message appeared

Available Actions

Send Message to Channel

Post a message to a Slack channel.

Configuration:

Example:

Channel: #alerts
Message: 🚨 System Alert: 

Timestamp: 
Severity: 

Output:


Send Direct Message

Send a private message to a Slack user.

Configuration:

Example:

User: @john.doe
Message: Your report is ready: 

Upload File

Upload a file to a Slack channel.

Configuration:

Example:

Channel: #reports
File: 
Filename: daily-report-.csv
Comment: Here's today's report

Create Channel

Create a new Slack channel.

Configuration:

Example:

Name: project-
Private: false
Description: Channel for 

Add User to Channel

Invite a user to a channel.

Configuration:


Update Message

Edit a previously sent message.

Configuration:

Use case: Update a status message as a process progresses.


Add Reaction

Add an emoji reaction to a message.

Configuration:

Example:

Emoji: white_check_mark

Available Triggers

New Message in Channel

Trigger when a message is posted to a specific channel.

Configuration:

Output:

Note: Requires Slack Events API to be configured. Contact support for setup assistance.


Message Formatting

Slack supports rich message formatting using markdown-like syntax.

Basic Formatting

Bold: *bold text*bold text
Italic: _italic text_italic text
Strikethrough: ~strikethrough~strikethrough
Code: `code`code
Code block:

code block

URL: <https://example.com> → https://example.com
Named link: <https://example.com|Example> → Example
User mention: <@U123456> → @username
Channel mention: <#C123456> → #channel

Lists

• Item 1
• Item 2
• Item 3

Emoji

Use emoji names with colons: :rocket: → 🚀

Common emoji:


Common Errors & Fixes

“channel_not_found”

Cause: The channel doesn’t exist or the bot doesn’t have access.

Solutions:

  1. Verify the channel name is correct
  2. Invite the Defense Catalyst bot to the channel:
    • Go to the channel in Slack
    • Type /invite @Defense Catalyst
    • Press Enter
  3. For private channels, you must invite the bot manually

“not_in_channel”

Cause: The bot hasn’t been added to the channel.

Solution:

  1. Go to the channel in Slack
  2. Type /invite @Defense Catalyst
  3. Press Enter
  4. Try sending the message again

“invalid_auth”

Cause: The Slack connection has expired or been revoked.

Solutions:

  1. Go to Connections in Defense Catalyst
  2. Find your Slack connection
  3. Click “Reconnect”
  4. Authorize again

“rate_limited”

Cause: Too many messages sent too quickly.

Solutions:

  1. Reduce the frequency of messages
  2. Add delays between messages
  3. Batch messages when possible
  4. Check Slack’s rate limits: https://api.slack.com/docs/rate-limits

“msg_too_long”

Cause: Message exceeds Slack’s 40,000 character limit.

Solutions:

  1. Shorten the message
  2. Split into multiple messages
  3. Upload long content as a file instead

“no_text”

Cause: Message field is empty.

Solution:

  1. Ensure the message field has content
  2. Check that data mapping is correct
  3. Verify previous steps produced output

Test Checklist

Use this checklist to verify your Slack integration works correctly:

Connection

Sending Messages

Dynamic Data

Error Handling

Performance


Tips & Best Practices

Use Descriptive Bot Names

Customize the bot name and icon for different types of messages:

Username: Alert Bot
Icon: :warning:
Username: Deploy Bot
Icon: :rocket:

This helps users quickly identify the source and type of message.


Format Messages for Readability

Use formatting to make messages scannable:

🚨 *Production Alert*

*Service:* API Gateway
*Status:* Down
*Started:* 
*Impact:* High

<|View Incident>

Reply to threads to keep channels organized:

1. Send initial message
2. Save the message timestamp
3. Send follow-up messages with thread_ts set to the initial timestamp

Batch Notifications

Instead of sending many individual messages, batch them:

❌ Don't:
- Send message for each error (could be hundreds)

✅ Do:
- Collect errors
- Send one message with summary
- Include count and top errors

Handle Rate Limits

Slack has rate limits. Design flows to stay within limits:

Strategies:


Use Slack Blocks for Rich Messages

For advanced formatting, use Slack’s Block Kit (requires custom code):

{
  "blocks": [
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "*Alert*: System down"
      }
    },
    {
      "type": "actions",
      "elements": [
        {
          "type": "button",
          "text": {
            "type": "plain_text",
            "text": "View Details"
          },
          "url": "https://example.com/incident"
        }
      ]
    }
  ]
}

Monitor Bot Health

Regularly check that your Slack bot is working:


Security Considerations

Sensitive Data:

Access Control:

Compliance:


Advanced Usage

Conditional Channel Selection

Send to different channels based on conditions:

Channel: 

Dynamic Message Content

Build messages dynamically based on data:


✅ Deployment Successful

❌ Deployment Failed


Environment: 
Version: 
Duration: 

Mention Users Dynamically

Mention users based on data:

<@> Your task is complete: 

Schedule Regular Updates

Use Schedule trigger + Slack action for regular updates:

Trigger: Schedule (Every day at 9 AM)
Action 1: Fetch daily metrics
Action 2: Format report
Action 3: Send to Slack #daily-reports


Need Help?

Slack API Documentation: https://api.slack.com/

Defense Catalyst Support: help@defensecatalyst.com

Common Issues: Troubleshooting Hub