-
Notifications
You must be signed in to change notification settings - Fork 9
Integration: Slack
Andrew Duthie edited this page Nov 26, 2017
·
2 revisions
If you use the Slack chat service in your organization, you can easily record dones with a simple slash command.
Prerequisites:
You will need to install a WordPress plugin which allows external authentication by username and password. For example:
- https://wordpress.org/plugins/application-passwords/
- https://github.com/WP-API/Basic-Auth
Instructions:
Create a Zapier zap trigger:
- Sign up for Zapier or log in to your account
- Navigate to the Zap Editor
- For Trigger, choose Webhooks
- On the Choose Trigger screen, select Catch Hooks and click Continue
- Skip the Pick off a Child Key screen by clicking Continue
- On the Test step, click Copy to clipboard next to the generated URL
- Click the Ok, I did this button
- Keep this tab open in the background while you create the Slack app
Creating a Slack App with Slash Command:
- In a separate tab, navigate to Create A New Slack App
- Create an App Name of your choosing
- For Development Slack Workspace, choose the workspace where the slash command should apply
- Click Create App
- In the application dashboard, click Slash Commands under Features in the sidebar
- Click Create New Command
- Choose a Command to trigger dones recording (example: "/done")
- Paste the generated Zapier URL from the previous section as Request URL
- Enter a Short Description, if you'd like
- In the application dashboard, click Install app under Settings in the sidebar
- Click Install App to Workspace
- Click Authorize to confirm authorization to install the newly created app
- In your Slack workspace, try the command with an example task description. You can choose anything, it won't be saved.
Create a Zapier zap action:
- Return to the Zapier editor where you had set up the trigger
- You should see a Test successful! message. Click Continue
- For Action App, choose Webhooks
- On the Choose Trigger screen, select POST and click Continue
- In URL, enter:
http://example.com/wp-json/dones/v1/dones
, replacingexample.com
with your own website URL - In Data, enter
text
in the first field. Click the plus icon next to the second field and choose Text from the dropdown options - In Basic Auth, enter your Dones site username and password, separated with a
|
pipe character - Click Continue
- Click Skip Test & Continue (unless you want to confirm that your sample Done is created, in which case click Create & Continue)
- Click Finish
- Give your zap a name, then toggle it on
- You're done!