Contact Us 1-800-596-4880

Slack Connector Reference

Use Slack as a data source or target. For example, you can send a Slack message when a Salesforce opportunity is won. Some details of how to work with data in a flow are specific to this system, and to the actions you choose.

Connections

To connect to a system, whether it is a source of data or the target where you are sending data, you must create a connection with that system’s required credentials. You typically connect to different systems within a flow and can reuse each connection every time you need to connect.

This system requires the following credential information for its connections:

Connection Name

Enter a connection name that will help you remember the details of this connection. You can reuse connections multiple times in a single flow, and in more than one flow, and the credentials are hidden after you create the connection. Therefore, it’s helpful to provide a name that easily identifies this connection from others.

Only you can see the connection. Other users in your Composer app must create their own connections.

Workspace Name

The Slack workspace name, for example, my-workspace.slack.com

Username and password

The username and password that you use to log in to Slack

Triggers

Each flow starts with either a scheduler or a trigger. Schedulers are set to a default frequency of 15 minutes. Triggers, such as "each time a new record is created", are defined by you and provide multiple options related to the data in your system.

Triggers use a polling process to actively check for new updates from an external system. The polling frequency is 15 seconds.

This system provides the following trigger options:

On New Message

When this trigger fires, new messages are available for subsequent steps. To use this trigger, you must add the Composer app to the specific channel you want to use. For more information, see the Slack documentation.

Polling Frequency

For triggers in this connector, the Polling Frequency field is required. This field enables you to select how often Composer makes a request to the underling system API to look for changes to records in active flows. You can select a different polling frequency for each flow in your organization. With a shorter frequency, the flow executes more often; however, a shorter frequency consumes more API calls. For example, if you have an order management flow, you might require nearly real-time updates, which can be achieved with a 15-second polling interval (which equates to 5760 API calls per day). In contrast, if your flow updates a pricing catalog, you could poll the flow every hour (which equates to 24 API calls per day).

Actions

After you connect to a system and define the trigger or configure a scheduler, you define the actions that the flow performs. For example, you can copy a record between different systems, such as Workday and Salesforce. The actions you can perform depend on which system you are connected to.

This system provides the following actions:

Send a direct message to a user

To post a direct message to a specified user, supply the following information:

  • User: The ID of the user to receive the message.

  • Message: The message to be sent. You can choose from several options:

    • Enter text.

    • Select a data pill.

    • Select Custom Expression to add any combination of text and data pills.

  • Bot Name: By default, the sender of Slack messages generated by an action is MuleSoft Composer. You can supply a different name here for the messages sent by this action.

  • Bot Icon URL: By default, the sender of Slack messages generated by an action is MuleSoft Composer, and includes the MuleSoft logo in icon form. You can supply a different icon for the messages sent by this action. Specify an icon URL whose access is not restricted.

Post message to channel

Post a new message to a specific private or public channel that you select. To post a message to a private channel, you must first add the MuleSoft Platform app to that private channel.

  • Channel Name: A channel in the Slack workspace that you select from a drop-down list of the existing channels.

  • Message: The message to be sent. You can choose from several options:

    • Enter text.

    • Select a data pill.

    • Select Custom Expression to add any combination of text and data pills.

  • Bot Name: By default, the sender of Slack messages generated by an action is MuleSoft Composer. You can supply a different name for the messages sent by this action.

  • Bot Icon URL: By default, the sender of Slack messages generated by an action is MuleSoft Composer, and includes the MuleSoft logo in icon form. You can supply a different icon for the messages sent by this action. Specify an icon URL whose access is not restricted.

Get user by email

Find a Slack user by entering their email address into the Email field.

If you want to fetch the user’s ID dynamically, you can insert this action, which fetches the Slack user by an email address from another system. Use the ID data pill returned by this action to specify the user who should receive the message.

Add users to channel

Invites users to a channel. This action requires a new connection. Provide a value for the following fields:

  • Channel Name: A channel in the Slack workspace that you select from a drop-down list of the existing channels.

  • User IDs: IDs of the users to add to a channel.

Create channel

Creates a public or private channel-based conversation. This action requires a new connection. Provide a value for the following fields:

  • Name: The name of the channel to create.

  • Is Private: Determines whether the channel to create is private or public.

  • Team Id: The encoded ID of the team in which to create the channel. This ID is required if the org token is used.

Send direct message to multiple users

Sends a direct message to a multi-person direct message channel. Provide a value for the following fields:

  • Channel Name: A channel in the Slack workspace that you select from a drop-down list of the existing channels.

  • Attachments: At least one attachment for the content of the message.

  • Blocks: At least one block for the content of the message.

  • Text: At least one text argument for the content of the message.

  • Icon Emoji: The emoji to use as the icon for the message. Overrides Icon Url.

  • Icon Url: The URL to an image to use as the icon for the message.

  • Link Names: Find and link user groups.

  • Metadata: JSON object presented as a URL-encoded string.

  • Mrkdwn: Disable Slack markup parsing by setting this field to false.

  • Parse: Change how messages are parsed.

  • Reply broadcast: Indicates whether the reply is visible to everyone in the channel or conversation. Used in conjunction with Thread ts.

  • Thread ts: Provide another message’s ts value to make this message a reply. Avoid using a reply’s ts value and use its parent’s ts value instead.

  • Unfurl links: Enable the unfurling of primarily text-based content by setting this field to true.

  • Unfurl media: Enable the unfurling of media content by setting this field to true.

  • Username: Set your bot’s username.