Slack Connector

Connect your Slack workspace to Brevo via Tajo for real-time marketing notifications, team alerts on customer events, and workflow automation triggered by Slack interactions.

Overview

PropertyValue
PlatformSlack
CategoryCustom Integration
Setup ComplexityEasy
Official IntegrationYes
Data SyncedUsers, Channels, Messages, Events
API Base URLhttps://slack.com/api

Features

  • Marketing alerts - Send real-time notifications for campaign events, new subscribers, and revenue milestones
  • Customer event notifications - Alert teams on high-value customer actions from Brevo
  • Workflow triggers - Use Slack interactions (button clicks, form submissions) to trigger Brevo automations
  • Channel-based routing - Route notifications to specific channels based on event type or customer segment
  • User sync - Map Slack workspace users to Brevo contacts for internal communications
  • Interactive messages - Send rich messages with buttons and actions for team workflows
  • Scheduled messages - Schedule notifications for daily/weekly marketing summaries
  • Thread support - Group related notifications in threads for organized communication

Prerequisites

Before you begin, ensure you have:

  1. A Slack workspace with admin access
  2. A Slack app created at api.slack.com/apps
  3. Bot token with required scopes
  4. A Brevo account with API access
  5. A Tajo account

Authentication

Install a Slack app to your workspace and use the bot token for API access.

  1. Create app at api.slack.com/apps
  2. Add required OAuth scopes under “OAuth & Permissions”
  3. Install app to workspace
  4. Copy the Bot User OAuth Token (xoxb-...)
Terminal window
curl -X POST "https://slack.com/api/chat.postMessage" \
-H "Authorization: Bearer xoxb-YOUR-BOT-TOKEN" \
-H "Content-Type: application/json" \
-d '{"channel": "C01234567", "text": "Hello from Tajo!"}'

OAuth 2.0

For distributing your Slack integration to multiple workspaces:

Terminal window
# Authorization URL
https://slack.com/oauth/v2/authorize?
client_id={client_id}&
scope=chat:write,channels:read,users:read&
redirect_uri={redirect_uri}
# Token exchange
curl -X POST "https://slack.com/api/oauth.v2.access" \
-d "client_id={client_id}" \
-d "client_secret={client_secret}" \
-d "code={auth_code}"

Required Bot Scopes

chat:write # Send messages
channels:read # List channels
channels:history # Read channel messages
users:read # List workspace users
users:read.email # Read user email addresses
reactions:write # Add reactions to messages
files:write # Upload files

User Email Access

The users:read.email scope is required to match Slack users with Brevo contacts. Without it, user mapping will be limited to display names.

Configuration

Basic Setup

connectors:
slack:
enabled: true
bot_token: "${SLACK_BOT_TOKEN}"
signing_secret: "${SLACK_SIGNING_SECRET}"
# Notification channels
channels:
marketing: "C01234567"
sales: "C01234568"
support: "C01234569"
alerts: "C01234570"
# Event routing
notifications:
new_subscriber:
channel: marketing
template: subscriber_alert
high_value_order:
channel: sales
template: order_alert
support_ticket:
channel: support
template: ticket_alert

Field Mapping

Map Slack user data to Brevo contact attributes:

Default Mappings

Parameter Type Description
profile.email required
string

User email (unique identifier for Brevo matching)

real_name optional
string

Full name, split into FIRSTNAME/LASTNAME

profile.phone optional
string

Maps to SMS attribute

profile.title optional
string

Job title

tz optional
string

User timezone

is_admin optional
boolean

Workspace admin status

team_id optional
string

Workspace team ID

status_text optional
string

User custom status

API Methods

Messaging

MethodEndpointDescription
POSTchat.postMessageSend a message to a channel
POSTchat.updateUpdate an existing message
POSTchat.deleteDelete a message
POSTchat.scheduleMessageSchedule a message
POSTchat.postEphemeralSend ephemeral message to user

Channels

MethodEndpointDescription
GETconversations.listList channels
GETconversations.infoGet channel info
GETconversations.membersList channel members
GETconversations.historyGet channel messages

Users

MethodEndpointDescription
GETusers.listList workspace users
GETusers.infoGet user info
GETusers.lookupByEmailFind user by email
GETusers.conversationsList user channels

Interactions

MethodEndpointDescription
POSTviews.openOpen a modal view
POSTviews.updateUpdate a modal view
POSTreactions.addAdd emoji reaction

Events

Brevo-to-Slack Notifications

EventTriggerSlack Action
new_subscriberContact created in BrevoPost to #marketing
campaign_sentEmail campaign sentPost summary to #marketing
order_placedHigh-value order detectedPost to #sales with details
cart_abandonedCart abandoned for 30minPost to #sales for follow-up
ticket_createdSupport ticket openedPost to #support
unsubscribedContact unsubscribedPost alert to #marketing

Slack-to-Brevo Triggers

Slack EventTriggerBrevo Action
message_actionCustom message shortcutAdd contact to list or trigger automation
block_actionsButton click in messageUpdate contact attribute or send email
view_submissionModal form submittedCreate contact or trigger workflow

Code Examples

Initialize Connector

