Sending a Slack message
Send an automated message to a user or channel in Slack.
You can add a workflow step that sends a Slack message to an individual, public channel or private channel. This is useful for sending notifications to people within your organization. You can also include buttons in the Slack message so that the recipient(s) can respond to the notification and trigger the next step in the workflow.

Prerequisites

To send Slack messages from a workflow, you need a direct integration to Slack with the "Send messages" feature enabled.
  • You can check whether an integration already exists from the Admin > Integrations view. For information about setting up a direct integration to Slack, see Help with specific integrations - Slack.
  • To check which features are enabled, select the Overview tab, click the menu icon and select Credentials. If required, select Send messages and click Reconnect.
The "Send messages" feature is enabled in the Slack integration settings.
To send messages to a private channel in Slack, you also need to add the Trelica app to the private channel.

Setting the message recipient

You can send Slack messages to individuals, to a public channel or to a private channel.

To send a Slack message to an individual:

  1. 1.
    Set the Recipient type to Person.
  2. 2.
    From the To list select one or more roles and/or users. If the workflow trigger or a previous filter step identified a particular app, selecting a role (such as Business Owner or IT Admin) will send a message to the person in that role for the app in question. Similarly, if a person using a particular app (such as a person with administrator permissions for the app) has been identified in the workflow trigger or a previous step, selecting App user will identify that person.
  3. 3.
    If you selected a role rather than specific user in the previous step, there is a risk that the person identified for a particular workflow run will not have an account in your instance of Slack. To ensure that the Slack message is still sent, you can select a backup recipient. The message is only sent to the Slack user identified in the Backup field if the intended recipient (in the To field) does not have an account in Slack.

To send a Slack message to a public channel:

  1. 1.
    Set the Recipient type to Public channel.
  2. 2.
    Select the channel name from the list.

To send a Slack message to a private channel:

  1. 1.
    Set the Recipient type to Private channel.
  2. 2.
    Open Slack, select the private channel in question and then click the channel name. The channel details dialog is displayed.
  3. 3.
    The channel ID is displayed at the bottom of the dialog. Copy the channel ID to the clipboard.
  4. 4.
    Return to Trelica and paste the channel ID into the Channel ID field.
  5. 5.
    Click the search icon. If Trelica is able to send messages to the channel, the channel name is displayed.
β€πŸ§™πŸΎβ€β™‚οΈ If Trelica cannot find the channel, ensure you have added the Trelica app to the private channel: in Slack, open the channel details, select Integrations and click Add an App.
Searching for the private channel ID confirms the channel name.

Editing the title and message text

Enter the title and message text that you want to send each time the workflow runs. If the workflow trigger or a previous step identified an app or a person using an app, you can include these details using merge fields. Click Insert field to select from a list of available merge fields. For example, including #application will include the name of the relevant app.
You can format the message using Slack's version of markdown. The title is formatted in bold type by default.
πŸ§™β€β™‚οΈ The title is displayed in the Slack desktop or mobile notification. If you don't include a title, a preview of the message is displayed instead.
To preview the message in Slack, click Test and select a recipient. The message is delivered by the Trelica app.
The "Test" option is displayed when the "Send Slack message" step is selected.

Embedding buttons to drive workflow logic

You can include buttons in a Slack message and use these to drive subsequent workflow steps. This is useful if you need a person to answer a question to determine the next step of the workflow.
For example, if you have a step that sends a Slack message to the IT Admin of a particular app to notify them of unused accounts, you could include buttons to ask if they want to deprovision the user account. If they click "Deprovision", this could trigger a deprovisioning workflow step, whereas if they click "Keep user" this could create a task to remind them to review the situation in a month's time.
You can embed one or two buttons in a Slack message. You can trigger subsequent stages of the workflow based on the button that is clicked or if no response is provided within a specified number of days. Use the workflow outline on the left-hand side to add further steps for each possible outcome.
If you have opted to resend the message if no response is received, the 'No response' route will only become active once the final reminder has been sent and the time limit has again elapsed without a response. For example, if you set the response time limit to five days and configure one reminder, the message will be resent after five days and the outcome will be treated as 'no response' after ten days.
Including buttons in a Slack message.
You can verify the behavior of the buttons by testing the full workflow. Click Save draft or Update and then expand the context menu and click Trigger now.
Copy link
Outline
Prerequisites
Setting the message recipient
Editing the title and message text
Embedding buttons to drive workflow logic