Download the PHP package geniusdev/magento2_slack without Composer
On this page you can find all versions of the php package geniusdev/magento2_slack. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download geniusdev/magento2_slack
More information about geniusdev/magento2_slack
Files in geniusdev/magento2_slack
Package magento2_slack
Short Description Slack integration for Magento 2
License OSL-3.0
Informations about the package magento2_slack
GeniusDev Slack Integration for Magento 2
This module provides a simple way to integrate Slack notifications into your Magento 2 store. It supports both Slack Webhooks and Bot User OAuth Tokens.
Installation
Configuration
To configure the module, go to Stores > Configuration > GeniusDev > Slack.
General Configuration
- Communication Option: Choose between
OAuthorWebhook. - Channel: The Slack channel name (e.g.,
#general) or ID where messages should be sent. - Bot User OAuth Token: Required if
OAuthis selected. - Webhook URL: Required if
Webhookis selected.
Usage
You can send Slack messages by injecting GeniusDev\Slack\Model\SlackClientProvider into your class.
Example
Table Support
You can easily generate Slack table blocks using GeniusDev\Slack\Model\Slack\Block\Table.
php use GeniusDev\Slack\Model\Slack\Block\Header as HeaderBlock;
// ...
public function __construct( private SlackClientProvider $slackClientProvider, private HeaderBlock $headerBlock ) {}
public function sendWithHeader() { $header = $this->headerBlock->create('A Heartfelt Header');
$this->slackClientProvider->getClient()->sendBlocks([$header]);
} bash composer require league/html-to-markdown
## License
OSL-3.0All versions of magento2_slack with dependencies
jolicode/slack-php-api Version ^4.9
magento/framework Version ^103.0
nyholm/psr7 Version ^1.8
symfony/http-client Version ^7.4