Embed Slack in Sharepoint

In this article we show you how you can embed Live Chat for Slack in a SharePoint Modern Communication website.  

SharePoint doesn't allow you to add a code snippet directly to your website and disables scripting in general.  Now, you can extend your SharePoint communications site to allow inline javascript code snippets so that you can embed your Slack into SharePoint.

First, you can use the SharePoint Framework (SPfx) to extend your SharePoint pages with a Modern Script Editor web part.  This web part enables embedding of a JavaScript code snippet into your pages.  There is a good article explaining this on GitHub:   https://pnp.github.io/sp-dev-fx-webparts/gettingstarted/

Once you have cloned and packaged the Script Editor web part using Node package manager, you can deploy the script editor to your SharePoint site with the app catalog.

SharePoint Script Editor web part

Next, click the 'Edit markup' button to customize your web part.

SharePoint Modern Script Editor

Finally, include your Live Chat for Slack code snippet.  If you haven't added Live Chat for Slack, you can do it here.  Simply click 'Add to Slack' from this page.

Once you've copied and pasted the Javascript code snippet to your web part, you see the live chat icon available on your Microsoft SharePoint website.  Now when you start a chat, the chat request is sent directly to your Slack channel and you can respond to your Sharepoint visitor's questions right from Slack.

Have fun chatting with your Sharepoint visitors from Slack!