Connectors

One-click connections

Without any setup, a business connects Slack, Discord or Telegram by pasting a webhook URL or bot token. If the agency registers one Slack app, one Discord app and one Telegram bot, every business gets a Connect button instead: one click, pick a channel, done. You do this once for all clients.

ChannelWhat you create (once)What a business doesExtra
SlackA Slack app from the manifest belowConnect with Slack, pick a channelContacted, Won and Lost buttons on each lead
DiscordA Discord application (no bot needed)Connect with Discord, pick server and channel—
TelegramA bot from @BotFatherConnect with Telegram, press Start or add the bot to a groupContacted, Won and Lost buttons on each lead
Teams, email, webhook, SheetsNothingPaste a URL or address—

The addresses below use this deployment, https://leadvane.cowebofficial.workers.dev. If you move to a custom domain, change them to match APP_URL in wrangler.jsonc.

Slack app

Do you need a Slack app? Only for the one-click button and the status buttons. A pasted incoming webhook works without one. You do not need to list the app in the Slack Marketplace: a distributed, unlisted app can be installed into any workspace through the Connect button.

  1. Go to api.slack.com/apps → Create New App → From a manifest, pick your agency's workspace and paste the manifest (also in the repository at integrations/slack/manifest.yml):
display_information:
  name: Leadvane
  description: New website leads, with Contacted, Won and Lost buttons.
  background_color: "#0d0f1a"
oauth_config:
  redirect_urls:
    - https://leadvane.cowebofficial.workers.dev/api/connect/slack/callback
  scopes:
    bot:
      - incoming-webhook
settings:
  interactivity:
    is_enabled: true
    request_url: https://leadvane.cowebofficial.workers.dev/connect/slack/interactions
  org_deploy_enabled: false
  socket_mode_enabled: false
  token_rotation_enabled: false
  1. Under Basic Information copy the Client ID, Client Secret and Signing Secret.
  2. Under Manage Distribution, tick the checklist and press Activate Public Distribution, so clients' workspaces can install it.
  3. Add them to Leadvane:
# wrangler.jsonc → vars.SLACK_CLIENT_ID = "1234567890.1234567890"
npx wrangler secret put SLACK_CLIENT_SECRET
npx wrangler secret put SLACK_SIGNING_SECRET
npm run deploy

How it works: the dashboard sends the user to Slack with the incoming-webhook scope and a signed, 15-minute state. Slack asks them to pick a channel and returns a webhook URL for it, which is stored encrypted. When someone presses Won in Slack, Slack posts the click to /connect/slack/interactions, signed with your signing secret; Leadvane checks the signature, checks the click came from the workspace connected to that lead's website, updates the lead and replaces the buttons with "Won · marked by Asha in Slack".

Discord application

  1. Open the Discord Developer Portal → New Application, name it Leadvane.
  2. Under OAuth2 add the redirect https://leadvane.cowebofficial.workers.dev/api/connect/discord/callback and copy the Client ID and Client Secret. You don't need a bot.
  3. Add them to Leadvane:
# wrangler.jsonc → vars.DISCORD_CLIENT_ID = "123456789012345678"
npx wrangler secret put DISCORD_CLIENT_SECRET

Discord's webhook.incoming scope asks the user for a server and channel and hands back a webhook for it. Leadvane keeps only the webhook, encrypted.

Telegram bot

  1. In Telegram, message @BotFather, send /newbot and follow the prompts. Copy the token.
  2. Optional: /setdescription and /setuserpic so clients recognise it.
  3. Add it to Leadvane. The webhook is registered automatically the first time someone presses Connect.
# wrangler.jsonc → vars.TELEGRAM_BOT_USERNAME = "YourAgencyLeadsBot"   (without @)
npx wrangler secret put TELEGRAM_BOT_TOKEN

How it works: Connect with Telegram creates a one-time code (15 minutes) and opens t.me/YourBot?start=CODE, or ?startgroup=CODE to add the bot to a group. Telegram delivers /start CODE to /connect/telegram/webhook with a secret header only Leadvane knows; Leadvane creates the notification for that chat and replies "Connected". The dashboard sees it within a few seconds. Lead messages carry Contacted, Won and Lost buttons that only work in the chat that was connected.

Needs https

Telegram only calls https addresses, so the Telegram button works on your deployed Leadvane, not on localhost. Slack and Discord also need their redirect URLs to match APP_URL exactly.

Security