View as Markdown
Twist icon

Twist ACTION

Add Thread

Adds a new thread to a channel.
  • Action
  • Writes data
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Twist account once, then configure and run Add Thread from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "twist-add-thread",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    twist: { authProvisionId: "apn_xxxxxxx" },
    channel_id: "Channel id",
    content: "Content",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Add Thread inputs
Property Type Description
channel_id Channel id string
The id of the channel where the thread will be created.
Required
content Content string
The content of the new thread. Mentions can be used as [Name](twist-mention://user_id) for users or [Group name](twist-group-mention://group_id) for groups. Check limits for size restrictions for the content.
Required
title Title string
The title of the new thread.
Required
actions Actions any
List of action to the new thread. More information about the format of the object available at the add an action button submenu.
Optional
attachments Attachments any
List of attachments to the new thread. It must follow the JSON format returned by attachment#upload.
Optional
direct_mentions Direct mentions any
The users that are directly mentioned.
Optional
direct_group_mentions Direct group mentions any
The groups that are directly mentioned.
Optional
recipients Recipients any
An array of users (e.g. recipients: [10000, 10001]) that will be attached to the thread. It also accepts the string EVERYONE, which notifies everyone in the workspace. If not included, the value will default to user_ids of the target channel. If you specify [], no Twist users will be notified, and the thread creator will become the sole participant.
Optional
groups Groups any
The groups that will be notified.
Optional
temp_id Temp id string
The temporary id of the thread.
Optional
send_as_integration Send as integration boolean
Displays the integration as the thread creator.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
twist-add-thread
Version
0.2.3
App
Twist
Authentication
OAuth
Read-only
No
Destructive
No
Open world
Yes