This package contains a Slack Integration for accessing and managing data stored in Solid, a Web-based personal data management platform.
At the moment, there are no hosted options for solid-slack
, so you will have to provide your own.
There are a number of free options for hosting a web app. As the developer, I have experimented with Heroku
and Vercel/now.sh
. While I have had tremendous success with the former, I encountered non-trivial challenges with the latter and have concluded that it is not compatible with the deployment model of solid-slack
. That said, I encourage folks to use the platform that they are most comfortable with.
Once you have chosen your hosting platform of preference, deploy this code to that platform. Here are instructions for setting up automated deployments between GitHub and Heroku. Note: if you use the Heroku option, only follow from step 4 onward and take note of the application URL that is generated at the end (e.g., https://my-solid-slack.herokuapp.com). You will have to come back to this platform after the Configuring Slack
below to set the SLACK_ACCESS_TOKEN
and SLACK_SIGNING_SECRET
environment variables.
OK, let's slack
for a bit 😎 Here is some important Slack bookkeeping that you must do before you can use solid-slack
:
- Create a Slack account here if you don't have one already.
- Create a Slack app here.
- In the app view, follow some of the instructions under the
Add features and functionality
section within theBuilding Apps for Slack
block:
- Create a slash command under
Slash Commands
: Fill out the form for generating a slash command and add it to your app. Be sure to use/solid
as theCommand
and the URL that was generated in theHosting solid-slack
section above with theentry
endpoint as theRequest URL
(e.g., https://my-solid-slack.herokuapp.com/entry). Optionally, you may also add a description (e.g.,This app enables users to access data in their Solid pod
) and usage hints (e.g.,[login | logout | profile | account | help]
). - Enable useful actions in your app under
Interactivity & Shortcuts
: Be sure to use the URL that was generated in theHosting solid-slack
section above with theaction
endpoint as theRequest URL
(e.g., https://my-solid-slack.herokuapp.com/action). - Enable appropriate application scopes under
OAuth & Permissions
: Be sure to select the followingBot Token Scopes
:commands
channels:read
chat:write
im:write
links:write
- [Optional] Configure DM with Solid bot under
App Home
: Under theShow Tabs
block, enableMessages Tab
and selectAllow users to send Slash commands and messages from the messages tab
.
- In the app view, install your app under the
Install your app
section within theBuilding Apps for Slack
block. This should generate the necessary OAuth tokens for your workspace and enable you to usesolid-slack
. - Return to the platform configured in the
Hosting solid-slack
section above and set the following environment variables:
SLACK_ACCESS_TOKEN
: use the value that was generated underBot User OAuth Token
in theOAuth Tokens for Your Workspace
block of theOAuth & Permissions
sectionSLACK_SIGNING_SECRET
: use the value that was generated underSigning Secret
in theApp Credentials
block
But wait ... you gotta be solid
before you can slack
... 😅 Here is some important Solid bookkeeping that you must do before you can use solid-slack
:
- In order for you to use
solid-slack
, you must have an account with a Solid compliant identity provider. There are many free community options available out there, including this early and popular one and this one provided by Inrupt, a major gravitational force in the Solid ecosystem today. - If you intend to access private data in your pod (e.g., inbox messages), you must add https://solid-node-client as a trusted app on the pod. This enables
solid-slack
to usesolid-node-client
, an npm module that enables read and write access to your pod. In order to make the appropriate permission updates to your pod, follow these instructions.
Login to your Solid pod with /solid login
View your Solid profile page with /solid profile
Navigate through the data in your Solid account with /solid account
Edit the data in your Solid account while in account view
- While
solid-slack
does not expose Solid authentication key material with Slack, it does submit your plaintext data to the Slack API in order to display your data to you in the view presented with the/solid account
command. This is only as acceptable as the extent to which you trust Slack. Keep this in mind as you navigate your data insolid-slack
. - Remember that you are storing
SLACK_ACCESS_TOKEN
andSLACK_SIGNING_SECRET
on a platform that is hosting your deployment ofsolid-slack
(configured in theHosting solid-slack
section above). Make sure that you trust that platform. You have complete control over your choice of this platform, as it could be a VPS, a local server, or even a Raspberry Pi.
- The Slack API does not allow apps to push more than
3
views to the presentation stack. To make this clear to users, there is a visual aid advising users to continue data navigation in the browser where relevant. This limitation is represented in the code with theVIEW_STACK_LIMIT
constant. - The Slack API does not allow apps to present views that are greater than
3000
characters in length. To make this clear to users, there is a visual aid advising users to view data in the browser where relevant. This limitation is represented in the code with theFILE_SIZE_LIMIT
constant. - The Slack API does not allow apps to present views without content. To make this clear to users, there is a visual aid informing users that the file is empty while also fulfilling this size requirement for view presentation.
- Enable content creation
- Enable content deletion
- Enable content sharing
- Develop a stronger security model that avoids sharing plaintext data with Slack
- Deploy
solid-slack
to production
If any of this is interesting to you, please reach me here to get involved!