Slack Integration Rate Limiting - Channel Dropdown Empty and Test Rule Fails #438

Closed
opened 2026-04-05 16:19:46 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @bourchi on 6/13/2025

OneUptime's Slack app integration fails due to rate limiting when fetching channels and testing notification rules. This breaks the core two-way Slack integration functionality.

Environment

  • Deployment: Docker Compose
  • Slack App: Properly configured with all required permissions

Expected Behavior

  • Channel dropdown should populate with available Slack channels
  • Test Rule should successfully send test notifications
  • Two-way Slack integration should work (slash commands, interactive features)

Actual Behavior

  • Channel dropdown is empty when creating notification rules
  • Test Rule fails with "ratelimited" error
  • Slack API returns HTTP 429 rate limit errors
  • Only basic webhook notifications work

Error Messages

BadDataException [Error]: ratelimited
at Service.testRule (/usr/src/Common/Server/Services/WorkspaceNotificationRuleService.ts:213:17)
Error response from Slack API:
HTTPErrorResponse {
_statusCode: 429,
_data: { ok: false, error: 'ratelimited' }
}

Root Cause

The testRule function makes excessive API calls without rate limiting protection:

  1. Channel creation attempts
  2. User invitation calls
  3. Channel existence checks
  4. Message posting for each channel
  5. No retry logic or rate limiting

Impact

This bug breaks OneUptime's core value proposition by eliminating:

  • Interactive incident management from Slack
  • Slack slash commands (/oneuptime create incident)
  • Automatic channel creation for incidents
  • User invitations to incident channels
  • Collaborative incident response workflows

Result: OneUptime becomes just a basic notification system instead of a collaborative incident management platform.

Workaround

Use Slack webhook integration for basic one-way notifications until this is fixed.

Proposed Fix

The testRule function in ./Common/Server/Services/WorkspaceNotificationRuleService.ts needs:

  1. Rate limiting protection for all Slack API calls
  2. Exponential backoff for 429 errors
  3. Caching of channel lists to reduce API calls
  4. Proper error handling for rate limits

Reproduction Steps

  1. Configure Slack app integration with proper permissions
  2. Connect OneUptime to Slack workspace
  3. Try to create new incident notification rule
  4. Observe empty channel dropdown
  5. Try to test the rule - fails with rate limiting error
*Originally created by @bourchi on 6/13/2025* OneUptime's Slack app integration fails due to rate limiting when fetching channels and testing notification rules. This breaks the core two-way Slack integration functionality. ## Environment - Deployment: Docker Compose - Slack App: Properly configured with all required permissions ## Expected Behavior - Channel dropdown should populate with available Slack channels - Test Rule should successfully send test notifications - Two-way Slack integration should work (slash commands, interactive features) ## Actual Behavior - Channel dropdown is empty when creating notification rules - Test Rule fails with "ratelimited" error - Slack API returns HTTP 429 rate limit errors - Only basic webhook notifications work ## Error Messages BadDataException [Error]: ratelimited at Service.testRule (/usr/src/Common/Server/Services/WorkspaceNotificationRuleService.ts:213:17) Error response from Slack API: HTTPErrorResponse { _statusCode: 429, _data: { ok: false, error: 'ratelimited' } } ## Root Cause The testRule function makes excessive API calls without rate limiting protection: 1. Channel creation attempts 2. User invitation calls 3. Channel existence checks 4. Message posting for each channel 5. No retry logic or rate limiting ## Impact This bug breaks OneUptime's core value proposition by eliminating: - Interactive incident management from Slack - Slack slash commands (/oneuptime create incident) - Automatic channel creation for incidents - User invitations to incident channels - Collaborative incident response workflows Result: OneUptime becomes just a basic notification system instead of a collaborative incident management platform. ## Workaround Use Slack webhook integration for basic one-way notifications until this is fixed. ## Proposed Fix The testRule function in `./Common/Server/Services/WorkspaceNotificationRuleService.ts` needs: 1. Rate limiting protection for all Slack API calls 2. Exponential backoff for 429 errors 3. Caching of channel lists to reduce API calls 4. Proper error handling for rate limits ## Reproduction Steps 1. Configure Slack app integration with proper permissions 2. Connect OneUptime to Slack workspace 3. Try to create new incident notification rule 4. Observe empty channel dropdown 5. Try to test the rule - fails with rate limiting error
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/oneuptime#438