

You can create such kind of bot.
This plugin integrates Slack and WordPress.
By default, this plugin does nothing. It’s true.
Slack has many API integration, but hameslack uses 2 of them.
Upper is easier. This plugin helps the connection between Slack and WordPress and you can concentrate on what you should do with slack.
Here is a list of use case of us on WordPress with many editors.
For more details, please read the Addons documentation.
The simplest usage is post to slack. You can do like below:
do_action( 'hameslack', $text_to_post, $attachments, $channel );
Function hameslack_post( $content, $attachment, $channel ) is also available, but I prefer to use do_action to avoid annoying if ( function_exists('func_name')).
Everything works fine if you set properly.
deprecated at 2.0: this endpoint was unofficial and official one is only for Enterprise grid. Users now can send invitation reqeust from their profile page.deprecated at 2.0: Slack recommends Events API instead.Click install and activate it.
Download from Releases and you can use it. Any pull requests are welcomed.
To post a message to slack, you need Payload URL. Create an app and activate “Incoming Webhooks”.
Now you can get payload URL.
To get Bot Token, go to “OAuth & Permissions”. By installing your app to your workspace, Bot token will be generated.
As mentioned above, this plugin does nothing by default. Enable built-in addons from the settings page, or read the Addons documentation to write your own.
If you have any request, please make issue on github.
This plugin requires custom code to work with your Slack workspace. Here’s how to set up a local development environment.
Install dependencies
npm install composer installStart WordPress local environment
npm startBuild assets
npm run packageWatch for changes during development
npm run watch
Slack requires a public HTTPS URL for Event Subscriptions and Interactive Components. Use Cloudflare Tunnel to expose your local environment:
In a separate terminal, start the tunnel
npm run tunnel
This gives you a temporary public URL like https://random-name.trycloudflare.com. Then:
https://random-name.trycloudflare.com/wp-json/hameslack/v1/...Note: Make sure WordPress permalink settings are not set to “Plain” — pretty permalinks are required for /wp-json/ to work through the tunnel.
Command
Description
npm start
Start wp-env
npm run package
Build all assets (CSS + JS)
npm run watch
Watch for file changes
npm run tunnel
Open Cloudflare Tunnel to localhost:8888
npm run lint
Run ESLint + Stylelint
npm run fix
Auto-fix lint errors
npm test
Run PHPUnit tests