Integrations
Slack

Slack Integration

Post messages to Slack channels from Flows.

Setup

Create Slack App

  1. Go to Slack API (opens in a new tab)
  2. Click Create New AppFrom scratch
  3. Name your app and select workspace
  4. Go to OAuth & Permissions
  5. Add scopes:
    • chat:write - Send messages
    • chat:write.public - Send to public channels
  6. Install app to workspace
  7. Copy Bot User OAuth Token

Configure in Lux

  1. In Lux: SettingsIntegrationsSlack
  2. Paste Bot User OAuth Token
  3. Test connection

Sending Messages

Use the Slack Message node in Flows:

{
  "channel": "#alerts",
  "message": "New order received!\n*Customer:* {{customer.name}}\n*Total:* ${{orderTotal}}"
}

Channel Formats

"#channel-name"     // By name (must have access)
"C1234567890"       // By channel ID (preferred)

Tip: Use channel ID for reliability. Find it in Slack: Channel Details → Copy link → Extract ID from URL

Message Formatting

Slack uses mrkdwn for formatting:

Basic Formatting

*bold*
_italic_
~strikethrough~
`code`

Code Blocks

code block

Links

<https://example.com|Link Text>

Mentions

<@U1234567890>      // Mention user
<!channel>          // @channel
<!here>             // @here

Rich Messages (Blocks)

For complex layouts, use blocks:

{
  "channel": "#alerts",
  "blocks": [
    {
      "type": "header",
      "text": {
        "type": "plain_text",
        "text": "New Order Alert"
      }
    },
    {
      "type": "section",
      "fields": [
        {
          "type": "mrkdwn",
          "text": "*Customer:*\n{{customer.name}}"
        },
        {
          "type": "mrkdwn",
          "text": "*Total:*\n${{orderTotal}}"
        }
      ]
    },
    {
      "type": "actions",
      "elements": [
        {
          "type": "button",
          "text": {
            "type": "plain_text",
            "text": "View Order"
          },
          "url": "{{orderUrl}}"
        }
      ]
    }
  ]
}

Use Slack Block Kit Builder (opens in a new tab) to design blocks visually.

Common Use Cases

Alert Notifications

{
  "channel": "#alerts",
  "message": "🚨 *Error Alert*\n\nFlow `{{flowName}}` failed:\n```{{errorMessage}}```"
}

Daily Reports

{
  "channel": "#reports",
  "message": "📊 *Daily Summary - {{date}}*\n\n• New users: {{newUsers}}\n• Orders: {{orderCount}}\n• Revenue: ${{revenue}}"
}

Team Updates

{
  "channel": "#team",
  "message": "✅ *Deployment Complete*\n\nInterface `{{interfaceName}}` deployed successfully.\n<{{deployUrl}}|View Live>"
}

Receiving Messages

To respond to Slack messages:

  1. Enable Event Subscriptions in Slack App
  2. Subscribe to message.channels event
  3. Set Request URL to your webhook
  4. Process incoming messages in Flow

Incoming payload:

{
  "type": "message",
  "channel": "C1234567890",
  "user": "U1234567890",
  "text": "Hello bot!",
  "ts": "1234567890.123456"
}

Best Practices

Channel Organization

  • Use dedicated channels for different alert types
  • Don't spam general channels
  • Consider thread replies for related messages

Message Design

  • Use emoji for visual scanning
  • Keep messages concise
  • Include actionable links
  • Use blocks for complex info

Reliability

  • Handle rate limits (1 msg/sec per channel)
  • Log failed messages
  • Use channel IDs over names

Troubleshooting

Message Not Posting

  • Verify bot is in the channel
  • Check OAuth scopes
  • Confirm channel ID is correct

Formatting Issues

  • Escape special characters
  • Test in Block Kit Builder
  • Verify JSON structure for blocks

Next: Custom Tools →