Bot for Slack ACTION
Send Message (Advanced)
Customize advanced setttings and send a message to a channel, group or user (Bot). See postMessage or scheduleMessage docs here
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Bot for Slack account once, then configure and run Send Message (Advanced) 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: "slack_bot-send-message-advanced",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
slack_bot: { authProvisionId: "apn_xxxxxxx" },
conversation: "Channel",
text: "Text",
},
})
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": "slack_bot-send-message-advanced",
"configured_props": {
"slack_bot": { "authProvisionId": "apn_xxxxxxx" },
"conversation": "Channel",
"text": "Text"
}
}'// 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": "slack_bot",
},
},
},
)
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: "slack_bot-send-message-advanced",
arguments: {
conversation: "Channel",
text: "Text",
},
})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 |
|---|---|---|
conversation Channel | string | Select a public or private channel, or a user or group. In order to list a Slack channel, your bot must be a member of that channel, and in order to list private channels, your bot must have the groups:read scope in the OAuth & Permissions settings in Slack for this bot. Required Dynamic |
text Text | string | If you're using blocks, this is used as a fallback string to display in notifications. If you aren't, this is the main body text of the message. It can be formatted as plain text, or with mrkdwn. Required |
mrkdwn Send text as Slack mrkdwn | boolean | Optional |
attachments Attachments | string | A JSON-based array of structured attachments, presented as a URL-encoded string (e.g., [{"pretext": "pre-hello", "text": "text-world"}]). Optional |
parse Parse | string | Change how messages are treated. Defaults to none. By default, URLs will be hyperlinked. Set parse to none to remove the hyperlinks. The behavior of parse is different for text formatted with mrkdwn. By default, or when parse is set to none, mrkdwn formatting is implemented. To ignore mrkdwn formatting, set parse to full. Optional |
link_names Link Names | boolean | Find and link channel names and usernames. Optional |
post_at Schedule message | string | Messages can only be scheduled up to 120 days in advance, and cannot be scheduled for the past. The datetime should be in ISO 8601 format. (Example: 2014-01-01T00:00:00Z) Optional |
include_sent_via_pipedream_flag Include link to Pipedream | boolean | Defaults to true, includes a link to Pipedream at the end of your Slack message. Optional |
customizeBotSettings Customize Bot Settings | boolean | Customize the username and/or icon of the Bot Optional |
username Bot Username | string | Optionally customize your bot's user name (default is Pipedream). Must be used in conjunction with Send as User set to false, otherwise ignored. Optional |
icon_emoji Icon (emoji) | string | Optionally provide an emoji to use as the icon for this message. E.g., :fire: Overrides icon_url. Must be used in conjunction with Send as User set to false, otherwise ignored. Optional Dynamic |
icon_url Icon (image URL) | string | Optionally provide an image URL to use as the icon for this message. Must be used in conjunction with Send as User set to false, otherwise ignored. Optional |
replyToThread Reply to Thread | boolean | Reply to an existing thread Optional |
thread_ts Message Timestamp | string | Provide another message's ts value to make this message a reply (e.g., if triggering on new Slack messages, enter {{event.ts}}). Avoid using a reply's ts value; use its parent instead. e.g. 1403051575.000407. Optional |
thread_broadcast Send Channel Message | boolean | If true, posts in the thread and channel. Used in conjunction with Message Timestamp and indicates whether reply should be made visible to everyone in the channel. Defaults to false. Optional |
addMessageMetadata Add Message Metadata | boolean | Set the metadata event type and payload Optional |
metadata_event_type Metadata Event Type | string | The name of the metadata event. Example: task_created Optional |
metadata_event_payload Metadata Event Payload | string | The payload of the metadata event. Must be a JSON string. Example: { "id": "11223", "title": "Redesign Homepage"} Optional |
configureUnfurlSettings Configure Unfurl Settings | boolean | Configure settings for unfurling links and media Optional |
unfurl_links Unfurl Links | boolean | Default to false. Pass true to enable unfurling of links. Optional |
unfurl_media Unfurl Media | boolean | Defaults to false. Pass true to enable unfurling of media content. Optional |
passArrayOrConfigure Add Blocks - Reference Existing Blocks Array or Configure Manually? | string | Would you like to reference an array of blocks from a previous step (for example, {{steps.blocks.$return_value}}), or configure them in this action? 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
- slack_bot-send-message-advanced
- Version
- 0.0.6
- App
- Bot for Slack
- Authentication
- API key
- Behavior
- May modify external data
- Source
- View on GitHub ↗