MessagingSlack Integration
Messaging

Slack Integration

Slack API Client for Node.js Provides comprehensive access to Slack's Web API with support for messages, channels, users, and more.

Slack

Category: Messaging
Provider Key: Slack
SDK Packages: @slack/web-api@^7.13.0, @slack/bolt@^4.6.0

Slack API Client for Node.js Provides comprehensive access to Slack's Web API with support for messages, channels, users, and more.


Configuration

To use Slack in your project, add it to your project integrations and provide the following configuration:

ParameterTypeRequiredDescription
tokenstringYesSlack bot token (xoxb-* or xoxp-*)
timeoutnumberNoRequest timeout in milliseconds
logLevelstringNoLogging level (debug, info, warn, error)

Example Configuration

{
  "provider": "Slack",
  "configuration": [
    { "name": "token", "value": "your-token" },
    { "name": "timeout", "value": 0 },
    { "name": "logLevel", "value": "your-logLevel" }
  ]
}

Available Methods

Quick reference:

  • Conversations: listConversations, createConversation, getConversation, updateConversation, archiveConversation, inviteUsersToConversation, removeUserFromConversation
  • Messages: postMessage, updateMessage, deleteMessage, getConversationHistory
  • Users: listUsers, getUser, setUserStatus
  • Files: uploadFile, listFiles, deleteFile
  • Reactions: addReaction, removeReaction
  • DirectMessages: openDirectMessage
  • Search: searchMessages

Conversations

listConversations

List Conversations

Lists all conversations (channels, direct messages, and group messages).

Parameters:

ParameterTypeRequiredDescription
excludeArchivedstringNoExclude archived conversations (true/false)
limitnumberNoMaximum number of conversations to return (default: 100)
cursorstringNoPagination cursor

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "listConversationsAction",
  "provider": "Slack",
  "action": "listConversations",
  "parameters": [
    { "parameterName": "excludeArchived", "parameterValue": "'your-excludeArchived'" },
    { "parameterName": "limit", "parameterValue": "0" },
    { "parameterName": "cursor", "parameterValue": "'your-cursor'" }
  ],
  "contextPropertyName": "listConversationsResult"
}

MScript example:

