Automation & workflow

AI Agents and Slack

The fastest integration on this site: an incoming webhook, a small transform, and every finished call becomes a message someone will actually read.

Via webhookSlack · bitpull AI agents

Where this stands today

Native Slack integration is described in the bitpull product as in preparation. Until then the gap is one HTTP call wide, because Slack incoming webhooks take a JSON body and need no OAuth for this use case.

The reason to bother is that Slack is where a small team already looks. A conversation summary in a channel gets read; the same summary in a CRM timeline does not, until someone goes looking for it.

The reason to be careful is the same thing: a channel is visible to everyone in it, and a call transcript contains whatever the caller said. Post the summary, link to the detail, and keep the full transcript somewhere with access control.

What the agent can do

One message per finished conversation

Title, outcome, sentiment and the key points from the summary. Enough to decide whether to act without opening anything.

Colour by sentiment

An attachment colour makes a negative conversation findable by scroll speed alone.

Route by outcome

Unresolved conversations into the support channel, everything else into an archive channel nobody has to watch.

Mention only when it matters

A here-mention on a negative outcome is useful once a day and hated ten times a day. Gate it on sentiment and outcome together.

How it is wired

  1. Conversation ends
  2. bitpull webhookPOST to your URL
  3. Transformsummary → Block Kit
  4. Slackincoming webhook

Code

Webhook consumer - Block Kit message
const SLACK = process.env.SLACK_WEBHOOK_URL   // https://hooks.slack.com/services/…

const COLOUR = {
  NEGATIVE: '#e01e5a',
  MIXED:    '#ecb22e',
  POSITIVE: '#2eb67d',
  NEUTRAL:  '#4a5568'
}

export default async function handler(req, res) {
  res.status(200).end()

  const body = req.body ?? {}
  const summary = body.summary ?? body.session?.summary ?? {}
  const points = (summary.keyPoints ?? []).slice(0, 5)

  // Summary only. The transcript stays out of a channel - link to it instead.
  const blocks = [
    {
      type: 'header',
      text: { type: 'plain_text', text: summary.title ?? 'AI agent conversation', emoji: false }
    },
    {
      type: 'section',
      fields: [
        { type: 'mrkdwn', text: `*Channel*\n${body.channel ?? 'unknown'}` },
        { type: 'mrkdwn', text: `*Outcome*\n${summary.outcome ?? 'UNKNOWN'}` },
        { type: 'mrkdwn', text: `*Sentiment*\n${summary.sentiment ?? 'UNKNOWN'}` },
        { type: 'mrkdwn', text: `*Follow-up*\n${summary.followUp?.required ? 'required' : 'none'}` }
      ]
    }
  ]

  if (points.length) {
    blocks.push({
      type: 'section',
      text: { type: 'mrkdwn', text: points.map((p) => `• ${p}`).join('\n') }
    })
  }

  await fetch(SLACK, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      text: summary.title ?? 'AI agent conversation',   // notification fallback
      attachments: [{ color: COLOUR[summary.sentiment] ?? COLOUR.NEUTRAL, blocks }]
    })
  })
}
The payload shape is not part of the published API. Point the webhook at a throwaway inbox first, read the real delivery, then write the mapping against what you actually received.

Limits worth knowing before you start

  • No native Slack app in bitpull; native direct integrations are described as in preparation.
  • Incoming webhooks post to exactly one channel. Routing by outcome means several webhook URLs and a switch in your code.
  • Slack rate limits incoming webhooks at roughly one message per second per hook. Bursty call volume needs a queue.
  • A channel has no access control beyond membership. Post summaries, not transcripts.
  • The webhook URL is a bearer credential in a URL. Anyone who has it can post as your integration.

Questions

Can the agent transfer a caller to someone in Slack?

No. Live human transfer is a telephony operation, not a Slack one - see the telephony page. Slack gets the notification after the fact.

Should we post the full transcript?

No. Post the summary and a link. A transcript is whatever a caller happened to say, in front of everyone in the channel, retained until someone deletes it.

Ready to run this?

Agents are created and operated on bitpull.ai - this site documents how to connect one. If the outbound webhook is not visible in your dashboard yet, that is the account capability flag, and support can enable it.