Integration: Slack - aduth/dones GitHub Wiki

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:

Instructions:

Create a Zapier zap trigger:

  1. Sign up for Zapier or log in to your account
  2. Navigate to the Zap Editor
  3. For Trigger, choose Webhooks
  4. On the Choose Trigger screen, select Catch Hooks and click Continue
  5. Skip the Pick off a Child Key screen by clicking Continue
  6. On the Test step, click Copy to clipboard next to the generated URL
  7. Click the Ok, I did this button
  8. Keep this tab open in the background while you create the Slack app

Creating a Slack App with Slash Command:

  1. In a separate tab, navigate to Create A New Slack App
  2. Create an App Name of your choosing
  3. For Development Slack Workspace, choose the workspace where the slash command should apply
  4. Click Create App
  5. In the application dashboard, click Slash Commands under Features in the sidebar
  6. Click Create New Command
  7. Choose a Command to trigger dones recording (example: "/done")
  8. Paste the generated Zapier URL from the previous section as Request URL
  9. Enter a Short Description, if you'd like
  10. In the application dashboard, click Install app under Settings in the sidebar
  11. Click Install App to Workspace
  12. Click Authorize to confirm authorization to install the newly created app
  13. 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:

  1. Return to the Zapier editor where you had set up the trigger
  2. You should see a Test successful! message. Click Continue
  3. For Action App, choose Webhooks
  4. On the Choose Trigger screen, select POST and click Continue
  5. In URL, enter: http://example.com/wp-json/dones/v1/dones, replacing example.com with your own website URL
  6. In Data, enter text in the first field. Click the plus icon next to the second field and choose Text from the dropdown options
  7. In Basic Auth, enter your Dones site username and password, separated with a | pipe character
  8. Click Continue
  9. Click Skip Test & Continue (unless you want to confirm that your sample Done is created, in which case click Create & Continue)
  10. Click Finish
  11. Give your zap a name, then toggle it on
  12. You're done!