This is a simple express web server that allows you to interface with the Slack status API from IFTTT. The reason that you need this service is because IFTTT does not play well with url encoded JSON in POST requests. Hopefully Slack will make this repo obsolete by publishing their own IFTTT integration.
- Create a new slack app https://api.slack.com/apps
- In your app settings, navigate to Enable OAuth & Permissions
- Under "Permission Scopes", add the Modify users' profile scope
user.profile:write
and save changes - Scroll to the top and click "Install App to Team".
- In the dialog, click "Authorize"
- Copy your OAuth Access Token and use it for the next step.
SSH into your remote server. In terminal, run the following commands
$ git clone https://github.com/arronhunt/slack-status.git
$ cd slack-status/
$ npm install
$ npm start
To update your status, make a POST request to the server with the following raw body
{
"status_text": "Getting coffee",
"status_emoji": ":coffee:",
"token": "YOUR_TOKEN_HERE"
}
- Create a new applet https://ifttt.com/create
- Select a service as your "if" trigger.
- For the "then" action, search for "Maker Webhook" and click "Make a web request".
- Enter the URL of your server.
http://myserver.com:3000/status/
. - Change the method to
POST
. - Change content type to
application/json
. - In the body, paste the JSON from step 3.
- Click "Create action".