Usage #
// Import the typed helper
import { scheduleMessage } from "@hotglue/sdk/slack";
const result = await client.execute({
...scheduleMessage({
channel: string,
post_at: int,
text: string,
// ...
}),
userId: "user_123",
});
// result is typed as ScheduleMessageOutput
const result = await client.execute({
integration: "slack",
tool: "schedule_message",
userId: "user_123",
input: {
channel: string,
post_at: int,
text: string,
// ...
},
});
// The agent will automatically use this tool when needed
const agent = new Agent({
tools: () => hotglueTools({
integrations: ["slack"],
userId: "user_123",
}),
});
await agent.generate("run the Schedule Message tool");
Required Permissions #
chat:write
Input Schema #
channel
string
required
Channel ID, private group ID, or user ID
post_at
int
required
Unix timestamp for when the message should be sent
text
string
Message text (required if blocks not provided)
blocks
object[]
Block Kit blocks for rich formatting
thread_ts
string
Timestamp of thread to reply to
unfurl_links
bool
Enable unfurling of links
default:
true
unfurl_media
bool
Enable unfurling of media
default:
true
Output Schema #
ok
bool
required
channel
string
scheduled_message_id
string
post_at
int
This tool calls: #
POST
https://slack.com/api/chat.scheduleMessage