Usage #
// Import the typed helper
import { getConversationHistory } from "@hotglue/sdk/slack";
const result = await client.execute({
...getConversationHistory({
channel: string,
oldest: string,
latest: string,
// ...
}),
userId: "user_123",
});
// result is typed as GetConversationHistoryOutput
const result = await client.execute({
integration: "slack",
tool: "get_conversation_history",
userId: "user_123",
input: {
channel: string,
oldest: string,
latest: 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 Get Conversation History tool");
Required Permissions #
channels:history
Input Schema #
channel
string
required
Channel ID to fetch history from
oldest
string
Start of time range (message timestamp)
latest
string
End of time range (message timestamp)
inclusive
bool
Include messages with oldest/latest timestamps
default:
false
limit
int
Maximum number of items to return (max 1000)
default:
100
cursor
string
Pagination cursor
Output Schema #
ok
bool
required
messages
object[]
has_more
bool
response_metadata
object
This tool calls: #
GET
https://slack.com/api/conversations.history