Back to all tools
Needs API key

Slack on escalate

Uses Slack’s chat.postMessage API with a bot token. Pair it with escalate_to_human so your channel gets an immediate alert.

What this tool does

If your team lives in Slack, handoff alerts belong there too. This tool posts a message to a Slack channel with chat.postMessage whenever your agent escalates, including the customer’s name, channel and a short summary. Pair it with escalate_to_human so the right people see it in seconds. You need a Slack bot token with the chat:write scope, and the bot must be invited to the channel.

Example conversation

Customer

I want a refund. The product arrived broken.

Tool callnotify_slack_on_escalate

message: Refund request, product arrived broken

AI agent

I am sorry about that. I have flagged this to our support team, and someone will reply here soon.

Customer

Okay, I will wait.

AI agent

Thank you for your patience. They have your order details and the photo you sent, so you will not need to repeat anything.

Example only. Tool calls are shown so you can see when the agent uses this template. Your agent’s wording depends on your prompt and business information.

Who uses it

  • Agencies and online stores routing handoffs to a #support channel.
  • Sales teams getting a ping when a qualified lead wants a call.
  • Multi-location businesses alerting the right branch channel.

Setup

  1. In Slack API, create an app with chat:write, install it to your workspace, and copy the Bot User OAuth Token (xoxb-…).
  2. Invite the bot to the target channel and copy the channel ID.
  3. Replace xoxb-YOUR_BOT_TOKEN in the Authorization header and YOUR_SLACK_CHANNEL_ID in the request body.
  4. Add the prompt tip below so the agent notifies Slack whenever it escalates.

Prompt tip

In your agent prompt, add: When you call escalate_to_human, also call notify_slack_on_escalate with a short summary including the customer name, email, and reason.

Copy into custom tool form

Copy each value into the matching field when you add a custom tool on the create or edit agent page. Replace any YOUR_… placeholders with your real credentials.

Tool name

notify_slack_on_escalate

Description

Post a Slack message to the team channel when this conversation needs a human. Call this when escalating to a human, after collecting the customer name and email.

Endpoint URL

Paste into Endpoint URL (https:// is added automatically).

slack.com/api/chat.postMessage

HTTP method

POST

Tool inputs (all)

1. message (string) Escalation summary including customer name, email, and why a human is needed

Tool input: message

Input name

message

Input type

string

Input description

Escalation summary including customer name, email, and why a human is needed

Reference value

Use this as the request query or body value and choose “Tool input” in the form.

{{message}}

Request body (all)

channel: YOUR_SLACK_CHANNEL_ID text: {{message}}

Field name

channel

Field value

YOUR_SLACK_CHANNEL_ID

Field name

text

Field value

{{message}}

Headers (all)

Header values are encrypted when stored. Replace placeholders with your real secrets.

Authorization: Bearer xoxb-YOUR_BOT_TOKEN Content-Type: application/json

Header name

Authorization

Header value

Bearer xoxb-YOUR_BOT_TOKEN

Header name

Content-Type

Header value

application/json