Hi Cursor team and community,
We’re loving the new Slack integration and see huge potential for it in our daily development cycle. We are trying to take it a step further by automating the creation of Cursor tasks directly from our internal tooling.
Our Goal:
Our goal is to programmatically trigger a Cursor agent when a new issue is reported (e.g., from Sentry). We want to send a message to a Slack channel via the API that mentions @Cursor and asks it to start working on a fix.
What We’ve Tried:
We are using the official Slack Node.js SDK (@slack/web-api) with a user token to post a message. We are using the chat.postMessage method with as_user: true set, so the message is posted on behalf of a real user who has the Cursor app installed and configured.
The message posts successfully in the channel, and the @Cursor mention is correctly formatted and highlighted. However, the background agent never starts. It seems the bot is ignoring messages sent via the API.
import { WebClient } from '@slack/web-api';
// Initialize the Slack client with a user token
const token = process.env.SLACK_USER_TOKEN;
const slackClient = new WebClient(token);
const channelId = 'C07SXXXXXXX'; // Our channel ID
const cursorUserId = 'U092XXXXXXX'; // The user ID for the Cursor App
export async function sendToSlack(payload: any) {
try {
const result = await slackClient.chat.postMessage({
channel: channelId,
blocks: [
{
type: 'section',
text: { type: 'mrkdwn', text: `<@${cursorUserId}> fix this reported issue` }
}
],
// We are impersonating a user who has authorized the app
as_user: true
});
console.log('Message sent successfully:', result.ts);
return result;
} catch (error) {
console.error('Error sending to Slack:', error);
}
}
Our Question / Feature Request:
Is it the intended behavior for the Cursor bot to ignore messages sent via the Slack API?
If so, we would like to formally request support for this functionality. Being able to trigger agents programmatically would be a game-changer for automation. It would allow us to build powerful workflows