import { TajoClient } from '@tajo/sdk';
const tajo = new TajoClient({
apiKey: process.env.TAJO_API_KEY,
brevoApiKey: process.env.BREVO_API_KEY
});
// Connect Slack
await tajo.connectors.connect('slack', {
botToken: process.env.SLACK_BOT_TOKEN,
signingSecret: process.env.SLACK_SIGNING_SECRET
});

Send Marketing Notifications

// Send a notification when a high-value order is placed
await tajo.slack.notify({
channel: 'sales',
event: 'order_placed',
data: {
customerEmail: '[email protected]',
orderValue: '$1,250.00',
products: ['Premium Widget', 'Pro Service'],
isFirstOrder: true
},
template: {
blocks: [
{
type: 'header',
text: { type: 'plain_text', text: 'New High-Value Order' }
},
{
type: 'section',
fields: [
{ type: 'mrkdwn', text: '*Customer:*\n[email protected]' },
{ type: 'mrkdwn', text: '*Amount:*\n$1,250.00' }
]
},
{
type: 'actions',
elements: [
{
type: 'button',
text: { type: 'plain_text', text: 'View in Brevo' },
url: 'https://app.brevo.com/contacts'
}
]
}
]
}
});

Handle Slack Interactions

import crypto from 'crypto';
app.post('/slack/interactions', async (req, res) => {
// Verify Slack request signature
const timestamp = req.headers['x-slack-request-timestamp'];
const signature = req.headers['x-slack-signature'];
const sigBasestring = `v0:${timestamp}:${req.rawBody}`;
const mySignature = 'v0=' + crypto
.createHmac('sha256', process.env.SLACK_SIGNING_SECRET)
.update(sigBasestring)
.digest('hex');
if (signature !== mySignature) {
return res.status(401).send('Unauthorized');
}
const payload = JSON.parse(req.body.payload);
// Handle button actions
if (payload.type === 'block_actions') {
await tajo.connectors.handleWebhook('slack', {
type: 'interaction',
action: payload.actions[0].action_id,
userId: payload.user.id,
payload
});
}
res.status(200).send();
});

Rate Limits

Slack API rate limits use a tiered system:

TierLimitCommon Methods
Tier 11 request/minutechat.delete, conversations.kick
Tier 220 requests/minuteconversations.history, users.info
Tier 350 requests/minuteconversations.list, users.list
Tier 4100 requests/minutechat.postMessage
SpecialVarieschat.postMessage to same channel: 1/sec

Additional limits:

  • Web API: Burst limit with short-term throttle
  • Events API: Delivery retries for 3 attempts
  • Incoming Webhooks: 1 message/second per webhook URL
  • Block Kit: Maximum 50 blocks per message

Channel Posting Rate

Posting to the same channel is limited to approximately 1 message per second. Batch notifications or use threads to avoid rate limiting.

Troubleshooting

Common Issues

IssueCauseSolution
not_authedInvalid bot tokenReinstall app and copy new bot token
channel_not_foundBot not in channelInvite the bot to the target channel
missing_scopeRequired scope not grantedAdd scope and reinstall app
Event not receivedEvent subscription not setConfigure Event Subscriptions URL
Interaction timeoutResponse >3 secondsRespond with 200 immediately, process async

Debug Mode

Enable verbose logging:

connectors:
slack:
debug: true
log_level: verbose
log_events: true

Test Connection

Terminal window
tajo connectors test slack
# ✓ Bot token valid
# ✓ Workspace accessible
# ✓ Channels readable
# ✓ Message posting enabled
# ✓ Event subscriptions active

Best Practices

  1. Use Block Kit - Build rich, interactive messages with Slack’s Block Kit framework
  2. Respond quickly - Acknowledge interactions within 3 seconds, process asynchronously
  3. Thread related messages - Group related notifications in threads to reduce noise
  4. Route by channel - Send different event types to appropriate team channels
  5. Include action buttons - Add “View in Brevo” buttons for quick access to customer data
  6. Implement unfurling - Show rich previews for Brevo links shared in Slack

Security

  • Bot Token - OAuth-scoped access token with granular permissions
  • Request signing - HMAC SHA-256 signature verification for incoming requests
  • OAuth 2.0 - Industry-standard authorization for multi-workspace distribution
  • TLS encryption - All API communication encrypted via HTTPS
  • Token rotation - Automatic token rotation for enhanced security

Open-Source Implementation Map

No official open-source repository was found in the current Tajo connector catalog for Slack. Keep this page focused on the verified public API contract and vendor documentation until an official schema, SDK, MCP server, or public integration repository is available.

Tajo Revamp Checklist

  • Verify authentication and scope requirements against the vendor documentation before each connector release.
  • Document primary sync objects, external IDs, pagination strategy, and rate limits explicitly.
  • Add smoke tests from public API examples rather than undocumented behavior.
  • Capture webhook signature verification and replay protection when the vendor supports webhooks.
  • Record gaps where no official public repository or schema exists so future maintainers know what still needs source-backed validation.

Subscribe to updates

developer-docs

Drop your email or phone number — we'll send you what matters next.

auto-detect
AI Assistant

Hi! Ask me anything about the docs.