News for hackers. Stuff that matters.
Re:How to build your own Slack integration by wonkaWonka on Monday August 24, 2015 @04:56PM (#10112879)
Also:

  curl -s -o /dev/null --data ' ...the message you were sending... ' https://??? the team subdomain ???.slack.com/services/hooks/slackbot?token=**** the slackbot api token for the channel ****&channel=%23channel???
...have to debug your API token, before you can integrate with it, right?
Re:How to build your own Slack integration by phoenixbox on Monday August 24, 2015 @06:56PM (#10113379)
Hey, not quite sure what the question is, can you rephrase it?

Requests to slack require the slack token to be included in the request params ``` qs: { "token": integration.get('slack_token'), "channel": integration.get('channel_id'), "username": 'Partyline', "attachments": JSON.stringify(attachment), "icon_url": SLACK_BOT_ICON, }, } ```

Re:How to build your own Slack integration by phoenixbox on Monday August 24, 2015 @02:18PM (#10111903)
Hey there, this post came from our experience building Partyline, a Slack integration to manage project management tools.

If anyone has any questions about how we approached building it let us know, we've learned some things along the way, adopting a pattern to make future integrations with GitHub, Trello etc. follow a similar interface. Building for Slack is awesome.

Is anyone else currently building Slack integrations? For local development have you used a secure tunnel service?(ngrok or other) It would be interesting to hear about other peoples dev workflows with Slack.

Partyline is all JS with Hapi.js, using ngrok to help in local dev.

We <3 Slack :)

Re:How to build your own Slack integration by mijustin on Monday August 24, 2015 @02:13PM (#10111858)
Didn't know about the reply function in Slack's API.

This would allow you to send a private message to the user in the #general channel, correct? I can see that being super helpful with a few integrations I'm thinking about.

Re:How to build your own Slack integration by phoenixbox on Monday August 24, 2015 @02:24PM (#10111960)
Its actually the reply handler provided within Hapi, which lets you reply to the request.

For error handling, instructive messages and private messages we use the reply handler to push messages back to the user in the slack channel, visible only to them. Its super handy to cut down on "noise" in the channel but you do lose the rich formatting options in messages.

If the request is coming from the #general channel then that would work, alternatively you would have to build up a separate request using superagent or something