Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

feat: slack fdw (#35053)

Alaister Youngef4b8beac314
diff --git a/apps/studio/components/interfaces/Integrations/Wrappers/Wrappers.constants.ts b/apps/studio/components/interfaces/Integrations/Wrappers/Wrappers.constants.ts
index e32bbb46416..a6b2bb40718 100644
--- a/apps/studio/components/interfaces/Integrations/Wrappers/Wrappers.constants.ts
+++ b/apps/studio/components/interfaces/Integrations/Wrappers/Wrappers.constants.ts
@@ -19,6 +19,7 @@ export const WRAPPER_HANDLERS = {
CALENDLY: 'wasm_fdw_handler',
CLERK: 'wasm_fdw_handler',
NOTION: 'wasm_fdw_handler',
+ SLACK: 'wasm_fdw_handler',
}
export const WRAPPERS: WrapperMeta[] = [
@@ -3064,4 +3065,255 @@ export const WRAPPERS: WrapperMeta[] = [
},
],
},
+ {
+ name: 'slack_wrapper',
+ description:
+ 'Query Slack workspaces, channels, messages, users, files, and more via the Slack API.',
+ handlerName: WRAPPER_HANDLERS.SLACK,
+ validatorName: 'wasm_fdw_validator',
+ icon: `${BASE_PATH}/img/icons/slack-icon.svg`,
+ extensionName: 'SlackFdw',
+ label: 'Slack',
+ docsUrl: 'https://fdw.dev/catalog/slack/',
+ minimumExtensionVersion: '0.4.0',
+ server: {
+ options: [
+ {
+ name: 'fdw_package_url',
+ label: 'FDW Package URL',
+ required: true,
+ encrypted: false,
+ secureEntry: false,
+ defaultValue:
+ 'https://github.com/supabase/wrappers/releases/download/wasm_slack_fdw_v0.1.0/slack_fdw.wasm',
+ hidden: true,
+ },
+ {
+ name: 'fdw_package_name',
+ label: 'FDW Package Name',
+ required: true,
+ encrypted: false,
+ secureEntry: false,
+ defaultValue: 'supabase:slack-fdw',
+ hidden: true,
+ },
+ {
+ name: 'fdw_package_version',
+ label: 'FDW Package Version',
+ required: true,
+ encrypted: false,
+ secureEntry: false,
+ defaultValue: '0.1.0',
+ hidden: true,
+ },
+ {
+ name: 'fdw_package_checksum',
+ label: 'FDW Package Checksum',
+ required: true,
+ encrypted: false,
+ secureEntry: false,
+ defaultValue: '5b022b441c0007e31d792ecb1341bfffed1c29cb865eb0c7969989dff0e8fdc3',
+ hidden: true,
+ },
+ {
+ name: 'api_token_id',
+ label: 'Slack Bot User OAuth Token',
+ required: true,
+ encrypted: true,
+ secureEntry: true,
+ urlHelper: 'https://api.slack.com/apps',
+ },
+ {
+ name: 'workspace',
+ label: 'Workspace',
+ required: false,
+ encrypted: false,
+ secureEntry: false,
+ },
+ ],
+ },
+ tables: [
+ {
+ label: 'Channels',
+ description: 'All channels in the workspace',
+ availableColumns: [
+ { name: 'id', type: 'text' },
+ { name: 'name', type: 'text' },
+ { name: 'is_private', type: 'boolean' },
+ { name: 'created', type: 'timestamp' },
+ { name: 'creator', type: 'text' },
+ ],
+ options: [
+ {
+ name: 'resource',
+ defaultValue: 'channels',
+ editable: false,
+ required: true,
+ type: 'text',
+ },
+ ],
+ },
+ {
+ label: 'Messages',
+ description: 'Messages from channels, DMs, and group messages',
+ availableColumns: [
+ { name: 'ts', type: 'text' },
+ { name: 'user_id', type: 'text' },
+ { name: 'channel_id', type: 'text' },
+ { name: 'text', type: 'text' },
+ { name: 'thread_ts', type: 'text' },
+ { name: 'reply_count', type: 'integer' },
+ ],
+ options: [
+ {
+ name: 'resource',
+ defaultValue: 'messages',
+ editable: false,
+ required: true,
+ type: 'text',
+ },
+ ],
+ },
+ {
+ label: 'Users',
+ description: 'All users in the workspace',
+ availableColumns: [
+ { name: 'id', type: 'text' },
+ { name: 'name', type: 'text' },
+ { name: 'real_name', type: 'text' },
+ { name: 'display_name', type: 'text' },
+ { name: 'display_name_normalized', type: 'text' },
+ { name: 'real_name_normalized', type: 'text' },
+ { name: 'email', type: 'text' },
+ { name: 'phone', type: 'text' },
+ { name: 'skype', type: 'text' },
+ { name: 'is_admin', type: 'boolean' },
+ { name: 'is_owner', type: 'boolean' },
+ { name: 'is_primary_owner', type: 'boolean' },
+ { name: 'is_bot', type: 'boolean' },
+ { name: 'is_app_user', type: 'boolean' },
+ { name: 'is_restricted', type: 'boolean' },
+ { name: 'is_ultra_restricted', type: 'boolean' },
+ { name: 'deleted', type: 'boolean' },
+ { name: 'status_text', type: 'text' },
+ { name: 'status_emoji', type: 'text' },
+ { name: 'status_expiration', type: 'bigint' },
+ { name: 'title', type: 'text' },
+ { name: 'team_id', type: 'text' },
+ { name: 'team', type: 'text' },
+ { name: 'tz', type: 'text' },
+ { name: 'tz_label', type: 'text' },
+ { name: 'tz_offset', type: 'integer' },
+ { name: 'locale', type: 'text' },
+ { name: 'image_24', type: 'text' },
+ { name: 'image_48', type: 'text' },
+ { name: 'image_72', type: 'text' },
+ { name: 'image_192', type: 'text' },
+ { name: 'image_512', type: 'text' },
+ { name: 'color', type: 'text' },
+ { name: 'updated', type: 'bigint' },
+ ],
+ options: [
+ {
+ name: 'resource',
+ defaultValue: 'users',
+ editable: false,
+ required: true,
+ type: 'text',
+ },
+ ],
+ },
+ {
+ label: 'User Groups',
+ description: 'User groups in the workspace',
+ availableColumns: [
+ { name: 'id', type: 'text' },
+ { name: 'team_id', type: 'text' },
+ { name: 'name', type: 'text' },
+ { name: 'handle', type: 'text' },
+ { name: 'description', type: 'text' },
+ { name: 'is_external', type: 'boolean' },
+ { name: 'date_create', type: 'bigint' },
+ { name: 'date_update', type: 'bigint' },
+ { name: 'date_delete', type: 'bigint' },
+ { name: 'auto_type', type: 'text' },
+ { name: 'created_by', type: 'text' },
+ { name: 'updated_by', type: 'text' },
+ { name: 'deleted_by', type: 'text' },
+ { name: 'user_count', type: 'integer' },
+ { name: 'channel_count', type: 'integer' },
+ ],
+ options: [
+ {
+ name: 'resource',
+ defaultValue: 'usergroups',
+ editable: false,
+ required: true,
+ type: 'text',
+ },
+ ],
+ },
+ {
+ label: 'User Group Members',
+ description: 'Membership relation between users and user groups',
+ availableColumns: [
+ { name: 'usergroup_id', type: 'text' },
+ { name: 'usergroup_name', type: 'text' },
+ { name: 'usergroup_handle', type: 'text' },
+ { name: 'user_id', type: 'text' },
+ ],
+ options: [
+ {
+ name: 'resource',
+ defaultValue: 'usergroup_members',
+ editable: false,
+ required: true,
+ type: 'text',
+ },
+ ],
+ },
+ {
+ label: 'Files',
+ description: 'Files shared in the workspace',
+ availableColumns: [
+ { name: 'id', type: 'text' },
+ { name: 'name', type: 'text' },
+ { name: 'title', type: 'text' },
+ { name: 'mimetype', type: 'text' },
+ { name: 'size', type: 'bigint' },
+ { name: 'url_private', type: 'text' },
+ { name: 'user_id', type: 'text' },
+ { name: 'created', type: 'timestamp' },
+ ],
+ options: [
+ {
+ name: 'resource',
+ defaultValue: 'files',
+ editable: false,
+ required: true,
+ type: 'text',
+ },
+ ],
+ },
+ {
+ label: 'Team Info',
+ description: 'Information about the Slack team/workspace',
+ availableColumns: [
+ { name: 'id', type: 'text' },
+ { name: 'name', type: 'text' },
+ { name: 'domain', type: 'text' },
+ { name: 'email_domain', type: 'text' },
+ ],
+ options: [
+ {
+ name: 'resource',
+ defaultValue: 'team-info',
+ editable: false,
+ required: true,
+ type: 'text',
+ },
+ ],
+ },
+ ],
+ },
]
diff --git a/apps/studio/static-data/integrations/slack_wrapper/overview.md b/apps/studio/static-data/integrations/slack_wrapper/overview.md
new file mode 100644
index 00000000000..422276225dd
--- /dev/null
+++ b/apps/studio/static-data/integrations/slack_wrapper/overview.md
@@ -0,0 +1,3 @@
+Slack is a messaging app for business that connects people to the information they need. By bringing people together to work as one unified team, Slack transforms the way organizations communicate.
+
+The Slack Wrapper is a WebAssembly (Wasm) foreign data wrapper which allows you to query Slack workspaces, channels, messages, and users directly from your Postgres database.