View as Markdown
Sendbird icon

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)

SCHEMA

Inputs

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

List messages inputs
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