---
title: "Slack कनेक्टर"
description: "Tajo के माध्यम से notifications भेजने, channel data sync करने, और Slack events से Brevo automations trigger करने की संपूर्ण Slack integration guide।"
url: https://tajo.io/hi/docs/connectors/custom/slack/
markdown: https://tajo.io/hi/docs/connectors/custom/slack.md
lang: hi-IN
robots: noindex
---

अर्ली एक्सेस का अनुरोध करें

अपना पहला नाम और कार्यस्थल का ईमेल पता दर्ज करें। Tajo एक्सेस अनुरोध की पुष्टि के लिए हम आपको एक लिंक ईमेल करेंगे।

# Slack कनेक्टर

कनेक्टर की स्थिति: नियोजित अभी बना नहीं है। Tajo आज यह कनेक्टर नहीं चलाता।

| स्रोत फ़ील्ड | गंतव्य फ़ील्ड | नमूना मान |
| --- | --- | --- |
| `record.id` | `source_id` | `record_1042` |
| `record.updated_at` | `updated_at` | `2026-10-18T08:00:00Z` |
| `record.value` | `value` | `sample_value` |

real-time marketing notifications, customer events पर team alerts, और Slack interactions से triggered workflow automation के लिए Tajo के माध्यम से अपने Slack workspace को Brevo से कनेक्ट करें।

## अवलोकन

| Property | Value |
| --- | --- |
| **Platform** | Slack |
| **Category** | Custom Integration |
| **Setup Complexity** | Easy |
| **Official Integration** | No |
| **Data Synced** | Users, Channels, Messages, Events |
| **API Base URL** | `https://slack.com/api` |

## विशेषताएं

- **Marketing alerts** - campaign events, नए subscribers, और revenue milestones के लिए real-time notifications भेजें
- **Customer event notifications** - Brevo से high-value customer actions पर teams को alert करें
- **Workflow triggers** - Brevo automations trigger करने के लिए Slack interactions (button clicks, form submissions) का उपयोग करें
- **Channel-आधारित routing** - event type या customer segment के आधार पर notifications को specific channels में route करें
- **User sync** - internal communications के लिए Slack workspace users को Brevo contacts से map करें
- **Interactive messages** - team workflows के लिए buttons और actions के साथ rich messages भेजें
- **Scheduled messages** - daily/weekly marketing summaries के लिए notifications schedule करें
- **Thread support** - व्यवस्थित communication के लिए संबंधित notifications को threads में group करें

## पूर्वावश्यकताएं

शुरू करने से पहले, सुनिश्चित करें कि आपके पास हैं:

1. admin access वाला एक Slack workspace
2. [api.slack.com/apps](https://api.slack.com/apps) पर बनाया गया एक Slack app
3. आवश्यक scopes वाला Bot token
4. API access वाला एक Brevo account
5. एक Tajo account

## प्रमाणीकरण

### Bot Token (अनुशंसित)

अपने workspace में एक Slack app install करें और API access के लिए bot token का उपयोग करें।

1. [api.slack.com/apps](https://api.slack.com/apps) पर app बनाएं
2. “OAuth & Permissions” के अंतर्गत आवश्यक OAuth scopes जोड़ें
3. app को workspace में install करें
4. Bot User OAuth Token कॉपी करें (`xoxb-...`)

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

अपने Slack integration को कई workspaces में distribute करने के लिए:

```bash
# 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}"
```

#### आवश्यक Bot Scopes

```
chat:write           # messages भेजें
channels:read        # channels list करें
channels:history     # channel messages पढ़ें
users:read           # workspace users list करें
users:read.email     # user email addresses पढ़ें
reactions:write      # messages में reactions जोड़ें
files:write          # files upload करें
```

User Email Access

Slack users को Brevo contacts से मिलाने के लिए `users:read.email` scope आवश्यक है। इसके बिना, user mapping display names तक सीमित रहेगी।

## कॉन्फ़िगरेशन

### बेसिक सेटअप

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

Slack user data को Brevo contact attributes से map करें:

#### Default Mappings

| Parameter | Type | Description |
| --- | --- | --- |
| `profile.email` required | string | User email (Brevo matching के लिए unique identifier) |
| `real_name` optional | string | पूर्ण नाम, FIRSTNAME/LASTNAME में विभाजित |
| `profile.phone` optional | string | SMS attribute से map होता है |
| `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

| Method | Endpoint | विवरण |
| --- | --- | --- |
| `POST` | `chat.postMessage` | किसी channel में message भेजें |
| `POST` | `chat.update` | मौजूदा message अपडेट करें |
| `POST` | `chat.delete` | message हटाएं |
| `POST` | `chat.scheduleMessage` | message schedule करें |
| `POST` | `chat.postEphemeral` | user को ephemeral message भेजें |

### Channels

| Method | Endpoint | विवरण |
| --- | --- | --- |
| `GET` | `conversations.list` | channels list करें |
| `GET` | `conversations.info` | channel info प्राप्त करें |
| `GET` | `conversations.members` | channel members list करें |
| `GET` | `conversations.history` | channel messages प्राप्त करें |

### Users

| Method | Endpoint | विवरण |
| --- | --- | --- |
| `GET` | `users.list` | workspace users list करें |
| `GET` | `users.info` | user info प्राप्त करें |
| `GET` | `users.lookupByEmail` | email द्वारा user खोजें |
| `GET` | `users.conversations` | user channels list करें |

### Interactions

| Method | Endpoint | विवरण |
| --- | --- | --- |
| `POST` | `views.open` | modal view खोलें |
| `POST` | `views.update` | modal view अपडेट करें |
| `POST` | `reactions.add` | emoji reaction जोड़ें |

## Events

### Brevo-to-Slack Notifications

| Event | Trigger | Slack Action |
| --- | --- | --- |
| `new_subscriber` | Brevo में Contact बनाया गया | #marketing पर post करें |
| `campaign_sent` | Email campaign भेजा गया | #marketing पर summary post करें |
| `order_placed` | High-value order detect हुआ | विवरण के साथ #sales पर post करें |
| `cart_abandoned` | 30 मिनट के लिए cart abandoned | follow-up के लिए #sales पर post करें |
| `ticket_created` | Support ticket खुला | #support पर post करें |
| `unsubscribed` | Contact unsubscribed | #marketing पर alert post करें |

### Slack-to-Brevo Triggers

| Slack Event | Trigger | Brevo Action |
| --- | --- | --- |
| `message_action` | Custom message shortcut | contact को list में जोड़ें या automation trigger करें |
| `block_actions` | Message में Button click | contact attribute अपडेट करें या email भेजें |
| `view_submission` | Modal form submit हुआ | contact बनाएं या workflow trigger करें |

## कोड उदाहरण

### कनेक्टर शुरू करें

```javascript
import { TajoClient } from '@tajo/sdk';

const tajo = new TajoClient({
  apiKey: process.env.TAJO_API_KEY,
  brevoApiKey: process.env.BREVO_API_KEY
});

// Slack कनेक्ट करें
await tajo.connectors.connect('slack', {
  botToken: process.env.SLACK_BOT_TOKEN,
  signingSecret: process.env.SLACK_SIGNING_SECRET
});
```

### Marketing Notifications भेजें

```javascript
// जब high-value order place हो तो notification भेजें
await tajo.slack.notify({
  channel: 'sales',
  event: 'order_placed',
  data: {
    customerEmail: 'customer@example.com',
    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:*\ncustomer@example.com' },
          { 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'
          }
        ]
      }
    ]
  }
});
```

### Slack Interactions हैंडल करें

```javascript
import crypto from 'crypto';

