Gathering detailed insights and metrics for @slack/webhook
Gathering detailed insights and metrics for @slack/webhook
Gathering detailed insights and metrics for @slack/webhook
Gathering detailed insights and metrics for @slack/webhook
nestjs-slack-webhook
Nest.js + slack-webhook
slack-notify
A simple Node.js wrapper around the Slack webhook API.
winston-slack-webhook
winston slack webhook
@youngkiu/pino-slack-webhook
pino-slack-webhook is a Pino v7+ compatible transport to forward log events to Slack from a dedicated worker
npm install @slack/webhook
52.2
Supply Chain
99
Quality
84.2
Maintenance
100
Vulnerability
100
License
@slack/socket-mode@2.0.3-rc.1
Published on 26 Nov 2024
@slack/cli-hooks@1.1.2
Published on 22 Nov 2024
@slack/cli-test@2.0.0+cli.2.30.1
Published on 04 Nov 2024
@slack/web-api@7.7.0
Published on 23 Oct 2024
@slack/web-api@7.6.0
Published on 08 Oct 2024
@slack/cli-test@1.3.0+cli.2.29.2
Published on 02 Oct 2024
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
3,279 Stars
2,546 Commits
662 Forks
122 Watching
48 Branches
183 Contributors
Updated on 25 Nov 2024
TypeScript (90.05%)
JavaScript (9.72%)
Ruby (0.17%)
Shell (0.06%)
Cumulative downloads
Total Downloads
Last day
-5.2%
105,666
Compared to previous day
Last week
2.2%
580,177
Compared to previous week
Last month
11.8%
2,466,943
Compared to previous month
Last year
25.5%
27,415,477
Compared to previous year
3
21
Visit the documentation site for all the lovely details.
This SDK is a collection of single-purpose packages. The packages are aimed at making building Slack apps easy, performant, secure, and scalable. They can help with just about anything in the Slack platform, from dropping notifications in channels to fully interactive bots.
The Slack platform offers several APIs to build apps. Each Slack API delivers part of the capabilities from the platform, so that you can pick just those that fit for your needs. This SDK offers a corresponding package for each of Slack's APIs. They are small and powerful when used independently, and work seamlessly when used together, too.
Just starting out? The Getting Started tutorial will walk you through building your first Slack app using Node.js.
Slack API | What its for | NPM Package |
---|---|---|
Web API | Send data to or query data from Slack using any of over 220 methods. | @slack/web-api |
OAuth | Setup the authentication flow using V2 OAuth for Slack apps as well as V1 OAuth for classic Slack apps. | @slack/oauth |
Incoming Webhooks | Send notifications to a single channel which the user picks on installation. | @slack/webhook |
Socket Mode | Listen for incoming messages and a limited set of events happening in Slack, using WebSocket. | @slack/socket-mode |
Not sure about which APIs are right for your app? Read our blog post that explains the options. If you're still not sure, reach out for help and our community can guide you.
Deprecation Notice
@slack/events-api
and @slack/interactive-messages
officially reached EOL on May 31st, 2021. Development has fully stopped for these packages and all remaining open issues and pull requests have been closed.
At this time, we recommend migrating to Bolt for JavaScript, a framework that offers all of the functionality available in those packages (and more). To help with that process, we've provided some migration samples for those looking to convert their existing apps.
Use your favorite package manager to install any of the packages and save to your package.json
:
1$ npm install @slack/web-api @slack/socket-mode 2 3# Or, if you prefer yarn 4$ yarn add @slack/web-api @slack/socket-mode
The following examples summarize the most common ways to use this package. There's also a Getting Started tutorial that's perfect for just starting out, and each package's documentation, linked in the table above.
Your app will interact with the Web API through the WebClient
object, which is an export from @slack/web-api
. You
typically instantiate a client with a token you received from Slack. The example below shows how to post a message into
a channel, DM, MPDM, or group. The WebClient
object makes it simple to call any of the over 130 Web API
methods.
1const { WebClient } = require('@slack/web-api'); 2 3// An access token (from your Slack app or custom integration - xoxp, xoxb) 4const token = process.env.SLACK_TOKEN; 5 6const web = new WebClient(token); 7 8// This argument can be a channel ID, a DM ID, a MPDM ID, or a group ID 9const conversationId = 'C1232456'; 10 11(async () => { 12 // See: https://api.slack.com/methods/chat.postMessage 13 const res = await web.chat.postMessage({ channel: conversationId, text: 'Hello there' }); 14 15 // `res` contains information about the posted message 16 console.log('Message sent: ', res.ts); 17})();
Note: To use the example above, the token is required to have either the bot
, chat:user:write
, or
chat:bot:write
scopes.
Tip: Use the Block Kit Builder for a playground where you can prototype your message's look and feel.
Refer to Bolt for JavaScript document pages.
Refer to Bolt for JavaScript document pages.
Refer to the module document page and Bolt for JavaScript document page.
This package supports Node v14 and higher. It's highly recommended to use the latest LTS version of node, and the documentation is written using syntax and features from that version.
If you get stuck, we're here to help. The following are the best ways to get assistance working through your issue:
developers@slack.com
No vulnerabilities found.
Reason
30 commit(s) and 7 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 13/21 approved changesets -- score normalized to 6
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
10 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More