Send Slack Messages from your Ruby on Rails Server

Paulo Carvalho
2 min readOct 9, 2020

Quickly start sending Slack messages from your Ruby on Rails backend without the need for any third party libraries!

Photo by Scott Webb on Unsplash

Introduction

Slack provides several ways to integrate with the platform. Among these integration options are the Slack Workflows. In this article, we will go over setting up one of these workflows and use it to provide a Ruby on Rails backend a way to post messages to Slack.

Methods

Setup the Workflow in Slack

  1. From the Slack Desktop client click on your workspace name, select tools and then “Workflow Builder”.
  2. Click “Create” on the top right corner.
  3. Type a name for your workflow such as: “My First Workflow”. This name will appear as the title of messages created by the workflow.
  4. In the “Choose a way to start this workflow” window select “Webhook advanced” and feel proud that you are an advanced user!
  5. In the “Webhook” window create a variable of type text called message.
  6. At this point, a workflow has been created. Add a step to the created workflow to “Send a message”. Select the channel your integration should be sending messages to and use our variable message in the notification body.

--

--

Paulo Carvalho

Want to chat about startups, consulting or engineering? Just send me an email on paulo@avantsoft.com.br.