app.post('/slack/interactions', async (req, res) => {
  // 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);

  // 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 एक tiered system का उपयोग करते हैं:

| Tier | Limit | सामान्य Methods |
| --- | --- | --- |
| Tier 1 | 1 request/minute | `chat.delete`, `conversations.kick` |
| Tier 2 | 20 requests/minute | `conversations.history`, `users.info` |
| Tier 3 | 50 requests/minute | `conversations.list`, `users.list` |
| Tier 4 | 100 requests/minute | `chat.postMessage` |
| Special | भिन्न | समान channel पर `chat.postMessage`: 1/sec |

अतिरिक्त limits:

- **Web API**: short-term throttle के साथ Burst limit
- **Events API**: 3 attempts के लिए Delivery retries
- **Incoming Webhooks**: प्रति webhook URL 1 message/second
- **Block Kit**: प्रति message अधिकतम 50 blocks

Channel Posting Rate

समान channel में post करना लगभग 1 message प्रति सेकंड तक सीमित है। rate limiting से बचने के लिए notifications को batch करें या threads का उपयोग करें।

## समस्या निवारण

### सामान्य समस्याएं

| समस्या | कारण | समाधान |
| --- | --- | --- |
| `not_authed` | अमान्य bot token | app पुनः install करें और नया bot token कॉपी करें |
| `channel_not_found` | Bot channel में नहीं है | target channel में bot को invite करें |
| `missing_scope` | आवश्यक scope नहीं दिया गया | scope जोड़ें और app पुनः install करें |
| Event प्राप्त नहीं हुआ | Event subscription सेट नहीं | Event Subscriptions URL कॉन्फ़िगर करें |
| Interaction timeout | Response >3 सेकंड | तुरंत 200 के साथ respond करें, async process करें |

### Debug Mode

verbose logging enable करें:

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

### Connection Test करें

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

## सर्वोत्तम प्रथाएं

1. **Block Kit का उपयोग करें** - Slack के Block Kit framework के साथ rich, interactive messages बनाएं
2. **जल्दी respond करें** - 3 सेकंड के भीतर interactions स्वीकार करें, asynchronously process करें
3. **संबंधित messages को thread करें** - noise कम करने के लिए संबंधित notifications को threads में group करें
4. **Channel द्वारा route करें** - विभिन्न event types को उपयुक्त team channels में भेजें
5. **Action buttons शामिल करें** - customer data तक त्वरित पहुंच के लिए “View in Brevo” buttons जोड़ें
6. **Unfurling लागू करें** - Slack में shared किए गए Brevo links के लिए rich previews दिखाएं

## सुरक्षा

- **Bot Token** - granular permissions के साथ OAuth-scoped access token
- **Request signing** - incoming requests के लिए HMAC SHA-256 signature verification
- **OAuth 2.0** - multi-workspace distribution के लिए industry-standard authorization
- **TLS encryption** - सभी API communication HTTPS के माध्यम से encrypted
- **Token rotation** - enhanced security के लिए स्वचालित token rotation

## संबंधित संसाधन

- [Slack API Documentation](https://api.slack.com/methods)
- [Slack Block Kit Builder](https://app.slack.com/block-kit-builder)
- [Slack Events API](https://api.slack.com/events-api)
- [Brevo कनेक्टर](https://tajo.io/hi/docs/connectors/marketing/brevo)
- [Customer Sync Skill](https://tajo.io/hi/docs/skills/data-sync/customer-sync)
