View as Markdown
Bot for Slack icon

Bot for Slack ACTION

Send Message Using Block Kit

Send a message using Slack's Block Kit UI framework 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 Using Block Kit 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-block-kit-message",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    slack_bot: { authProvisionId: "apn_xxxxxxx" },
    username: "Bot Username",
    icon_emoji: "Icon (emoji)",
  },
})

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.

Send Message Using Block Kit inputs
Property Type Description
username Bot Username string
Optionally customize your bot's user name (default is Pipedream). Must be used in conjunction with 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 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 as_user set to false, otherwise ignored.
Optional
post_at Schedule message integer
Messages can only be scheduled up to 120 days in advance, and cannot be scheduled for the past. The datetime format should be a unix timestamp (e.g., 1650507616, see here for help with this format).
Optional
include_sent_via_pipedream_flag Include link to workflow boolean
Defaults to true, includes a link to the workflow at the end of your Slack message.
Optional
metadata_event_type Metadata Event Type string
The name of the metadata event
Optional
metadata_event_payload Metadata Event Payload string
The payload of the metadata event. Must be a JSON string e.g. {"key": "value"}
Optional
conversation Channel string
Select a public or private channel, or a user or group
Required Dynamic
blocks Blocks string

Enter an array of structured blocks as a URL-encoded string. E.g., [{ "type": "section", "text": { "type": "mrkdwn", "text": "This is a mrkdwn section block :ghost: *this is bold*, and ~this is crossed out~, and <https://pipedream.com|this is a link>" }}]

Tip: Construct your blocks in a code step, return them as an array, and then pass the return value to this step.

Required
text Notification Text string
Optionally provide a string for Slack to display as the new message notification (if you do not provide this, notification will be blank).
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-block-kit-message
Version
0.0.2
App
Bot for Slack
Authentication
API key
Behavior
May modify external data