EDD Slack - Setting up a Slack App
These steps are optional, but unlock extra functionality within EDD Slack. If you follow these steps, you will be able to perform actions on your site directly from a Slack Notification by clicking a Button within a Slack notification as well as return data from your site using Slash Commands.
To proceed, your site must have SSL!
If your site has SSL enabled, you will see some additional options below the created Slack Notifications:
At the top of this section, a list of any available Triggers that support Interactive Buttons will be displayed. If none are shown, you can still benefit from setting this up to use Slash Commands!
This functionality is based around linking a Slack App to your website. Follow the link to create your own Slack App by the “Create New App” button to get started.
Initially Linking the Slack App
The App Name field can be anything you want. It is used within Slash Commands as the “Username” when it returns data back to you. The “Development Slack Team” field should match the Team you want to link your EDD store to. You should leave “I plan to submit this app to the Slack App Directory” unchecked, as this will be specific to your site and no one else could benefit from installing it for their Team. Click “Create App” to continue.
The next screen will show you your Client ID and Client Secret for the Slack App. Enter these back in the EDD Slack Settings and click “Save Changes” at the bottom of the screen.
Before you can click the “Link Slack App” button that appears, you will need to define a Redirect URL for the Slack App. Back in the settings for the Slack App you created, click “Oauth and Permissions” on the left of the screen. Enter https://yoursite.com/wp-admin/edit.php?post_type=download&page=edd-settings&tab=extensionsion=edd-slack-settings where yoursite.com is the Domain of your site and click “Save Changes”.
Now you can return to the EDD Slack Settings page and click the “Link Slack App” button. This will popup a new window where you will sign in to your Team that was set before to Authorize the Slack App on your site. Similarly to the Webhook URLs before, this will mean that it is restricted to the same Channels that the Slack User who linked the Slack App to the site has access to within the chosen Team.
Once Authorized, the popup window will close on its own and the EDD Slack Settings Page will refresh, presenting you with a “Slack App Linked Successfully” message.
Now that this step has been completed, API Endpoints have opened on your site. These are used for both Interactive Notifications and Slash Commands.
Now that the API Endpoints have been configured, the Verification Token field is available. This is necessary for ensuring that interactions with your Slack App are valid and not someone discovering your API Endpoints and trying to send spam Notifications to your Slack Team.
Return to the “Basic Information” tab of the settings for your Slack App and you will see the new Verification Token field. Copy this into the EDD Slack Settings Page in the “Verification Token” field and click “Save Changes”.