Skip to main content
createThreadFromSlackMessage creates a thread from a top-level message in a connected customer Slack channel. The thread includes the replies Plain has already received for that message. It is the trigger for API-only ingestion, and it works in every other ingestion mode too.
For TypeScript, the GraphQL SDK gives you a fully typed client for these operations.
The channel must already be connected in Settings → Slack, enabled, and set as a customer channel. Pass slackChannelId and slackMessageTimestamp. Replies are rejected. You need an API key with the thread:create permission.
Mutation
Variables

Getting the created thread

Ingestion runs asynchronously. The mutation returns thread only when that Slack message was already a thread. When the request is accepted and the thread is still being created, thread is null and error is null. Fetch the thread with threadBySlackPermalink, or subscribe to thread.thread_created. Calling the mutation again for the same message returns the existing thread rather than creating a second one.
Query
Variables
threadBySlackPermalink returns null until the thread exists. The permalink is the Slack link to the top-level message.

Messages the mutation rejects

The mutation returns cannot_create_thread_from_slack_message when:
  • The Slack channel is not connected to this workspace
  • The connected channel is disabled
  • The connected channel is not a customer channel
  • The message is a reply rather than a top-level message

After the thread exists

Replies in that Slack thread attach to the Plain thread. New top-level messages in an API-only channel do not become threads until you call the mutation again.