Sunshine Conversations ACTION
Post Text Message
Post a text message, optionally with action buttons. See the documentation
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Sunshine Conversations account once, then configure and run Post Text Message 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: "sunshine_conversations-post-text-message",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
sunshine_conversations: { authProvisionId: "apn_xxxxxxx" },
userId: "User ID",
conversationId: "Conversation ID",
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "sunshine_conversations-post-text-message",
"configured_props": {
"sunshine_conversations": { "authProvisionId": "apn_xxxxxxx" },
"userId": "User ID",
"conversationId": "Conversation ID"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "sunshine_conversations",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "sunshine_conversations-post-text-message",
arguments: {
userId: "User ID",
conversationId: "Conversation ID",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
userId User ID | string | The ID of the user on whose behalf the message is posted. Required when Author Type is user. Also filters the Conversation ID dropdown; leave blank for a business post and enter the conversation ID directly. Optional |
conversationId Conversation ID | string | The ID of the conversation to get messages for. Required Dynamic |
authorType Author Type | string | The author type. Either user or business. Required |
subtypes Subtypes | string[] | An array that indicates the author's subtypes Optional |
displayName Display Name | string | The display name of the message author Optional |
avatarUrl Avatar URL | string | A custom message icon URL. The image must be JPG, PNG, or GIF format Optional |
text Text | string | The text content of the message. Required unless actions, htmlText, or markdownText is provided Optional |
htmlText HTML Text | string | HTML text content of the message. Can be provided in place of text. Cannot be used with markdownText. If no text is provided, will be converted to text upon reception to be displayed on channels that do not support rich text. See rich text documentation for more information Optional |
blockChatInput Block Chat Input | boolean | When set to true, the chat input will be disabled on supported client implementations when the message is the most recent one in the history. Can be used for guided flows or to temporarily disable the user's ability to send messages in the conversation Optional |
markdownText Markdown Text | string | Markdown text content of the message. Can be provided in place of text. Cannot be used with htmlText. Will be converted to htmlText upon reception. If converted htmlText exceeds 4096 characters, the message will be rejected. If no text is provided, will be converted to text upon reception to be displayed on channels that do not support rich text. See rich text documentation for more information Optional |
payload Payload | string | The payload of a reply button response message Optional |
actions Actions | string[] | An array of action-button objects to embed in the message. Each item must be a JSON object, for example: {"type":"link","text":"Visit site","uri":"https://example.com"} or {"type":"reply","text":"Yes","payload":"confirm_yes"}. Valid action types: link, reply, webview, postback. Max 10 per message; reply actions cannot be mixed with other action types. Required unless text, htmlText, or markdownText is provided. Optional |
metadata Metadata | object | Flat object containing custom properties. Strings, numbers and booleans are the only supported format that can be passed to metadata. The metadata is limited to 4KB in size 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
- sunshine_conversations-post-text-message
- Version
- 0.0.4
- App
- Sunshine Conversations
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