Sendbird ACTION
List messages
Retrieves a list of past messages of a specific channel. See the docs here
- Action
- Read only
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Sendbird account once, then configure and run List messages 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: "sendbird-list-messages",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
sendbird: { authProvisionId: "apn_xxxxxxx" },
applicationId: "Application Id",
channelType: "Channel Type",
},
})
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": "sendbird-list-messages",
"configured_props": {
"sendbird": { "authProvisionId": "apn_xxxxxxx" },
"applicationId": "Application Id",
"channelType": "Channel Type"
}
}'// 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": "sendbird",
},
},
},
)
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: "sendbird-list-messages",
arguments: {
applicationId: "Application Id",
channelType: "Channel Type",
},
})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 |
|---|---|---|
applicationId Application Id | string | Specifies the unique ID of the Application. To find the application ID, sign in to Sendbird Dashboard, go to Settings > Application > General, and then check Application ID. Required |
channelType Channel Type | string | Specifies the type of the channel. Acceptable values are open_channels and group_channels. Required |
channelUrl Channel URL | string | Specifies the url of the channel. Required Dynamic |
messageTs Message Timestamp | integer | Specifies the timestamp to be the reference point of the query in Unix milliseconds. Either this or the Message Id should be specified. Optional |
messageId Message Id | integer | Specifies the unique ID of the message to be the reference point of the query. Either this or the Message Timestamp should be specified. Optional |
prevLimit Prev Limit | integer | Specifies the number of previously sent messages to retrieve before message_ts. For example, if message_ts=1484202848298, then prev_limit=50 returns 50 messages sent by 1484202848297 (message_ts - 1). Optional |
nextLimit Next Limit | integer | Specifies the number of sent messages to retrieve after message_ts. For example, if message_ts=1484202848298, then next_limit=50 returns 50 messages sent from 1484202848299 (message_ts + 1). Optional |
include Include | boolean | Determines whether to include messages sent exactly on the specified message_ts in the results. (Default: true) Optional |
reverse Reverse | boolean | Determines whether to sort the results in reverse chronological order. If set to true, messages appear in reverse chronological order where the newest comes first and the oldest last. (Default: false) Optional |
senderIds Sender Ids | string[] | Restricts the search scope to only retrieve messages sent by one or more users. Optional Dynamic |
operatorFilter Operator Filter | string | Restricts the search scope to only retrieve messages sent by operators or non-operator users of the channel. Optional |
messageType Message Type | string | Specifies a message type to retrieve. If not specified, all messages are retrieved. Optional |
includingRemoved Including Removed | boolean | Determines whether to include messages removed from the channel in the results. Optional |
withSortedMetaArray With Sorted Meta Array | boolean | Determines whether to include the sorted_metaarray property in the response. 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
- sendbird-list-messages
- Version
- 0.0.2
- App
- Sendbird
- Authentication
- API key
- Read-only
- Yes
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