MojarMojar
Connectors

Slack

Post messages to Slack channels from your agent's workflows using a Slack bot token.

The Slack connector lets your agent post messages to any channel in your Slack workspace. Messages can be plain text, Slack-flavoured markdown, or rich Block Kit layouts. You can also thread replies to an existing message.

What you can do

ActionNode typeDescription
Post a messageSlack MessagePost a message to a channel. Supports text, Slack markdown, Block Kit JSON, and threaded replies.

All message fields support {{variable}} template syntax, so the channel and message body can be dynamically filled from earlier workflow steps.

Before you start

You need a Bot User OAuth Token from a Slack app installed in your workspace:

Credential fieldDescription
Bot TokenThe bot token from your Slack app (xoxb-...). Found under OAuth & Permissions after installing the app.
Default ChannelOptional. A fallback channel (e.g. #general) used when the workflow node doesn't specify one explicitly.

The Slack app must have these Bot Token Scopes: chat:write, channels:read, groups:read.

Connect Slack

Create a Slack app.

Go to the Slack API portal and click Create New App. Choose From scratch, give your app a name, and select the workspace to install it to.

Add the required bot scopes.

Under OAuth & Permissions > Bot Token Scopes, add: chat:write, channels:read, groups:read.

Install the app to your workspace.

Click Install to Workspace and authorise. Copy the Bot User OAuth Token (starts with xoxb-).

Invite the bot to the channels it will post to.

In Slack, open the target channel and type /invite @YourBotName, or go to channel settings and add the bot under Integrations.

Enter the credentials in Mojar.

In your agent, open Integrations, find Slack, and click its card. Paste the Bot Token, optionally set a Default Channel, give the connection a name, and click Connect.

Click Verify Connection to confirm the bot token works before saving.

Use it in a workflow

Open a workflow in the workflow editor and click + to add a node.
Select Slack Message from the node picker.
In the node configuration panel, choose your linked Slack credential. Click the lookup button next to the Channel field to browse available channels in your workspace.

Fill in the fields:

  • Channel — the channel ID or name to post to, e.g. {{workflow.slackChannel}} or #alerts
  • Message — the message text (supports Slack markdown and {{variable}} syntax)
  • Blocks — optional Block Kit JSON for rich card layouts
  • Thread timestamp — optional thread_ts value to post the message as a reply in a thread
Save the workflow. When the workflow runs, the bot posts to the specified channel.

The bot must be a member of the channel before it can post. If the workflow fails with a not_in_channel error, invite the bot to that channel in Slack.

On this page