Notification Overview

OK!Gotcha provides a robust notification system to ensure that approvers are promptly alerted when their input is needed. Notifications can be configured across multiple channels to fit your team’s workflow and ensure timely responses to approval requests.

Notification Channels

Email

Detailed approval request notifications sent directly to approvers’ email inboxes.

Slack

Real-time notifications in Slack channels or direct messages with interactive approve/reject buttons.

Microsoft Teams

Notifications in Teams channels with actionable approval cards.

Webhooks

Custom webhook integrations for your internal systems or other tools.

Configuring Notifications

Notifications can be configured at multiple levels:

Global Configuration

Set default notification preferences for your entire organization:

import { OkGotcha } from '@okgotcha/sdk';

const ok = OkGotcha();

// Configure global notification settings
await ok.configure({
  notifications: {
    email: {
      enabled: true,
      templates: {
        approvalRequest: 'template_id_123',
        approvalApproved: 'template_id_456',
        approvalRejected: 'template_id_789'
      }
    },
    slack: {
      enabled: true,
      defaultChannel: '#approvals',
      workspaceId: 'T12345678'
    }
  }
});

Team Configuration

Configure notifications for specific teams or departments:

// Configure notifications for the finance team
await ok.teams.configure('finance-team', {
  notifications: {
    email: { enabled: true },
    slack: { 
      enabled: true,
      channel: '#finance-approvals' 
    }
  }
});

User Preferences

Individual users can set their own notification preferences:

// Configure notifications for a specific user
await ok.users.configure('user_123', {
  notifications: {
    email: { enabled: true },
    slack: { enabled: true },
    teams: { enabled: false }
  }
});

Notification Templates

OK!Gotcha allows you to customize notification templates to match your brand and provide the right context for approvers.

Email templates can be customized in the dashboard:

  1. Navigate to Settings > Notifications > Email Templates
  2. Select a template type (e.g., Approval Request)
  3. Customize the subject, content, and styling
  4. Use variables like {{approvalTitle}}, {{requesterName}}, etc.
  5. Save your changes

Event Types

You can configure which events trigger notifications:

Event TypeDescription
approval.createdWhen a new approval request is created
approval.approvedWhen an approval request is approved
approval.rejectedWhen an approval request is rejected
approval.expiredWhen an approval request expires
approval.canceledWhen an approval request is canceled
approval.commentWhen a comment is added to an approval

Setting Up Integrations

Slack Integration

  1. Install the OK!Gotcha app in your Slack workspace

    https://app.okgotcha.com/settings/integrations/slack/install
    
  2. Configure in your code

    import { OkGotcha } from '@okgotcha/sdk';
    
    const ok = OkGotcha();
    
    // Configure Slack integration
    await ok.configure({
      integrations: {
        slack: {
          enabled: true,
          workspaceId: 'T12345678',
          defaultChannel: '#approvals',
          events: ['approval.created', 'approval.approved', 'approval.rejected']
        }
      }
    });
    

Microsoft Teams Integration

  1. Install the OK!Gotcha app in Teams

    https://app.okgotcha.com/settings/integrations/teams/install
    
  2. Configure in your code

    // Configure Teams integration
    await ok.configure({
      integrations: {
        microsoftTeams: {
          enabled: true,
          tenantId: 'tenant_id_123',
          defaultChannel: 'General',
          events: ['approval.created', 'approval.approved', 'approval.rejected']
        }
      }
    });
    

Webhook Integration

Send approval events to your own systems:

// Configure webhook integration
await ok.configure({
  integrations: {
    webhooks: [
      {
        url: 'https://your-server.com/webhooks/okgotcha',
        events: ['approval.created', 'approval.approved', 'approval.rejected'],
        secret: 'your_webhook_secret',
        headers: {
          'X-Custom-Header': 'custom-value'
        }
      }
    ]
  }
});

Notification Delivery

OK!Gotcha handles notification delivery with:

  • Retry logic - Automatic retries for failed notification deliveries
  • Delivery confirmation - Tracking of notification delivery and open rates
  • Rate limiting - Prevents notification flooding during high-volume events

Next Steps