Setup

Paula works as a Slack application. It is possible to deploy Paula in your own Slack workspace, you just need to host her in a server with PostgreSQL, and create a Slack app that references an API endpoint.

As of now, Paula is deployed in a Heroku web server with Postgres installed. I send HTTP requests from my Slack application to that server, while the logs are recorded inside the database.

In order to have a fully-working Paula environment, you need to perform the following steps:

  1. Create a Slack Application
  2. Download and initialize Paula in a machine
  3. Start the Paula server

Create a Slack Application

First, we need to create a Slack application that will send HTTP requests to a server. You can go to this link to start one. You can name that application however you want, mine’s “Feels Tracker”:

Once you have successfully created your application, you should be able to see it in your Application Homepage:

Now it’s time to create slash commands and bots for you to interact with. Select your app from the homepage and head over to the “Add features and functionality dropdown”

Create Slash commands

Here is a list of slash commands we need to add. Be sure to add all of them to unlock all functionalities of Paula.

Create the Paula bot

You can choose any Display name for your Paula Bot (mine’s just named P.A.U.L.A.), but ensure that its default username is paula-bot.

Download and initialize Paula in a machine

Paula runs on Go v1.12 and above. In your server, you can download the latest binaries in the Github Releases tab, or you can clone and build Paula yourself:

$ git clone git@github.com:ljvmiranda921/paula.git
$ cd paula
$ go get
$ go install .

In the same directory, create a paula.yaml file and enter the Postgres database URL and the Slack verification token:

dburl: <POSTGRES_DBURL> # postgres://user:database@host:password
token: <SLACK_TOKEN> # token from previous step

Then run:

$ paula init --config path/to/paula.yaml

The init subcommand creates the required database tables, checks if the Slack token works, and configures the application.

Start the Paula Server

Once compiled, you can now start the Paula server:

paula start --dburl <POSTGRES_DBURL> --token <SLACK_TOKEN>

It is not safe to put credentials in the command-line. I only did that because it is not straightforward to obtain secrets from a file in Heroku. In case you’re running in a different server, I highly recommend using the config file:

paula start --config path/to/paula.yaml

Paula is now running and you should be able to send requests to that server! Why don’t you try logging your first Feel event? In any Slack channel, type:

/ifeel green "Paula is now deployed!"