Skip to content

Integrations System

Top G & AI Velocity Feature

Integrations system is available in Top G and AI Velocity tiers only.
See tier comparison

Template/Demo System

This is a demonstration system showing how to gate integrations by plan.
Not actual working integrations - templates and structure only.

Integration catalog demonstrating plan-based permissions with templates for third-party services.

What It Is

The integrations system provides:

  • Plan-based access control example
  • Integration templates (Slack, Zapier, Salesforce, etc.)
  • Permission gating demonstration
  • API structure for building real integrations

What it's NOT:

  • ❌ Not actual Slack/Zapier connections
  • ❌ Not working third-party integrations
  • ❌ No real OAuth flows implemented

Purpose

Demonstrates how to:

  1. Gate features by plan level
  2. Show different integration tiers
  3. Structure integration catalog
  4. Handle integration setup flow

Use this as a starting point to build real integrations.

Integration Tiers

Basic Webhooks (All Plans)

  • Simple webhook notifications
  • Event filtering
  • Custom endpoints
  • Demo implementation only

Premium Integrations (Premium+ Plans)

Templates for:

  • Slack (channel posting)
  • Zapier (automation triggers)
  • Google Analytics (event tracking)
  • Mailchimp (subscriber sync)

Status: Templates/mockups only

Enterprise Integrations (Enterprise Plan)

Templates for:

  • Salesforce (CRM sync)
  • Custom API access
  • SSO (SAML/OIDC)
  • Audit log export

Status: Templates/mockups only

How It Works

Backend Structure

Python
1
2
3
4
5
6
# app/services/integrations_service.py
class IntegrationsService:
    async def get_available_integrations(self):
        # Returns integration catalog based on user's plan
        # Shows which integrations user has access to
        # Not actual integrations - just metadata

Frontend Display

TypeScript
1
2
3
4
5
// Shows integration catalog
const { data: integrations } = useAvailableIntegrations();

// integrations.integrations.premium = list of templates
// integrations.integrations.enterprise = list of templates

Permission Checking

Python
1
2
3
# Checks if user's plan allows integration
if plan_checker.has_permission(FeaturePermission.PREMIUM_INTEGRATIONS):
    # Show premium integration templates

Use Cases

1. Demo Plan-Based Access

Show customers how features are gated by plan level.

2. Template for Real Integrations

Use this structure to build actual integrations:

  • Replace template data with real OAuth flows
  • Implement actual API calls
  • Add webhook handlers
  • Store integration credentials

3. Upsell Mechanism

Show locked features to encourage upgrades.

Building Real Integrations

Example: Slack Integration

  1. Add Slack OAuth:

    Python
    # Get Slack OAuth token from user
    # Store securely in database
    

  2. Replace Template:

    Python
    1
    2
    3
    4
    5
    6
    # Instead of returning template
    return {
        "id": "slack",
        "name": "Slack",
        "status": "configured"  # Real status
    }
    

  3. Add Webhook:

    Python
    # When article published
    await slack_client.post_message(channel, article.title)
    

  4. Test:

    Python
    # Verify actual Slack message sent
    

API Endpoints

  • GET /api/integrations - List available integration templates
  • GET /api/integrations/status - Mock integration status
  • GET /api/integrations/{id} - Integration template details
  • POST /api/integrations/{id}/setup - Demo setup (doesn't actually connect)

What You Get

Catalog System:

  • Integration metadata (name, description, category)
  • Permission requirements per integration
  • Setup instructions templates
  • Feature lists

Permission System:

  • Automatic filtering by user's plan
  • Upgrade prompts for locked integrations
  • Access control examples

API Structure:

  • Ready-to-extend controllers
  • Service layer for logic
  • Frontend components for display

Extending to Real Integrations

Add Slack (Example)

  1. Install Slack SDK:

    Bash
    poetry add slack-sdk
    

  2. Add OAuth Flow:

    Python
    # app/services/slack_service.py
    from slack_sdk import WebClient
    
    class SlackService:
        async def authorize(self, user):
            # OAuth flow
            # Store access token
    
        async def post_message(self, channel, message):
            client = WebClient(token=user.slack_token)
            client.chat_postMessage(channel=channel, text=message)
    

  3. Wire Up:

    Python
    1
    2
    3
    # When article published
    if user.has_slack_integration:
        await slack_service.post_message("#articles", article.title)
    

Files Reference

  • app/services/integrations_service.py - Template catalog logic
  • app/controllers/integrations.py - API endpoints
  • frontend/src/hooks/api/useIntegrations.ts - React hooks (Top G+)
  • frontend/src/pages/Integrations.tsx - UI display (Top G+)

Summary: Use this as a foundation to build real integrations. The permission system works - just replace templates with actual implementations.