npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@wellze/integration-slack

v0.0.0

Published

Slack integration for Wellze workflows.

Readme

@wellze/integration-slack

Slack integration for Wellze workflows.

Overview

This package provides Slack integration bindings, triggers, and steps for building workflows that interact with Slack.

Installation

pnpm add @wellze/integration-slack

Trigger Presets

Webhook Triggers

Slack webhook triggers fire when events occur in your Slack workspace.

Message Webhooks

import { webhooks } from '@wellze/integration-slack';
import { attachTrigger } from '@wellze/workflow-core';
import { myWorkflow } from './workflow';

// Message received
const messageReceived = webhooks.messageReceived().createTrigger({
  name: 'Slack Message Received',
  description: 'Fires when a message is posted',
  transform: (event, credentials) => {
    // event: SlackEventPayload - typed automatically
    // credentials: SlackCredentials - typed automatically
    return {
      channelId: event.event.channel,
      userId: event.event.user,
      text: event.event.text,
    };
  },
});

// App mentioned
const appMentioned = webhooks.appMentioned().createTrigger({
  name: 'Slack App Mentioned',
  description: 'Fires when the app is mentioned',
  transform: (event) => ({
    channelId: event.event.channel,
    userId: event.event.user,
    text: event.event.text,
  }),
});

// Attach to workflow
export const binding = attachTrigger({
  workflow: myWorkflow,
  trigger: messageReceived,
  transform: (payload, credentials) => {
    return {
      channelId: payload.event.channel,
      userId: payload.event.user,
      text: payload.event.text,
    };
  },
});

Channel Webhooks

import { webhooks } from '@wellze/integration-slack';

// Channel created
const channelCreated = webhooks.channelCreated().createTrigger({
  name: 'Slack Channel Created',
  transform: (event) => ({
    channelId: event.event.channel.id,
    name: event.event.channel.name,
  }),
});

// Member joined channel
const memberJoinedChannel = webhooks.memberJoinedChannel().createTrigger({
  name: 'Slack Member Joined Channel',
  transform: (event) => ({
    channelId: event.event.channel,
    userId: event.event.user,
  }),
});

// Member left channel
const memberLeftChannel = webhooks.memberLeftChannel().createTrigger({
  name: 'Slack Member Left Channel',
  transform: (event) => ({
    channelId: event.event.channel,
    userId: event.event.user,
  }),
});

Reaction Webhooks

import { webhooks } from '@wellze/integration-slack';

// Reaction added
const reactionAdded = webhooks.reactionAdded().createTrigger({
  name: 'Slack Reaction Added',
  transform: (event) => ({
    channelId: event.event.item.channel,
    messageTs: event.event.item.ts,
    userId: event.event.user,
    reaction: event.event.reaction,
  }),
});

// Reaction removed
const reactionRemoved = webhooks.reactionRemoved().createTrigger({
  name: 'Slack Reaction Removed',
  transform: (event) => ({
    channelId: event.event.item.channel,
    messageTs: event.event.item.ts,
    userId: event.event.user,
    reaction: event.event.reaction,
  }),
});

Team Webhooks

import { webhooks } from '@wellze/integration-slack';

// Team join
const teamJoin = webhooks.teamJoin().createTrigger({
  name: 'Slack Team Join',
  transform: (event) => ({
    userId: event.event.user.id,
    email: event.event.user.profile?.email,
  }),
});

Steps

Messages

import { sendMessage, updateMessage, deleteMessage } from '@wellze/integration-slack';

// Send message
const message = await sendMessage({
  channel: 'C1234567890',
  text: 'Hello, world!',
});

// Update message
await updateMessage({
  channel: 'C1234567890',
  ts: '1234567890.123456',
  text: 'Updated message',
});

// Delete message
await deleteMessage({
  channel: 'C1234567890',
  ts: '1234567890.123456',
});

Channels

import { createChannel, getChannelInfo, listChannels } from '@wellze/integration-slack';

// Create channel
const channel = await createChannel({
  name: 'my-channel',
  isPrivate: false,
});

// Get channel info
const info = await getChannelInfo({
  channel: 'C1234567890',
});

// List channels
const channels = await listChannels({
  excludeArchived: true,
});

Users

import { getUserInfo, listUsers, lookupUserByEmail } from '@wellze/integration-slack';

// Get user info
const user = await getUserInfo({
  user: 'U1234567890',
});

// List users
const users = await listUsers();

// Lookup user by email
const userByEmail = await lookupUserByEmail({
  email: '[email protected]',
});

Type Safety

All triggers and steps provide full type inference:

import type { InferTriggerPayload, InferTriggerCredentials } from '@wellze/workflow-core';

const messageReceived = webhooks.messageReceived().createTrigger({
  name: 'Message Received',
});

type Payload = InferTriggerPayload<typeof messageReceived>; // SlackEventPayload
type Credentials = InferTriggerCredentials<typeof messageReceived>; // SlackCredentials

Credentials

Slack credentials require:

  • botToken: string - Slack bot token (starts with xoxb-)
  • signingSecret: string - Slack signing secret for webhook verification

Webhook Verification

Slack webhooks are automatically verified using the integration's verification logic, which validates the X-Slack-Signature header using the signing secret.

Event Types

The integration supports the following Slack event types:

  • message - Message posted
  • app_mention - App mentioned
  • channel_created - Channel created
  • member_joined_channel - Member joined channel
  • member_left_channel - Member left channel
  • reaction_added - Reaction added
  • reaction_removed - Reaction removed
  • team_join - Team member joined

Examples

See packages/test-workflows/workflows/ for complete workflow examples using Slack triggers and steps.