# Trigger Cursor Background Agent via Slack API

**URL:** <https://forum.cursor.com/t/trigger-cursor-background-agent-via-slack-api/124378>\
**Category:** Feature Requests\
**Created:** [July 30, 2025, 11:57pm UTC](https://forum.cursor.com/t/trigger-cursor-background-agent-via-slack-api/124378 "2025-07-30T23:57:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![BigDog1400](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/bigdog1400/32/73956_2.png) [@BigDog1400](https://forum.cursor.com/u/BigDog1400)\
**Post date:** [July 30, 2025, 11:57pm UTC](https://forum.cursor.com/t/trigger-cursor-background-agent-via-slack-api/124378/1 "2025-07-30T23:57:03Z")

</div>

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.

```ts
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

---

<div class="post-metadata">

**Author:** ![zachd1234](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/zachd1234/32/75376_2.png) [@zachd1234](https://forum.cursor.com/u/zachd1234)\
**Post date:** [August 8, 2025, 4:32am UTC](https://forum.cursor.com/t/trigger-cursor-background-agent-via-slack-api/124378/2 "2025-08-08T04:32:19Z")

</div>

I want this too

---

<div class="post-metadata">

**Author:** ![Amir\_Shur](https://avatars.discourse-cdn.com/v4/letter/a/d78d45/32.png) [@Amir\_Shur](https://forum.cursor.com/u/Amir_Shur)\
**Post date:** [September 29, 2025, 9:10am UTC](https://forum.cursor.com/t/trigger-cursor-background-agent-via-slack-api/124378/3 "2025-09-29T09:10:36Z")

</div>

+1 would love this

---

<div class="post-metadata">

**Author:** ![Marijn](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@Marijn](https://forum.cursor.com/u/Marijn)\
**Post date:** [February 21, 2026, 6:37pm UTC](https://forum.cursor.com/t/trigger-cursor-background-agent-via-slack-api/124378/4 "2026-02-21T18:37:42Z")

</div>

Yes, please make this available

---

<div class="post-metadata">

**Author:** ![Don\_Schrimsher](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/don_schrimsher/32/122762_2.png) [@Don\_Schrimsher](https://forum.cursor.com/u/Don_Schrimsher)\
**Post date:** [October 8, 2026, 3:21pm UTC](https://forum.cursor.com/t/trigger-cursor-background-agent-via-slack-api/124378/5 "2026-10-08T15:21:03Z")

</div>

+1 would also love this.
