3
9 Comments

Ask IH: How can I embed Slack in a webpage like nomadlist.com/chat/

Nomad List Chat

  1. 2

    You can't. But you can make it look like you can which is what I do :D

    What you need to make this:

    • get the messages from Slack sent to your server
    • save each message in a database, I use SQLite
    • make a page in HTML, CSS that looks like Slack
    • make JS code that polls/AJAX's the server to get the messages
    • the server script, I use PHP, then opens the db to get the latest messages and sends them back in JSON
    • the JS code then prints the messages in HTML

    There's a lot of finnicky things you need to recreate though:

    • @username's should be colored/styled
    • as do https:// links
    • and @channel names

    I don't know of any drop-in solution and I haven't sold it because it seems there isn't much of a market for this >$1,000/mo, but it's somewhat do-able to build yourself. You can copy my styling etc. ofc, just Inspect Element.

    It's a nice way if you have a member site, like I do, to show what members can expect to see/use in Slack when they sign up.

    1. 1

      Thank you. I wonder if @levelsio would consider writing a blog post about how to do this.

  2. 1

    I was looking for this too! Thanks @ami!

    1. 2

      I don't think Chatlio does what I'm looking for, but I've reached out to them via email to check and will report back.

    2. 1

      Response from Chatlio: "Right now that's not an implementation that Chatlio supports. We do however have a lot of requests for this kind of functionality, and we are actively looking at building something like this. I will keep track of this ticket and email you once we have something."

  3. 1

    I took a quick look at the code, seems to be a custom coded solution that polls his own back-end.

    Sounds like something Slack should build and offer as a feature, I'd use it immediately.

  4. 1

    ohhhhhh..I want to know how to do this too!

  5. 1

    Chatlio seems to do this. I have not used it myself.