await _Slack.listConversations({
  excludeArchived: /* string */,
  limit: /* number */,
  cursor: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("Slack");
const result = await client.listConversations({
  excludeArchived: /* string */,
  limit: /* number */,
  cursor: /* string */,
});

createConversation

Create Conversation

Creates a new conversation (channel).

Parameters:

ParameterTypeRequiredDescription
namestringYesName of the new channel (required)
isPrivatebooleanNoWhether the channel should be private (default: false)
descriptionstringNoChannel description/topic

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "createConversationAction",
  "provider": "Slack",
  "action": "createConversation",
  "parameters": [
    { "parameterName": "name", "parameterValue": "'your-name'" },
    { "parameterName": "isPrivate", "parameterValue": "true" },
    { "parameterName": "description", "parameterValue": "'your-description'" }
  ],
  "contextPropertyName": "createConversationResult"
}

MScript example:

await _Slack.createConversation({
  name: /* string */,
  isPrivate: /* boolean */,
  description: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("Slack");
const result = await client.createConversation({
  name: /* string */,
  isPrivate: /* boolean */,
  description: /* string */,
});

getConversation

Get Conversation

Gets information about a specific conversation.

Parameters:

ParameterTypeRequiredDescription
channelIdstringYesChannel ID (required)

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "getConversationAction",
  "provider": "Slack",
  "action": "getConversation",
  "parameters": [
    { "parameterName": "channelId", "parameterValue": "'your-channelId'" }
  ],
  "contextPropertyName": "getConversationResult"
}

MScript example:

await _Slack.getConversation({
  channelId: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("Slack");
const result = await client.getConversation({
  channelId: /* string */,
});

updateConversation

Update Conversation

Updates conversation topic and/or purpose.

Parameters:

ParameterTypeRequiredDescription
channelIdstringYesChannel ID (required)
topicstringNoChannel topic
purposestringNoChannel purpose

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "updateConversationAction",
  "provider": "Slack",
  "action": "updateConversation",
  "parameters": [
    { "parameterName": "channelId", "parameterValue": "'your-channelId'" },
    { "parameterName": "topic", "parameterValue": "'your-topic'" },
    { "parameterName": "purpose", "parameterValue": "'your-purpose'" }
  ],
  "contextPropertyName": "updateConversationResult"
}

MScript example:

await _Slack.updateConversation({
  channelId: /* string */,
  topic: /* string */,
  purpose: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("Slack");
const result = await client.updateConversation({
  channelId: /* string */,
  topic: /* string */,
  purpose: /* string */,
});

archiveConversation

Archive Conversation

Archives a conversation.

Parameters:

ParameterTypeRequiredDescription
channelIdstringYesChannel ID (required)

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "archiveConversationAction",
  "provider": "Slack",
  "action": "archiveConversation",
  "parameters": [
    { "parameterName": "channelId", "parameterValue": "'your-channelId'" }
  ],
  "contextPropertyName": "archiveConversationResult"
}

MScript example:

await _Slack.archiveConversation({
  channelId: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("Slack");
const result = await client.archiveConversation({
  channelId: /* string */,
});

inviteUsersToConversation

Invite Users to Conversation

Invites users to a conversation.

Parameters:

ParameterTypeRequiredDescription
channelIdstringYesChannel ID (required)
userIdsArray<string>YesArray of user IDs to invite (required)

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "inviteUsersToConversationAction",
  "provider": "Slack",
  "action": "inviteUsersToConversation",
  "parameters": [
    { "parameterName": "channelId", "parameterValue": "'your-channelId'" },
    { "parameterName": "userIds", "parameterValue": "'your-userIds'" }
  ],
  "contextPropertyName": "inviteUsersToConversationResult"
}

MScript example:

await _Slack.inviteUsersToConversation({
  channelId: /* string */,
  userIds: /* Array<string> */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("Slack");
const result = await client.inviteUsersToConversation({
  channelId: /* string */,
  userIds: /* Array<string> */,
});

removeUserFromConversation

Remove User from Conversation

Removes a user from a conversation.

Parameters:

ParameterTypeRequiredDescription
channelIdstringYesChannel ID (required)
userIdstringYesUser ID to remove (required)

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "removeUserFromConversationAction",
  "provider": "Slack",
  "action": "removeUserFromConversation",
  "parameters": [
    { "parameterName": "channelId", "parameterValue": "'your-channelId'" },
    { "parameterName": "userId", "parameterValue": "'your-userId'" }
  ],
  "contextPropertyName": "removeUserFromConversationResult"
}

MScript example:

await _Slack.removeUserFromConversation({
  channelId: /* string */,
  userId: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("Slack");
const result = await client.removeUserFromConversation({
  channelId: /* string */,
  userId: /* string */,
});

Messages

postMessage

Post Message

Posts a message to a conversation.

Parameters:

ParameterTypeRequiredDescription
channelIdstringYesChannel ID (required)
textstringYesMessage text
blocksArrayNoBlock Kit blocks for rich formatting
threadTimestampstringNoThread timestamp for threaded replies
replyBroadcastbooleanNoBroadcast threaded reply to channel

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "postMessageAction",
  "provider": "Slack",
  "action": "postMessage",
  "parameters": [
    { "parameterName": "channelId", "parameterValue": "'your-channelId'" },
    { "parameterName": "text", "parameterValue": "'your-text'" },
    { "parameterName": "blocks", "parameterValue": "[]" },
    { "parameterName": "threadTimestamp", "parameterValue": "'your-threadTimestamp'" },
    { "parameterName": "replyBroadcast", "parameterValue": "true" }
  ],
  "contextPropertyName": "postMessageResult"
}

MScript example:

await _Slack.postMessage({
  channelId: /* string */,
  text: /* string */,
  blocks: /* Array */,
  threadTimestamp: /* string */,
  replyBroadcast: /* boolean */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("Slack");
const result = await client.postMessage({
  channelId: /* string */,
  text: /* string */,
  blocks: /* Array */,
  threadTimestamp: /* string */,
  replyBroadcast: /* boolean */,
});

updateMessage

Update Message

Updates an existing message.

Parameters:

ParameterTypeRequiredDescription
channelIdstringYesChannel ID (required)
timestampstringYesMessage timestamp (required)
textstringNoUpdated message text
blocksArrayNoUpdated Block Kit blocks

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "updateMessageAction",
  "provider": "Slack",
  "action": "updateMessage",
  "parameters": [
    { "parameterName": "channelId", "parameterValue": "'your-channelId'" },
    { "parameterName": "timestamp", "parameterValue": "'your-timestamp'" },
    { "parameterName": "text", "parameterValue": "'your-text'" },
    { "parameterName": "blocks", "parameterValue": "[]" }
  ],
  "contextPropertyName": "updateMessageResult"
}

MScript example:

await _Slack.updateMessage({
  channelId: /* string */,
  timestamp: /* string */,
  text: /* string */,
  blocks: /* Array */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("Slack");
const result = await client.updateMessage({
  channelId: /* string */,
  timestamp: /* string */,
  text: /* string */,
  blocks: /* Array */,
});

deleteMessage

Delete Message

Deletes a message.

Parameters:

ParameterTypeRequiredDescription
channelIdstringYesChannel ID (required)
timestampstringYesMessage timestamp (required)

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "deleteMessageAction",
  "provider": "Slack",
  "action": "deleteMessage",
  "parameters": [
    { "parameterName": "channelId", "parameterValue": "'your-channelId'" },
    { "parameterName": "timestamp", "parameterValue": "'your-timestamp'" }
  ],
  "contextPropertyName": "deleteMessageResult"
}

MScript example:

await _Slack.deleteMessage({
  channelId: /* string */,
  timestamp: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("Slack");
const result = await client.deleteMessage({
  channelId: /* string */,
  timestamp: /* string */,
});

getConversationHistory

Get Conversation History

Retrieves conversation history (messages).

Parameters:

ParameterTypeRequiredDescription
channelIdstringYesChannel ID (required)
limitnumberNoMaximum messages to return (default: 100)
cursorstringNoPagination cursor
latestTimestampstringNoLatest message timestamp (for pagination)

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "getConversationHistoryAction",
  "provider": "Slack",
  "action": "getConversationHistory",
  "parameters": [
    { "parameterName": "channelId", "parameterValue": "'your-channelId'" },
    { "parameterName": "limit", "parameterValue": "0" },
    { "parameterName": "cursor", "parameterValue": "'your-cursor'" },
    { "parameterName": "latestTimestamp", "parameterValue": "'your-latestTimestamp'" }
  ],
  "contextPropertyName": "getConversationHistoryResult"
}

MScript example:

await _Slack.getConversationHistory({
  channelId: /* string */,
  limit: /* number */,
  cursor: /* string */,
  latestTimestamp: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("Slack");
const result = await client.getConversationHistory({
  channelId: /* string */,
  limit: /* number */,
  cursor: /* string */,
  latestTimestamp: /* string */,
});

Users

listUsers

List Users

Lists all users in the workspace.

Parameters:

ParameterTypeRequiredDescription
limitnumberNoMaximum users to return (default: 100)
cursorstringNoPagination cursor

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "listUsersAction",
  "provider": "Slack",
  "action": "listUsers",
  "parameters": [
    { "parameterName": "limit", "parameterValue": "0" },
    { "parameterName": "cursor", "parameterValue": "'your-cursor'" }
  ],
  "contextPropertyName": "listUsersResult"
}

MScript example:

await _Slack.listUsers({
  limit: /* number */,
  cursor: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("Slack");
const result = await client.listUsers({
  limit: /* number */,
  cursor: /* string */,
});

getUser

Get User

Gets information about a specific user.

Parameters:

ParameterTypeRequiredDescription
userIdstringYesUser ID (required)

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "getUserAction",
  "provider": "Slack",
  "action": "getUser",
  "parameters": [
    { "parameterName": "userId", "parameterValue": "'your-userId'" }
  ],
  "contextPropertyName": "getUserResult"
}

MScript example:

await _Slack.getUser({
  userId: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("Slack");
const result = await client.getUser({
  userId: /* string */,
});

setUserStatus

Set User Status

Sets a user's status and status text.

Parameters:

ParameterTypeRequiredDescription
statusEmojistringYesStatus emoji (e.g., ':coffee:')
statusTextstringYesStatus text message

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "setUserStatusAction",
  "provider": "Slack",
  "action": "setUserStatus",
  "parameters": [
    { "parameterName": "statusEmoji", "parameterValue": "'your-statusEmoji'" },
    { "parameterName": "statusText", "parameterValue": "'your-statusText'" }
  ],
  "contextPropertyName": "setUserStatusResult"
}

MScript example:

await _Slack.setUserStatus({
  statusEmoji: /* string */,
  statusText: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("Slack");
const result = await client.setUserStatus({
  statusEmoji: /* string */,
  statusText: /* string */,
});

Files

uploadFile

Upload File

Uploads a file to a conversation.

Parameters:

ParameterTypeRequiredDescription
channelIdstringYesChannel ID (required)
filenamestringYesFile name (required)
fileContent`Bufferstring`Yes
titlestringNoFile title
mimeTypestringNoMIME type of the file

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "uploadFileAction",
  "provider": "Slack",
  "action": "uploadFile",
  "parameters": [
    { "parameterName": "channelId", "parameterValue": "'your-channelId'" },
    { "parameterName": "filename", "parameterValue": "'your-filename'" },
    { "parameterName": "fileContent", "parameterValue": "'your-fileContent'" },
    { "parameterName": "title", "parameterValue": "'your-title'" },
    { "parameterName": "mimeType", "parameterValue": "'your-mimeType'" }
  ],
  "contextPropertyName": "uploadFileResult"
}

MScript example:

await _Slack.uploadFile({
  channelId: /* string */,
  filename: /* string */,
  fileContent: /* Buffer|string */,
  title: /* string */,
  mimeType: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("Slack");
const result = await client.uploadFile({
  channelId: /* string */,
  filename: /* string */,
  fileContent: /* Buffer|string */,
  title: /* string */,
  mimeType: /* string */,
});

listFiles

List Files

Lists files in the workspace or a specific channel.

Parameters:

ParameterTypeRequiredDescription
channelIdstringNoFilter by channel ID
limitnumberNoMaximum files to return (default: 100)
cursorstringNoPagination cursor

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "listFilesAction",
  "provider": "Slack",
  "action": "listFiles",
  "parameters": [
    { "parameterName": "channelId", "parameterValue": "'your-channelId'" },
    { "parameterName": "limit", "parameterValue": "0" },
    { "parameterName": "cursor", "parameterValue": "'your-cursor'" }
  ],
  "contextPropertyName": "listFilesResult"
}

MScript example:

await _Slack.listFiles({
  channelId: /* string */,
  limit: /* number */,
  cursor: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("Slack");
const result = await client.listFiles({
  channelId: /* string */,
  limit: /* number */,
  cursor: /* string */,
});

deleteFile

Delete File

Deletes a file.

Parameters:

ParameterTypeRequiredDescription
fileIdstringYesFile ID (required)

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "deleteFileAction",
  "provider": "Slack",
  "action": "deleteFile",
  "parameters": [
    { "parameterName": "fileId", "parameterValue": "'your-fileId'" }
  ],
  "contextPropertyName": "deleteFileResult"
}

MScript example:

await _Slack.deleteFile({
  fileId: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("Slack");
const result = await client.deleteFile({
  fileId: /* string */,
});

Reactions

addReaction

Add Reaction

Adds a reaction emoji to a message.

Parameters:

ParameterTypeRequiredDescription
channelIdstringYesChannel ID (required)
timestampstringYesMessage timestamp (required)
emojistringYesEmoji name without colons (e.g., 'thumbsup') (required)

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "addReactionAction",
  "provider": "Slack",
  "action": "addReaction",
  "parameters": [
    { "parameterName": "channelId", "parameterValue": "'your-channelId'" },
    { "parameterName": "timestamp", "parameterValue": "'your-timestamp'" },
    { "parameterName": "emoji", "parameterValue": "'your-emoji'" }
  ],
  "contextPropertyName": "addReactionResult"
}

MScript example:

await _Slack.addReaction({
  channelId: /* string */,
  timestamp: /* string */,
  emoji: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("Slack");
const result = await client.addReaction({
  channelId: /* string */,
  timestamp: /* string */,
  emoji: /* string */,
});

removeReaction

Remove Reaction

Removes a reaction emoji from a message.

Parameters:

ParameterTypeRequiredDescription
channelIdstringYesChannel ID (required)
timestampstringYesMessage timestamp (required)
emojistringYesEmoji name without colons (required)

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "removeReactionAction",
  "provider": "Slack",
  "action": "removeReaction",
  "parameters": [
    { "parameterName": "channelId", "parameterValue": "'your-channelId'" },
    { "parameterName": "timestamp", "parameterValue": "'your-timestamp'" },
    { "parameterName": "emoji", "parameterValue": "'your-emoji'" }
  ],
  "contextPropertyName": "removeReactionResult"
}

MScript example:

await _Slack.removeReaction({
  channelId: /* string */,
  timestamp: /* string */,
  emoji: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("Slack");
const result = await client.removeReaction({
  channelId: /* string */,
  timestamp: /* string */,
  emoji: /* string */,
});

DirectMessages

openDirectMessage

Open Direct Message

Opens a direct message with a user.

Parameters:

ParameterTypeRequiredDescription
userIdstringYesUser ID (required)

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "openDirectMessageAction",
  "provider": "Slack",
  "action": "openDirectMessage",
  "parameters": [
    { "parameterName": "userId", "parameterValue": "'your-userId'" }
  ],
  "contextPropertyName": "openDirectMessageResult"
}

MScript example:

await _Slack.openDirectMessage({
  userId: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("Slack");
const result = await client.openDirectMessage({
  userId: /* string */,
});

searchMessages

Search Messages

Searches for messages in the workspace.

Parameters:

ParameterTypeRequiredDescription
querystringYesSearch query (required)
countnumberNoMaximum results (default: 20)
sortstringNoSort order ('score' or 'timestamp', default: 'score')

IntegrationAction example:

{
  "extendClassName": "IntegrationAction",
  "name": "searchMessagesAction",
  "provider": "Slack",
  "action": "searchMessages",
  "parameters": [
    { "parameterName": "query", "parameterValue": "'your-query'" },
    { "parameterName": "count", "parameterValue": "0" },
    { "parameterName": "sort", "parameterValue": "'your-sort'" }
  ],
  "contextPropertyName": "searchMessagesResult"
}

MScript example:

await _Slack.searchMessages({
  query: /* string */,
  count: /* number */,
  sort: /* string */,
})

Service library example:

const { getIntegrationClient } = require("integrations");
const client = await getIntegrationClient("Slack");
const result = await client.searchMessages({
  query: /* string */,
  count: /* number */,
  sort: /* string */,
});