Mutation
mutation CreateWorkspaceSlackSidekickIntegration($input: CreateWorkspaceSlackSidekickIntegrationInput!) {
createWorkspaceSlackSidekickIntegration(input: $input) {
integration {
integrationId
slackTeamId
slackTeamName
askSidekickSlackChannelId
askSidekickSlackChannelName
isReinstallRequired
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"authCode": "string",
"redirectUrl": "string"
}
}Response
{
"data": {
"createWorkspaceSlackSidekickIntegration": {
"integration": {
"integrationId": "id",
"slackTeamId": "id",
"slackTeamName": "string",
"askSidekickSlackChannelId": "id",
"askSidekickSlackChannelName": "string",
"isReinstallRequired": true
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Mutations
createWorkspaceSlackSidekickIntegration
Installs Plain’s Sidekick AI agent into the workspace’s Slack. Exchanges the OAuth authorization code (obtained by sending the user through the URL from workspaceSlackSidekickInstallationInfo) for a bot token, creates the #ask-plain Slack channel, and persists the integration. Fails if a channel named #ask-plain already exists, since Slack offers no way to resolve an existing channel by name. Only one Sidekick integration is allowed per workspace and per Slack team; calling this when one already exists returns an error. Requires the workspaceSlackSidekickIntegration:create permission and the ai_agent billing entitlement.
MUTATION
createWorkspaceSlackSidekickIntegration(input: CreateWorkspaceSlackSidekickIntegrationInput!): CreateWorkspaceSlackSidekickIntegrationOutput!Arguments
input
integration
error
Mutation
mutation CreateWorkspaceSlackSidekickIntegration($input: CreateWorkspaceSlackSidekickIntegrationInput!) {
createWorkspaceSlackSidekickIntegration(input: $input) {
integration {
integrationId
slackTeamId
slackTeamName
askSidekickSlackChannelId
askSidekickSlackChannelName
isReinstallRequired
}
error {
message
type
code
fields {
field
message
type
}
}
}
}Variables
{
"input": {
"authCode": "string",
"redirectUrl": "string"
}
}Response
{
"data": {
"createWorkspaceSlackSidekickIntegration": {
"integration": {
"integrationId": "id",
"slackTeamId": "id",
"slackTeamName": "string",
"askSidekickSlackChannelId": "id",
"askSidekickSlackChannelName": "string",
"isReinstallRequired": true
},
"error": {
"message": "string",
"type": "VALIDATION",
"code": "string",
"fields": [
{
"field": "string",
"message": "string",
"type": "VALIDATION"
}
]
}
}
}
}Was this page helpful?

