From 33070c356c2f5fc1034ba3b23412dfc5e52a8483 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Tue, 10 Mar 2026 16:13:01 -0700 Subject: [PATCH 1/2] feat(slack): add email field to get user and list users tools --- apps/docs/content/docs/en/tools/slack.mdx | 2 ++ apps/sim/lib/oauth/oauth.ts | 1 + apps/sim/lib/oauth/utils.ts | 1 + apps/sim/tools/slack/get_user.ts | 1 + apps/sim/tools/slack/list_users.ts | 1 + apps/sim/tools/slack/types.ts | 11 +++++++++++ 6 files changed, 17 insertions(+) diff --git a/apps/docs/content/docs/en/tools/slack.mdx b/apps/docs/content/docs/en/tools/slack.mdx index 7ecfe09fe0e..f89be8ef04c 100644 --- a/apps/docs/content/docs/en/tools/slack.mdx +++ b/apps/docs/content/docs/en/tools/slack.mdx @@ -590,6 +590,7 @@ List all users in a Slack workspace. Returns user profiles with names and avatar | ↳ `name` | string | Username \(handle\) | | ↳ `real_name` | string | Full real name | | ↳ `display_name` | string | Display name shown in Slack | +| ↳ `email` | string | Email address \(requires users:read.email scope\) | | ↳ `is_bot` | boolean | Whether the user is a bot | | ↳ `is_admin` | boolean | Whether the user is a workspace admin | | ↳ `is_owner` | boolean | Whether the user is the workspace owner | @@ -629,6 +630,7 @@ Get detailed information about a specific Slack user by their user ID. | ↳ `title` | string | Job title | | ↳ `phone` | string | Phone number | | ↳ `skype` | string | Skype handle | +| ↳ `email` | string | Email address \(requires users:read.email scope\) | | ↳ `is_bot` | boolean | Whether the user is a bot | | ↳ `is_admin` | boolean | Whether the user is a workspace admin | | ↳ `is_owner` | boolean | Whether the user is the workspace owner | diff --git a/apps/sim/lib/oauth/oauth.ts b/apps/sim/lib/oauth/oauth.ts index 0e0221d743c..4eebc0f5849 100644 --- a/apps/sim/lib/oauth/oauth.ts +++ b/apps/sim/lib/oauth/oauth.ts @@ -639,6 +639,7 @@ export const OAUTH_PROVIDERS: Record = { 'im:history', 'im:read', 'users:read', + 'users:read.email', 'files:write', 'files:read', 'canvases:write', diff --git a/apps/sim/lib/oauth/utils.ts b/apps/sim/lib/oauth/utils.ts index 6cdee0220ed..5b8c23d7ea4 100644 --- a/apps/sim/lib/oauth/utils.ts +++ b/apps/sim/lib/oauth/utils.ts @@ -269,6 +269,7 @@ export const SCOPE_DESCRIPTIONS: Record = { 'im:history': 'Read direct message history', 'im:read': 'View direct message channels', 'users:read': 'View workspace users', + 'users:read.email': 'View user email addresses', 'files:write': 'Upload files', 'files:read': 'Download and read files', 'canvases:write': 'Create canvas documents', diff --git a/apps/sim/tools/slack/get_user.ts b/apps/sim/tools/slack/get_user.ts index bc0d803e6b6..4897e5fd835 100644 --- a/apps/sim/tools/slack/get_user.ts +++ b/apps/sim/tools/slack/get_user.ts @@ -85,6 +85,7 @@ export const slackGetUserTool: ToolConfig Date: Tue, 10 Mar 2026 16:27:16 -0700 Subject: [PATCH 2/2] fix(slack): use empty string fallback for email and make type non-optional --- apps/sim/tools/slack/get_user.ts | 2 +- apps/sim/tools/slack/list_users.ts | 2 +- apps/sim/tools/slack/types.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/sim/tools/slack/get_user.ts b/apps/sim/tools/slack/get_user.ts index 4897e5fd835..e63915f844f 100644 --- a/apps/sim/tools/slack/get_user.ts +++ b/apps/sim/tools/slack/get_user.ts @@ -85,7 +85,7 @@ export const slackGetUserTool: ToolConfig