Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions apps/docs/content/docs/en/tools/slack.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -925,6 +925,82 @@ Create a canvas pinned to a Slack channel as its resource hub
| --------- | ---- | ----------- |
| `canvas_id` | string | ID of the created channel canvas |

### `slack_create_conversation`

Create a new public or private channel in a Slack workspace.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `authMethod` | string | No | Authentication method: oauth or bot_token |
| `botToken` | string | No | Bot token for Custom Bot |
| `name` | string | Yes | Name of the channel to create \(lowercase, numbers, hyphens, underscores only; max 80 characters\) |
| `isPrivate` | boolean | No | Create a private channel instead of a public one \(default: false\) |
| `teamId` | string | No | Encoded team ID to create the channel in \(required if using an org token\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `channelInfo` | object | The newly created channel object |
| ↳ `id` | string | Channel ID \(e.g., C1234567890\) |
| ↳ `name` | string | Channel name without # prefix |
| ↳ `is_channel` | boolean | Whether this is a channel |
| ↳ `is_private` | boolean | Whether channel is private |
| ↳ `is_archived` | boolean | Whether channel is archived |
| ↳ `is_general` | boolean | Whether this is the general channel |
| ↳ `is_member` | boolean | Whether the bot/user is a member |
| ↳ `is_shared` | boolean | Whether channel is shared across workspaces |
| ↳ `is_ext_shared` | boolean | Whether channel is externally shared |
| ↳ `is_org_shared` | boolean | Whether channel is org-wide shared |
| ↳ `num_members` | number | Number of members in the channel |
| ↳ `topic` | string | Channel topic |
| ↳ `purpose` | string | Channel purpose/description |
| ↳ `created` | number | Unix timestamp when channel was created |
| ↳ `creator` | string | User ID of channel creator |
| ↳ `updated` | number | Unix timestamp of last update |

### `slack_invite_to_conversation`

Invite one or more users to a Slack channel. Supports up to 100 users at a time.

#### Input

| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `authMethod` | string | No | Authentication method: oauth or bot_token |
| `botToken` | string | No | Bot token for Custom Bot |
| `channel` | string | Yes | The ID of the channel to invite users to |
| `users` | string | Yes | Comma-separated list of user IDs to invite \(up to 100\) |
| `force` | boolean | No | When true, continues inviting valid users while skipping invalid ones \(default: false\) |

#### Output

| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `channelInfo` | object | The channel object after inviting users |
| ↳ `id` | string | Channel ID \(e.g., C1234567890\) |
| ↳ `name` | string | Channel name without # prefix |
| ↳ `is_channel` | boolean | Whether this is a channel |
| ↳ `is_private` | boolean | Whether channel is private |
| ↳ `is_archived` | boolean | Whether channel is archived |
| ↳ `is_general` | boolean | Whether this is the general channel |
| ↳ `is_member` | boolean | Whether the bot/user is a member |
| ↳ `is_shared` | boolean | Whether channel is shared across workspaces |
| ↳ `is_ext_shared` | boolean | Whether channel is externally shared |
| ↳ `is_org_shared` | boolean | Whether channel is org-wide shared |
| ↳ `num_members` | number | Number of members in the channel |
| ↳ `topic` | string | Channel topic |
| ↳ `purpose` | string | Channel purpose/description |
| ↳ `created` | number | Unix timestamp when channel was created |
| ↳ `creator` | string | User ID of channel creator |
| ↳ `updated` | number | Unix timestamp of last update |
| `errors` | array | Per-user errors when force is true and some invitations failed |
| ↳ `user` | string | User ID that failed |
| ↳ `ok` | boolean | Always false for error entries |
| ↳ `error` | string | Error code for this user |

### `slack_open_view`

Open a modal view in Slack using a trigger_id from an interaction payload. Used to display forms, confirmations, and other interactive modals.
Expand Down
10 changes: 9 additions & 1 deletion apps/sim/app/(landing)/integrations/data/integrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -9581,6 +9581,14 @@
"name": "Create Channel Canvas",
"description": "Create a canvas pinned to a Slack channel as its resource hub"
},
{
"name": "Create Conversation",
"description": "Create a new public or private channel in a Slack workspace."
},
{
"name": "Invite to Conversation",
"description": "Invite one or more users to a Slack channel. Supports up to 100 users at a time."
},
{
"name": "Open View",
"description": "Open a modal view in Slack using a trigger_id from an interaction payload. Used to display forms, confirmations, and other interactive modals."
Expand All @@ -9598,7 +9606,7 @@
"description": "Publish a static view to a user"
}
],
"operationCount": 23,
"operationCount": 25,
"triggers": [
{
"id": "slack_webhook",
Expand Down
108 changes: 108 additions & 0 deletions apps/sim/blocks/blocks/slack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
{ label: 'Get User Presence', id: 'get_user_presence' },
{ label: 'Edit Canvas', id: 'edit_canvas' },
{ label: 'Create Channel Canvas', id: 'create_channel_canvas' },
{ label: 'Create Conversation', id: 'create_conversation' },
{ label: 'Invite to Conversation', id: 'invite_to_conversation' },
{ label: 'Open View', id: 'open_view' },
{ label: 'Update View', id: 'update_view' },
{ label: 'Push View', id: 'push_view' },
Expand Down Expand Up @@ -144,6 +146,7 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
'get_user',
'get_user_presence',
'edit_canvas',
'create_conversation',
'open_view',
'update_view',
'push_view',
Expand Down Expand Up @@ -179,6 +182,7 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
'get_user',
'get_user_presence',
'edit_canvas',
'create_conversation',
'open_view',
'update_view',
'push_view',
Expand Down Expand Up @@ -816,6 +820,70 @@ Return ONLY the timestamp string - no explanations, no quotes, no extra text.`,
value: 'create_channel_canvas',
},
},
// Create Conversation specific fields
{
id: 'conversationName',
title: 'Channel Name',
type: 'short-input',
placeholder: 'e.g., project-updates',
condition: {
field: 'operation',
value: 'create_conversation',
},
required: true,
},
{
id: 'isPrivate',
title: 'Private Channel',
type: 'dropdown',
options: [
{ label: 'No', id: 'false' },
{ label: 'Yes', id: 'true' },
],
value: () => 'false',
condition: {
field: 'operation',
value: 'create_conversation',
},
},
{
id: 'teamId',
title: 'Team ID',
type: 'short-input',
placeholder: 'Encoded team ID (org tokens only)',
condition: {
field: 'operation',
value: 'create_conversation',
},
mode: 'advanced',
},
// Invite to Conversation specific fields
{
id: 'inviteUsers',
title: 'User IDs',
type: 'short-input',
placeholder: 'Comma-separated user IDs (e.g., U123,U456)',
condition: {
field: 'operation',
value: 'invite_to_conversation',
},
required: true,
},
{
id: 'inviteForce',
title: 'Skip Invalid Users',
type: 'dropdown',
options: [
{ label: 'No', id: 'false' },
{ label: 'Yes', id: 'true' },
],
value: () => 'false',
condition: {
field: 'operation',
value: 'invite_to_conversation',
},
mode: 'advanced',
},
// Open View / Push View specific fields
{
id: 'viewTriggerId',
Expand Down Expand Up @@ -990,6 +1058,8 @@ Do not include any explanations, markdown formatting, or other text outside the
'slack_get_user_presence',
'slack_edit_canvas',
'slack_create_channel_canvas',
'slack_create_conversation',
'slack_invite_to_conversation',
'slack_open_view',
'slack_update_view',
'slack_push_view',
Expand Down Expand Up @@ -1036,6 +1106,10 @@ Do not include any explanations, markdown formatting, or other text outside the
return 'slack_edit_canvas'
case 'create_channel_canvas':
return 'slack_create_channel_canvas'
case 'create_conversation':
return 'slack_create_conversation'
case 'invite_to_conversation':
return 'slack_invite_to_conversation'
case 'open_view':
return 'slack_open_view'
case 'update_view':
Expand Down Expand Up @@ -1090,6 +1164,11 @@ Do not include any explanations, markdown formatting, or other text outside the
canvasTitle,
channelCanvasTitle,
channelCanvasContent,
conversationName,
isPrivate,
teamId,
inviteUsers,
inviteForce,
viewTriggerId,
viewInteractivityPointer,
viewId,
Expand Down Expand Up @@ -1264,6 +1343,21 @@ Do not include any explanations, markdown formatting, or other text outside the
}
break

case 'create_conversation':
baseParams.name = conversationName
baseParams.isPrivate = isPrivate === 'true'
if (teamId) {
baseParams.teamId = teamId
}
break

case 'invite_to_conversation':
baseParams.users = inviteUsers
if (inviteForce === 'true') {
baseParams.force = true
}
break

case 'open_view':
baseParams.triggerId = viewTriggerId
if (viewInteractivityPointer) {
Expand Down Expand Up @@ -1367,6 +1461,13 @@ Do not include any explanations, markdown formatting, or other text outside the
// Create Channel Canvas inputs
channelCanvasTitle: { type: 'string', description: 'Title for channel canvas' },
channelCanvasContent: { type: 'string', description: 'Content for channel canvas' },
// Create Conversation inputs
conversationName: { type: 'string', description: 'Name for the new channel' },
isPrivate: { type: 'string', description: 'Create as private channel (true/false)' },
teamId: { type: 'string', description: 'Encoded team ID for org tokens' },
// Invite to Conversation inputs
inviteUsers: { type: 'string', description: 'Comma-separated user IDs to invite' },
inviteForce: { type: 'string', description: 'Skip invalid users (true/false)' },
// View operation inputs
viewTriggerId: { type: 'string', description: 'Trigger ID from interaction payload' },
viewInteractivityPointer: {
Expand Down Expand Up @@ -1524,6 +1625,13 @@ Do not include any explanations, markdown formatting, or other text outside the
'View object with properties: id, team_id, type, title, submit, close, blocks, private_metadata, callback_id, external_id, state, hash, clear_on_close, notify_on_close, root_view_id, previous_view_id, app_id, bot_id',
},

// slack_invite_to_conversation outputs (invite_to_conversation operation)
errors: {
type: 'json',
description:
'Array of per-user error objects when force is true and some invitations failed (user, ok, error)',
},

// Trigger outputs (when used as webhook trigger)
event_type: { type: 'string', description: 'Type of Slack event that triggered the workflow' },
channel_name: { type: 'string', description: 'Human-readable channel name' },
Expand Down
4 changes: 4 additions & 0 deletions apps/sim/tools/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1948,6 +1948,7 @@ import {
slackAddReactionTool,
slackCanvasTool,
slackCreateChannelCanvasTool,
slackCreateConversationTool,
slackDeleteMessageTool,
slackDownloadTool,
slackEditCanvasTool,
Expand All @@ -1957,6 +1958,7 @@ import {
slackGetThreadTool,
slackGetUserPresenceTool,
slackGetUserTool,
slackInviteToConversationTool,
slackListChannelsTool,
slackListMembersTool,
slackListUsersTool,
Expand Down Expand Up @@ -2822,6 +2824,8 @@ export const tools: Record<string, ToolConfig> = {
slack_publish_view: slackPublishViewTool,
slack_edit_canvas: slackEditCanvasTool,
slack_create_channel_canvas: slackCreateChannelCanvasTool,
slack_create_conversation: slackCreateConversationTool,
slack_invite_to_conversation: slackInviteToConversationTool,
github_repo_info: githubRepoInfoTool,
github_repo_info_v2: githubRepoInfoV2Tool,
github_latest_commit: githubLatestCommitTool,
Expand Down
Loading
Loading