Skip to content
Dashboard

Chat SDK adds message subjects and direct SDK access

lib/bot.ts
bot.onNewMention(async (thread, message) => {
const subject = await message.subject;
if (subject) {
await thread.post(
`This is about: ${subject.title} (${subject.status})\n${subject.url}`
);
}
});

Reply to a mention with the parent issue's title, status, and URL

Link to headingDirect access to platform SDKs

// Add a "triaged" label to issue #42
const { octokit } = bot.getAdapter("github");
await octokit.rest.issues.addLabels({ owner: "vercel", repo: "chat", issue_number: 42, labels: ["triaged"] });
// Create a new issue in a team
const { linearClient } = bot.getAdapter("linear");
await linearClient.createIssue({ teamId: "TEAM_ID", title: "Investigate flaky test" });
// Pin a message in a channel
const { webClient } = bot.getAdapter("slack");
await webClient.pins.add({ channel: "C123ABC", timestamp: "1234567890.123456" });

Add a GitHub label, create a Linear issue, or pin a Slack message

The Complete Guide to Chat SDK

Learn how Chat SDK works end-to-end: from core concepts to building your first bot to deploying it across Slack, Teams, and more.

Read the guide

Ready to deploy?