View as Markdown
Twist icon

Twist ACTION

Add Message To Conversation

Adds a message to an existing conversation. See the documentation
  • Action
  • Writes data
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Twist account once, then configure and run Add Message To Conversation 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-message-to-conversation",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    twist: { authProvisionId: "apn_xxxxxxx" },
    conversation_id: "Conversation 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 Message To Conversation inputs
Property Type Description
conversation_id Conversation id string
The id of the conversation where the message will be added.
Required
content Content string
The content of the new message. 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
attachments Attachments string[]
List of attachments to add. Each item must be a JSON string following the format returned by attachment#upload.
Optional
actions Actions string[]
List of action buttons to add. Each item must be a JSON string, e.g. {"action":"open_url","type":"action","button_text":"View","url":"https://example.com"}. See the action button submenu.
Optional
direct_mentions Direct Mentions integer[]
The users that are directly mentioned.
Optional
direct_group_mentions Direct Group Mentions integer[]
The groups that are directly mentioned.
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-message-to-conversation
Version
1.0.0
App
Twist
Authentication
OAuth
Read-only
No
Destructive
No
Open world
Yes