From Centro: Robust Automation in Salesforce and Slack using Flow, Platform Events & Workflow Builder

Editor’s Note: UnofficialSF is pleased to enable commercial creators of Flow extensions like Centro to introduce their products and demonstrate useful use cases. One of our goals is to see a rich tier of commercial solutions in addition to the many free extensions that will continue to be available.

Centro leverages the power of Salesforce Flows to automate Slack workflows in conjunction with Slack Workflow builder to create powerful no-code automations between the platforms. Our tools work together with our UI elements that we surface natively on both platforms. For example, our Salesforce Lightning Component displays all linked channels and conversations while our Slack Message Block displays fields from the Compact Layout, related records, and custom buttons. Some use cases we typically hear about:

  • Automate the creation of a channel and give context to the team. For example, an opportunity closes and you want to create an implementation channel for the delivery team to act on with the right context. 
  • Send out Approval requests in Slack with the Quote document attached.
  • Engagement manager, using advanced Slack Workflow and Salesforce Flow. One application of this would be: Someone joins a channel, and you want to bring actions and material from Salesforce, for example, Onboarding a partner in Slack Connect. Custom actions trigger Salesforce Flows, which update or create records. 

We’ll be showing the Engagement Manager use case later in this article, here’s the overview video demo:

Centro also integrates directly with  Slack Workflow Builder. Centro provides key Salesforce Workflow steps there as well, such as searching, updating, creating, and firing Platform Events back in Salesforce. These platform events can then be used to trigger flows, creating a sustainable cycle. See below:

Centro also provides a Form builder where admins create a Form in Slack tied to Salesforce fields. Field labels can be customized, fields can be specified as required or optional (while supporting object-level required fields), and pre-filling default values in hidden fields. Users in Slack Connect channels can fill out a Case without having a login to Salesforce, for example.

Surveying the Tools

First, let’s get oriented with the automation elements. After installing Centro, you’ll find the following actions available for use in Salesforce Flow, you’ll find these elements:

  • Archive Conversation – Does what it sounds like, provides a Slack Channel ID and Centro will Archive the channel. This is useful for tackling Channel proliferation for “quick” conversations. This is in addition to Centro’s out-of-box Archive Channel reminders when creating a Slack Channel manually using our Lightning Web Component
  • Create Channel and Invite Users – This element will create a Slack channel and invite Salesforce users to the channel. Additionally, you may invite Contacts, Leads, or a List of email addresses to a newly created Slack Connect Channel. 
  • Link/Unlink Channel – Associated a Slack channel to a Salesforce Record. Once linked, the channel will appear in the Lightning Web Component.
  • Rename Channel – Given a Slack Channel ID and a valid Slack name, give a channel a new name. Useful for when a Channel topic has changed from say Deal Progress to Implementation. 
  • Send File to Slack – Given a Salesforce File (Content Version ID, specifically) and a Slack channel ID, post that file to Salesforce.
  • Notification Message – Our most used and robust element. This deserves a deeper dive. You may specify a Channel statically or dynamically, post a Salesforce File or Report a custom message, and custom buttons with dynamic button behavior such as go to a URL, fire a Platform Event, or start a Slack Workflow

See our support documentation for more information on Salesforce Flow Elements.

For the Slack Workflow Steps, let’s look at our Salesforce options:

  • Save Salesforce record – This step is dual purpose, if passed a Record ID the step will perform an Update, when left blank the step will create a new record.
  • Select a Salesforce record – Prompts the user to search for a specific record, either using a SOSL search or confined to a specific object. 
  • Post a Salesforce record – given a valid Salesforce record ID, post the Record Details using Centro’s Record Block format
  • Fire Salesforce Platform Event – Sends a Centro Platform Event over to Salesforce. The platform even includes things like Slack User Id, Member Name, Channel Id, and more. 
  • Submit Salesforce Form – Create a form-like experience for users to enter data and create a new record based on the data keyed in. Useful for creating a Form in a Slack Connect channel and we’ll be using this in this example. Filtered lookups, required fields, and custom labels may all be defined. 
  • Grok – Centro’s AI engine leveraging GPT-3 to summarize a channel and post the results either to Slack or Save to Salesforce. A good example might be Case Resolutions or Activity Logs.

See our support documentation for more information on our Slack Workflow steps.

Use Case: Automatic Slack Connect Onboarding with Flow and Slack

