Send Slack Messages from your Ruby on Rails Server
2 min readOct 9, 2020
Quickly start sending Slack messages from your Ruby on Rails backend without the need for any third party libraries!
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
- From the Slack Desktop client click on your workspace name, select tools and then “Workflow Builder”.
- Click “Create” on the top right corner.
- Type a name for your workflow such as: “My First Workflow”. This name will appear as the title of messages created by the workflow.
- In the “Choose a way to start this workflow” window select “Webhook advanced” and feel proud that you are an advanced user!
- In the “Webhook” window create a variable of type text called message.
- 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.