Add Thread
twist.add_thread
ActionChat & messagingconnection required
Calls the Twist API with the connection's credentials.
Start a new titled thread in a channel.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- OAuth 2.0
- Providers
- Twist
- Secret shape
- {"access_token": "…"} — the token Twist's OAuth2 flow returns
- Config it needs
- workspace_id, channel_id
- Resolved by
- config.connection_id, else node.connection_id
Configuration
4 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
title The thread's subject line, shown in the channel list. | string | Yes | — | — | API change: pagination on /threads |
content The body text, in Twist's markdown format. | string | No | — | — | Shipping the API change tomorrow — shout if that is a problem. |
channel_id Channel to act in; overrides the default channel set on the connection. | string | No | — | — | 6984 |
recipients User ids to notify, or the single value EVERYONE to notify the whole channel. | array | No | — | array of string | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"channel_id": "6984",
"content": "Shipping the API change tomorrow — shout if that is a problem.",
"title": "API change: pagination on /threads"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
id The thread id. | number | — |
title The thread's title. | string | — |
content The body of the thread's opening post. | string | — |
channel_id The channel the thread lives in. | number | — |
workspace_id The workspace the channel belongs to. | number | — |
creator User id of whoever opened the thread. | number | — |
comment_count How many comments the thread carries. | number | — |
participants User ids taking part in the thread. | array | — |
recipients User ids notified about the thread. | array | — |
posted_ts When the thread was posted, as a Unix timestamp. | number | — |
last_updated_ts When the thread last changed, as a Unix timestamp. | number | — |
snippet Preview text of the most recent comment. | string | — |
pinned True when the thread is pinned in its channel. | boolean | — |
starred True when the current user starred the thread. | boolean | — |
is_archived True when the thread has been archived. | boolean | — |
attachments Files attached to the thread's opening post. | array | — |
reactions Reactions on the opening post, keyed by emoji. | object | — |
{
"attachments": [],
"channel_id": 0,
"comment_count": 0,
"content": "",
"creator": 0,
"id": 0,
"is_archived": false,
"last_updated_ts": 0,
"participants": [],
"pinned": false,
"posted_ts": 0,
"reactions": {},
"recipients": [],
"snippet": "",
"starred": false,
"title": "",
"workspace_id": 0
}See Add Thread run in a workflow.
In a technical demo we add the Twist connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.