NotiGrid
Channels

Slack Integration

Connect NotiGrid to Slack for team notifications

Slack Integration

Send notifications directly to your Slack workspace channels and users.

Prerequisites

  • Admin access to your Slack workspace
  • NotiGrid account with active subscription

Setup Instructions

1. Create a Slack App

  1. Go to api.slack.com/apps
  2. Click Create New App
  3. Choose From scratch
  4. Enter app name: "NotiGrid"
  5. Select your workspace
  6. Click Create App

2. Configure OAuth Scopes

  1. In your app settings, go to OAuth & Permissions
  2. Scroll to Scopes section
  3. Add the following Bot Token Scopes:
    • chat:write - Send messages as the bot
    • chat:write.public - Send messages to public channels without joining
    • users:read - View users in workspace
    • channels:read - View basic channel info
    • groups:read - View private channels the bot is in

3. Install App to Workspace

  1. Scroll to OAuth Tokens for Your Workspace
  2. Click Install to Workspace
  3. Review permissions and click Allow
  4. Copy the Bot User OAuth Token (starts with xoxb-)

4. Add Credentials to NotiGrid

  1. Log in to your NotiGrid dashboard
  2. Navigate to Channels → Slack
  3. Click Add Slack Workspace
  4. Enter your workspace details:
    • Workspace Name - A friendly name (e.g., "My Company Slack")
    • Bot Token - Paste the xoxb- token from step 3
  5. Click Save & Test Connection

5. Invite Bot to Channels

For the bot to send messages to a channel, you need to invite it:

  1. Open the Slack channel
  2. Type: /invite @NotiGrid
  3. Or use the channel details → Integrations → Add apps

Sending Notifications

Using the Dashboard

  1. Go to Notifications → Send
  2. Select Slack as the channel
  3. Choose your workspace
  4. Enter the channel name or user ID
  5. Write your message
  6. Click Send

Using the API

curl -X POST https://api.notigrid.com/v1/notifications \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "channel": "slack",
    "to": "#general",
    "body": "Hello from NotiGrid!"
  }'

Channel Formats

Public/Private Channels:

{
  "to": "#channel-name"
}

Direct Messages:

{
  "to": "@username"
}

User ID:

{
  "to": "U01A2B3C4D5"
}

Message Formatting

Basic Text

{
  "channel": "slack",
  "to": "#general",
  "body": "Simple text message"
}

Rich Formatting with Blocks

{
  "channel": "slack",
  "to": "#general",
  "body": "New order received!",
  "metadata": {
    "blocks": [
      {
        "type": "header",
        "text": {
          "type": "plain_text",
          "text": "New Order #12345"
        }
      },
      {
        "type": "section",
        "fields": [
          {
            "type": "mrkdwn",
            "text": "*Customer:*\nJohn Doe"
          },
          {
            "type": "mrkdwn",
            "text": "*Amount:*\n$99.99"
          }
        ]
      },
      {
        "type": "actions",
        "elements": [
          {
            "type": "button",
            "text": {
              "type": "plain_text",
              "text": "View Order"
            },
            "url": "https://yoursite.com/orders/12345"
          }
        ]
      }
    ]
  }
}

Markdown Support

Slack supports markdown-like formatting:

  • *bold* - bold text
  • _italic_ - italic text
  • ~strike~ - strikethrough
  • `code` - inline code
  • > quote - Block quote
  • Three backticks - Code block

Templates

Create reusable Slack message templates:

Simple Alert Template

{
  "name": "server-alert",
  "channel": "slack",
  "body": "🚨 Alert: {{alert_type}}\n\n{{message}}\n\nServer: {{server_name}}\nTime: {{timestamp}}"
}

Order Notification Template

{
  "name": "new-order-slack",
  "channel": "slack",
  "body": "New order received!",
  "metadata": {
    "blocks": [
      {
        "type": "header",
        "text": {
          "type": "plain_text",
          "text": "🛍️ Order {{order_id}}"
        }
      },
      {
        "type": "section",
        "fields": [
          {
            "type": "mrkdwn",
            "text": "*Customer:*\n{{customer_name}}"
          },
          {
            "type": "mrkdwn",
            "text": "*Total:*\n${{order_total}}"
          },
          {
            "type": "mrkdwn",
            "text": "*Items:*\n{{item_count}}"
          },
          {
            "type": "mrkdwn",
            "text": "*Status:*\n{{status}}"
          }
        ]
      }
    ]
  }
}

Advanced Features

Thread Replies

Reply to an existing message thread:

{
  "channel": "slack",
  "to": "#general",
  "body": "Follow-up message",
  "metadata": {
    "thread_ts": "1234567890.123456"
  }
}

Mentions

Mention users or channels:

{
  "body": "Hey <@U01A2B3C4D5>, check this out! cc: <!channel>"
}

Attachments

Add file attachments:

{
  "channel": "slack",
  "to": "#general",
  "body": "Here's the report",
  "metadata": {
    "attachments": [
      {
        "fallback": "Monthly Report",
        "color": "#36a64f",
        "title": "Monthly Sales Report",
        "title_link": "https://example.com/report.pdf",
        "text": "Sales increased by 15% this month"
      }
    ]
  }
}

Rate Limits

Slack has rate limits on API calls:

  • Tier 1: 1 request per second per workspace
  • Tier 2: 20+ requests per minute
  • Tier 3: 50+ requests per minute

NotiGrid automatically handles rate limiting and retries.

Troubleshooting

Bot Not Sending Messages

  1. Check token - Verify the bot token is correct
  2. Invite bot - Ensure bot is invited to the channel
  3. Check scopes - Verify OAuth scopes are configured
  4. Test connection - Use the "Test Connection" button in NotiGrid

Permission Errors

If you see "not_in_channel" error:

  • Invite the bot to the channel using /invite @NotiGrid

If you see "missing_scope" error:

  • Add the required OAuth scope in your Slack app settings
  • Reinstall the app to your workspace

Finding Channel/User IDs

Channel ID:

  1. Right-click on channel name
  2. Select "View channel details"
  3. Copy the ID at the bottom

User ID:

  1. Click on user's profile
  2. Click "More" (three dots)
  3. Select "Copy member ID"

Best Practices

  1. Use channels wisely - Create specific channels for different notification types
  2. Format messages - Use blocks for rich formatting
  3. Avoid spam - Group similar notifications
  4. Use threads - Keep conversations organized
  5. Test first - Always test in a private channel first

Security

  • Rotate tokens - Regularly rotate your bot tokens
  • Limit scopes - Only request necessary OAuth scopes
  • Monitor usage - Review Slack app activity regularly
  • Secure storage - Never commit tokens to version control

Support

Need help with Slack integration?