Today we’ll focus on an interesting use case that involves Salesforce Flow and Slack Workflow Steps, all from Centro. When using Centro, we take care of the App Scopes, Salesforce user permissions, Field Level Security, and all the other intricacies of setting up an app. For that convenience and no-code ability, Centro is a paid app. There are plenty of good free packages, such as Unofficial Salesforce’s Slack Flow Elements if you want to get your feet wet! You’ll need to create a Slack app, understand Scopes, and user authentication when using those tools.

Let’s get started! The use case today will be: Lakeview Insurance is leveraging Slack Connect to connect with its partners and have an asynchronous dialog with the staff to register deals, log cases, and discuss the partnership. One of its partners, DocumentForce has members come and go, and regularly need to access this Slack Connect channel. Rather than greet every member and onboard each new person from DocumentForce, Lakeview would like to have some automation to cover the basics! That is, for each new member that joins:

  • Send an ephemeral greeting welcoming to the space, and set expectations
  • Allow the new member to create a Case with restricted fields to fill in
  • Read up on a FAQ that’s maintained as a Knowledge Article in Salesforce

In addition, Lakeview wants to capture the new member as a new Contact, and record their engagement when buttons are clicked in Slack.

First, we’ll create a linked Slack Channel to the partner Account. We’ll leverage Centro’s LWC for this. Notice we’ve had other conversations linked to this channel. This lets others review and contribute existing Slack channels:

Let’s create a Slack Connect Channel. The “Create or Link Channel” button presents us with these options:

Note you can invite internal members and also include Salesforce Contacts or emails. Internal members will be automatically added, and the external members will be invited via Slack Connect.

Now we want to have a welcome message when users join the channel. We’ve crafted a Slack Workflow to handle Member On-Join events that works across multiple channels (Slack Workflows are normally relegated to a single channel, this webhook will work in any channel Centro bot is in). The workflow is configured as follows: 

Note that Centro provides a “Fire a Salesforce Platform Event” step, configured in the case as shown:

This will fire anytime someone joins a channel, and pass along to Salesforce the Channel ID, Slack User ID and Member Name. Note that the API name allows multiple unique platform events to be handled in a single Platform Event Triggered Flow!

Now that we’ve captured who joined the channel, let’s handle the Centro Platform event. Since Centro can create Salesforce Platform events from Buttons attached to Slack Messages and from Slack Workflows, we recommend creating a Platform Triggered Flow which we’ll call Centro Platform Event Handler. In this way, button presses from Slack can be managed in a single flow. See below:

This flow is simple: triggered off the provided Centro Platform Event record. The Decision element will be conditional from the Centro API names we provided, each branch will handle the resulting logic!

This example is using the Salesforce Campaign object to provide content to the joining user in the Slack channel. Additionally, we can add the members of the campaign, and keep track of what was clicked for analytics on messaging and actions work the best. Since it’s in Salesforce, it’s easy to report on! We can also capture the user joining the channel from Slack Connect as a new Contact or Lead.  

The Get Records from the campaign is simply getting the Welcome Message content. The Assignment element is setting things like the channel, member ID, and campaign content for our welcome message:

Now that we have our variables set, we’re ready to post our welcome message to the joining user. We’re going to do this ephemerally so that we don’t interrupt the ongoing conversation. This is the Action element with the provided Centro “Post Notification Message”:

Let’s take a minute to review this element. The first option shown sets the channel. We allow a variable or a static channel, in this case, we want to post back to where the member joined the channel so a variable is used. The message body merges in our Campaign welcome message, but static text can be incorporated as well. 

Next we, have some optional details such as posting the record details (we don’t want that in this case, but this can be very useful to provide users context of Salesforce in the message). The Link to Channel option will allow the conversation to be tracked in Salesforce using the Centro Lightning Web Component. Attach Salesforce File attaches a file or Report to the message. Send Ephemeral message is enabled here because we want the welcome message to show up only to the joining user no,t to all channel members. 

Custom buttons can be attached to the message. Notice that they have a defined Centro API name whithatn be handled by our Platform event handler. Button behavior can be defined as well, such as triggering a Slack Workflow Webhook (for example pushing a Form to be filled out), or invoking a Platform Event to invoke another Flow. Notice that the Salesforce authentication can be required or not – in this case, since the users pressing the button don’t have a salesforce license, we will leave it unchecked. 

For this example, we leveraged the powerful native functionality of Salesforce Flow, Slack Workflow Builder, plus the managed Centro elements and steps to build this clean customer experience in Slack. The Centro steps fired Slack Workflow from Salesforce, Salesforce Platform events from Slack, all tied with our easy-to-use interface elements!

Learn more about Centro at, or check out our AppExchange and Slack App Directory listing!