Skip to main content

Overview

This guide will walk you through creating your first connector using Databite. We’ll build a Slack connector that can send messages and sync channel data, demonstrating the core concepts and patterns.

Prerequisites

Before starting, make sure you have:
  • Node.js >= 16.0.0 installed
  • Basic knowledge of TypeScript
  • A Slack app (we’ll create one in the steps below)

Step 1: Create a Slack App

  • First, create a Slack app at api.slack.com/apps
  • Add these scopes: chat:write, channels:read, users:read
  • Copy your Client ID, Client Secret, and note your Redirect URLs.

Step 2: Installation

Install the required packages:

Step 3: Define Configuration Schemas

Create schemas.ts with the configuration schemas:

Step 4: Create Actions

Create actions/send-message.ts for sending Slack messages:

Step 5: Create Syncs

Create syncs/fetch-messages.ts for syncing channel messages:

Step 6: Build the Connector

Create index.ts and put it all together:

Step 7: Test Your Connector

Create a test file to verify your connector works:

Step 8: Use in a Server

Add your connector to a Databite server:

Next Steps

  • Add more actions (create channels, invite users, etc.)
  • Add more syncs (users, files, etc.)
  • Contribute your connector to our repo for others to use