> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ascendgtm.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect to Slack

> Query Ascend Gateway V5 directly from Slack via the GTM bot.

# Connect to Slack

Query the Ascend Gateway V5 directly from Slack by messaging the Ascend GTM bot.

<Info>
  **Requirements**

  * Ascend GTM Slack bot installed in your workspace
  * Bot must have `chat:write`, `im:history`, and `im:read` scopes
</Info>

## How It Works

DM the Ascend GTM bot in Slack. The bot receives your message, executes the appropriate V5 gateway call, and replies with the results.

```
You: "list my connected APIs"
Bot: 📡 Connected Providers (70+):
     ✅ hubspot (CRM)
     ✅ google_ads (Advertising)
     ✅ salesforce (CRM)
     ✅ ga4 (Analytics)
     ... and more
```

## Supported Queries

| Query Pattern                                       | What It Does                      |
| --------------------------------------------------- | --------------------------------- |
| "list APIs" / "show providers" / "what's connected" | Lists all connected API providers |
| "hubspot contacts" / "search contacts"              | Searches HubSpot CRM              |
| "google ads" / "campaigns"                          | Queries Google Ads                |
| "health" / "status"                                 | Shows gateway health status       |
| "help"                                              | Shows available commands          |

## Example Conversations

### Check System Health

```
You: "How's the gateway?"
Bot: 🟢 Gateway Healthy
     Tokens: 42 active, 0 expired
     Errors (1h): 0
     Providers: 70+ configured
```

### Search CRM

```
You: "Find HubSpot contacts from this week"
Bot: 📋 HubSpot Contacts (5 results):
     • John Smith (john@example.com) — Created 2026-04-10
     • Jane Doe (jane@company.com) — Created 2026-04-09
     ...
```

## Setup (Workspace Admin)

If the bot is not yet installed:

1. Go to [api.slack.com/apps](https://api.slack.com/apps) → select the Ascend GTM app
2. Under **OAuth & Permissions**, ensure these scopes are granted:
   * `chat:write` — Send messages
   * `im:history` — Read DM history
   * `im:read` — Detect DM channels
3. Under **Event Subscriptions**, set the Request URL to:
   ```
   https://ascend-gateway-v5.ascendgtm.workers.dev/slack/events
   ```
4. Subscribe to: `message.im` (Direct messages)
5. Install/reinstall the app to the workspace

## Limitations

* **DMs only** — the bot responds to direct messages, not channel mentions (for security)
* **Text queries** — no file uploads or Slack-specific formatting in queries
* **Default tenant** — Slack queries use the `ascend` tenant. Multi-tenant Slack is a future feature.

## Troubleshooting

| Issue                       | Fix                                                            |
| --------------------------- | -------------------------------------------------------------- |
| Bot doesn't respond         | Check bot has `chat:write` scope                               |
| "Invalid signature" in logs | Verify `SLACK_SIGNING_SECRET` in Wrangler secrets              |
| Results truncated           | Large results are trimmed to fit Slack's 3000-char block limit |
