View as Markdown
Sunshine Conversations icon

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)

SCHEMA

Inputs

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

Post Text Message inputs
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