Skip to main content

Slack full reference

This is the full reference documentation for the Slack agent connector.

Supported entities and actions

The Slack connector supports the following entities and actions.

EntityActions
UsersList, Get
ChannelsList, Get
Channel MessagesList
ThreadsList

Users

Users List

Returns a list of all users in the Slack workspace

Python SDK

await slack.users.list()

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances/{your_connector_instance_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "users",
"action": "list"
}'

Parameters

Parameter NameTypeRequiredDescription
cursorstringNoPagination cursor for next page
limitintegerNoNumber of users to return per page
Response Schema

Records

Field NameTypeDescription
idstring
team_idstring | null
namestring | null
deletedboolean | null
colorstring | null
real_namestring | null
tzstring | null
tz_labelstring | null
tz_offsetinteger | null
profileobject | any
is_adminboolean | null
is_ownerboolean | null
is_primary_ownerboolean | null
is_restrictedboolean | null
is_ultra_restrictedboolean | null
is_botboolean | null
is_app_userboolean | null
updatedinteger | null
is_email_confirmedboolean | null
who_can_share_contact_cardstring | null

Meta

Field NameTypeDescription
next_cursorstring | null

Users Get

Get information about a single user by ID

Python SDK

await slack.users.get(
user="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances/{your_connector_instance_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "users",
"action": "get",
"params": {
"user": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
userstringYesUser ID
Response Schema

Records

Field NameTypeDescription
idstring
team_idstring | null
namestring | null
deletedboolean | null
colorstring | null
real_namestring | null
tzstring | null
tz_labelstring | null
tz_offsetinteger | null
profileobject | any
is_adminboolean | null
is_ownerboolean | null
is_primary_ownerboolean | null
is_restrictedboolean | null
is_ultra_restrictedboolean | null
is_botboolean | null
is_app_userboolean | null
updatedinteger | null
is_email_confirmedboolean | null
who_can_share_contact_cardstring | null

Channels

Channels List

Returns a list of all channels in the Slack workspace

Python SDK

await slack.channels.list()

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances/{your_connector_instance_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "channels",
"action": "list"
}'

Parameters

Parameter NameTypeRequiredDescription
cursorstringNoPagination cursor for next page
limitintegerNoNumber of channels to return per page
typesstringNoMix and match channel types (public_channel, private_channel, mpim, im)
exclude_archivedbooleanNoExclude archived channels
Response Schema

Records

Field NameTypeDescription
idstring
namestring | null
is_channelboolean | null
is_groupboolean | null
is_imboolean | null
is_mpimboolean | null
is_privateboolean | null
createdinteger | null
is_archivedboolean | null
is_generalboolean | null
unlinkedinteger | null
name_normalizedstring | null
is_sharedboolean | null
is_org_sharedboolean | null
is_pending_ext_sharedboolean | null
pending_sharedarray | null
context_team_idstring | null
updatedinteger | null
creatorstring | null
is_ext_sharedboolean | null
shared_team_idsarray | null
pending_connected_team_idsarray | null
is_memberboolean | null
topicobject | any
purposeobject | any
previous_namesarray | null
num_membersinteger | null
parent_conversationstring | null
propertiesobject | null
is_thread_onlyboolean | null
is_read_onlyboolean | null

Meta

Field NameTypeDescription
next_cursorstring | null

Channels Get

Get information about a single channel by ID

Python SDK

await slack.channels.get(
channel="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances/{your_connector_instance_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "channels",
"action": "get",
"params": {
"channel": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
channelstringYesChannel ID
Response Schema

Records

Field NameTypeDescription
idstring
namestring | null
is_channelboolean | null
is_groupboolean | null
is_imboolean | null
is_mpimboolean | null
is_privateboolean | null
createdinteger | null
is_archivedboolean | null
is_generalboolean | null
unlinkedinteger | null
name_normalizedstring | null
is_sharedboolean | null
is_org_sharedboolean | null
is_pending_ext_sharedboolean | null
pending_sharedarray | null
context_team_idstring | null
updatedinteger | null
creatorstring | null
is_ext_sharedboolean | null
shared_team_idsarray | null
pending_connected_team_idsarray | null
is_memberboolean | null
topicobject | any
purposeobject | any
previous_namesarray | null
num_membersinteger | null
parent_conversationstring | null
propertiesobject | null
is_thread_onlyboolean | null
is_read_onlyboolean | null

Channel Messages

Channel Messages List

Returns messages from a channel

Python SDK

await slack.channel_messages.list(
channel="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances/{your_connector_instance_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "channel_messages",
"action": "list",
"params": {
"channel": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
channelstringYesChannel ID to get messages from
cursorstringNoPagination cursor for next page
limitintegerNoNumber of messages to return per page
oldeststringNoStart of time range (Unix timestamp)
lateststringNoEnd of time range (Unix timestamp)
inclusivebooleanNoInclude messages with oldest or latest timestamps
Response Schema

Records

Field NameTypeDescription
typestring | null
subtypestring | null
tsstring
userstring | null
textstring | null
thread_tsstring | null
reply_countinteger | null
reply_users_countinteger | null
latest_replystring | null
reply_usersarray | null
is_lockedboolean | null
subscribedboolean | null
reactionsarray | null
reactions[].namestring | null
reactions[].usersarray | null
reactions[].countinteger | null
attachmentsarray | null
attachments[].idinteger | null
attachments[].fallbackstring | null
attachments[].colorstring | null
attachments[].pretextstring | null
attachments[].author_namestring | null
attachments[].author_linkstring | null
attachments[].author_iconstring | null
attachments[].titlestring | null
attachments[].title_linkstring | null
attachments[].textstring | null
attachments[].fieldsarray | null
attachments[].image_urlstring | null
attachments[].thumb_urlstring | null
attachments[].footerstring | null
attachments[].footer_iconstring | null
attachments[].tsstring | integer | null
blocksarray | null
filesarray | null
files[].idstring | null
files[].namestring | null
files[].titlestring | null
files[].mimetypestring | null
files[].filetypestring | null
files[].pretty_typestring | null
files[].userstring | null
files[].sizeinteger | null
files[].modestring | null
files[].is_externalboolean | null
files[].external_typestring | null
files[].is_publicboolean | null
files[].public_url_sharedboolean | null
files[].url_privatestring | null
files[].url_private_downloadstring | null
files[].permalinkstring | null
files[].permalink_publicstring | null
files[].createdinteger | null
files[].timestampinteger | null
editedobject | any
bot_idstring | null
bot_profileobject | any
app_idstring | null
teamstring | null

Meta

Field NameTypeDescription
next_cursorstring | null
has_moreboolean | null

Threads

Threads List

Returns messages in a thread (thread replies from conversations.replies endpoint)

Python SDK

await slack.threads.list(
channel="<str>"
)

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances/{your_connector_instance_id}/execute' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"entity": "threads",
"action": "list",
"params": {
"channel": "<str>"
}
}'

Parameters

Parameter NameTypeRequiredDescription
channelstringYesChannel ID containing the thread
tsstringNoTimestamp of the parent message (required for thread replies)
cursorstringNoPagination cursor for next page
limitintegerNoNumber of replies to return per page
oldeststringNoStart of time range (Unix timestamp)
lateststringNoEnd of time range (Unix timestamp)
inclusivebooleanNoInclude messages with oldest or latest timestamps
Response Schema

Records

Field NameTypeDescription
typestring | null
subtypestring | null
tsstring
userstring | null
textstring | null
thread_tsstring | null
parent_user_idstring | null
reply_countinteger | null
reply_users_countinteger | null
latest_replystring | null
reply_usersarray | null
is_lockedboolean | null
subscribedboolean | null
reactionsarray | null
reactions[].namestring | null
reactions[].usersarray | null
reactions[].countinteger | null
attachmentsarray | null
attachments[].idinteger | null
attachments[].fallbackstring | null
attachments[].colorstring | null
attachments[].pretextstring | null
attachments[].author_namestring | null
attachments[].author_linkstring | null
attachments[].author_iconstring | null
attachments[].titlestring | null
attachments[].title_linkstring | null
attachments[].textstring | null
attachments[].fieldsarray | null
attachments[].image_urlstring | null
attachments[].thumb_urlstring | null
attachments[].footerstring | null
attachments[].footer_iconstring | null
attachments[].tsstring | integer | null
blocksarray | null
filesarray | null
files[].idstring | null
files[].namestring | null
files[].titlestring | null
files[].mimetypestring | null
files[].filetypestring | null
files[].pretty_typestring | null
files[].userstring | null
files[].sizeinteger | null
files[].modestring | null
files[].is_externalboolean | null
files[].external_typestring | null
files[].is_publicboolean | null
files[].public_url_sharedboolean | null
files[].url_privatestring | null
files[].url_private_downloadstring | null
files[].permalinkstring | null
files[].permalink_publicstring | null
files[].createdinteger | null
files[].timestampinteger | null
editedobject | any
bot_idstring | null
bot_profileobject | any
app_idstring | null
teamstring | null

Meta

Field NameTypeDescription
next_cursorstring | null
has_moreboolean | null

Authentication

The Slack connector supports the following authentication methods.

Token Authentication

Field NameTypeRequiredDescription
access_tokenstrYesYour Slack Bot Token (xoxb-) or User Token (xoxp-)

Example

Python SDK

SlackConnector(
auth_config=SlackTokenAuthenticationAuthConfig(
access_token="<Your Slack Bot Token (xoxb-) or User Token (xoxp-)>"
)
)

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"connector_definition_id": "c2281cee-86f9-4a86-bb48-d23286b4c7bd",
"auth_config": {
"access_token": "<Your Slack Bot Token (xoxb-) or User Token (xoxp-)>"
},
"name": "My Slack Connector"
}'

OAuth 2.0 Authentication

Field NameTypeRequiredDescription
client_idstrYesYour Slack App's Client ID
client_secretstrYesYour Slack App's Client Secret
access_tokenstrYesOAuth access token (bot token from oauth.v2.access response)

Example

Python SDK

SlackConnector(
auth_config=SlackOauth20AuthenticationAuthConfig(
client_id="<Your Slack App's Client ID>",
client_secret="<Your Slack App's Client Secret>",
access_token="<OAuth access token (bot token from oauth.v2.access response)>"
)
)

API

curl --location 'https://api.airbyte.ai/api/v1/connectors/instances' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your_auth_token}' \
--data '{
"connector_definition_id": "c2281cee-86f9-4a86-bb48-d23286b4c7bd",
"auth_config": {
"client_id": "<Your Slack App's Client ID>",
"client_secret": "<Your Slack App's Client Secret>",
"access_token": "<OAuth access token (bot token from oauth.v2.access response)>"
},
"name": "My Slack Connector"
}'