Communications Hub
Connect conversations to Teams, Slack, Discord, and SMS.
The Communications Hub connects Portablemind conversations to external messaging platforms — Microsoft Teams, Slack, Discord, Twilio SMS, and Twilio Voice. Once configured, messages flow bidirectionally: when someone sends a message in Teams or Slack, it appears in the linked Portablemind conversation. When an AI agent or user replies in Portablemind, the response is delivered back to the external platform.
This enables powerful workflows: a customer can text your Twilio number and get an AI-powered response, your team can interact with AI agents directly in their Teams or Slack channels, and all conversations are centralized in Portablemind with full history, analytics, and agent capabilities.
Note: Multi-tenant by design. Each tenant gets their own isolated channel instances with their own credentials. A single Hub deployment serves all tenants securely — your channels, credentials, and messages are never visible to any other tenant.
How it works
| Step | What happens |
|---|---|
| 1 | Platform setup — Register a bot or app on the external platform (Teams, Slack, Discord, or Twilio) |
| 2 | Store credentials — Save the platform credentials in the channel's setup wizard in Portablemind (Administration → Communications Hub → Manage) |
| 3 | Hub connects — The Hub automatically detects new credentials and connects to the platform |
| 4 | Link channels — Use Portablemind to link external channels/conversations to Portablemind conversations |
| 5 | Messages flow — Inbound and outbound messages are automatically routed between platforms and Portablemind |
The Manage page
All in-app configuration lives on one screen: Administration → Communications Hub → Manage. The page shows a tile for each channel — Slack, Teams, Discord, SMS, Voice — with a status dot (grey = not configured, orange = configured but disabled, green = enabled). The Hub itself must be switched on first via Get Started; it's available on qualifying plan tiers, and the page shows an upgrade prompt if your current plan doesn't include it.
Clicking a channel tile opens that channel's setup wizard: numbered setup steps for the external platform, your tenant's exact webhook URLs with copy buttons, and a credential form. Save & Enable turns the channel on; Disable Channel turns it off while preserving the saved credentials.
Supported channels
| Channel | What it covers |
|---|---|
| Microsoft Teams | Team channels and 1:1 chats |
| Slack | Public and private channels, DMs |
| Discord | Server text channels |
| Twilio SMS | Inbound and outbound text messages |
| Twilio Voice | AI-powered voice calls with context enrichment |
Finding your tenant ID
Throughout this guide, webhook URLs include your tenant ID — the numeric ID of your tenant in Portablemind. You don't need to hunt for it: each channel's setup wizard (Administration → Communications Hub → Manage, then click the channel tile) displays the exact, ready-to-paste webhook URLs for your tenant, with copy buttons. For API-level details, see the API guide.
Warning: All webhook URLs in this guide use the format
https://hub.portablemind.ai/webhooks/<channel>/<tenant_id>/.... Replace<tenant_id>with your actual tenant ID (e.g.,22).
AI agent display names
When AI agents reply from Portablemind, the Hub can display the agent's name instead of the generic bot name on platforms that support it (currently Slack). For example, if you have an agent named "Dilbert", their replies in Slack will show "Dilbert" as the sender rather than "Portablemind Bot".
This happens automatically — no extra configuration needed. The agent's display name is passed through with the outbound message.
Microsoft Teams setup
Connecting Microsoft Teams requires creating an Azure Bot and a Teams App Package. This is the most involved setup of the five channels, but each step is straightforward.
Step 1: Create an Azure App Registration
Tip: If you already have an Azure App Registration for a bot, skip to Step 2.
- Go to Azure Portal → App registrations
- Click New registration
- Name: choose something descriptive (e.g., "Portablemind Bot")
- Supported account types: Accounts in any organizational directory (Multitenant)
- Redirect URI: leave blank for now
- Click Register
- On the app's Overview page, copy these two values — you'll need them later:
| Value | Used as |
|---|---|
| Application (client) ID | Your bot_id |
| Directory (tenant) ID | Your Azure tenant_id |
Step 2: Create a client secret
- In your app registration, go to Certificates & secrets
- Click New client secret
- Add a description (e.g., "Portablemind Hub") and choose an expiry period
- Click Add
- Copy the Value immediately — it will only be shown once. This is your
bot_password.
Warning: Set a reminder to rotate the client secret before it expires. When it expires, your Teams integration will stop working.
Step 3: Create an Azure Bot resource
- Go to Azure Portal → Create a resource → Azure Bot
- Bot handle: choose a unique name
- Pricing tier: Free (F0) is fine for getting started
- Type of App: Multi Tenant
- Creation type: Use existing app registration
- App ID: paste your Application (client) ID from Step 1
- Click Review + create, then Create
Step 4: Set the messaging endpoint
- Open your Azure Bot resource and go to Configuration
- Set Messaging endpoint to:
https://hub.portablemind.ai/webhooks/msteams/YOUR_TENANT_ID/messages
Replace YOUR_TENANT_ID with your Portablemind tenant ID, then click Apply.
Step 5: Enable the Teams channel
- In your Azure Bot resource, go to Channels
- Click Microsoft Teams
- Accept the terms and click Apply
Step 6: Add Graph API permission (for channel discovery)
This permission allows Portablemind to list your Teams channels when linking conversations.
- Go back to your App registration → API permissions
- Click Add a permission → Microsoft Graph → Application permissions
- Search for and add:
Channel.ReadBasic.All - Click Grant admin consent (requires admin privileges)
Step 7: Find your Team ID
The Team ID is needed for channel discovery. To find it:
- In Microsoft Teams, click the … (three dots) next to your team name
- Select Get link to team
- The URL contains your Team ID as the
groupIdparameter:
https://teams.microsoft.com/l/team/...?groupId=97d8107a-2d4f-4280-84d2-ed0a3dd0051d&tenantId=...
The groupId value is your Team ID. If you have multiple teams, comma-separate their IDs.
Step 8: Sideload the Teams app
You need a Teams App Package (a .zip file) to install the bot in your Teams tenant.
- Create a
manifest.jsonfile with your bot's Application (client) ID - Include two icon files (color icon 192x192, outline icon 32x32)
- Zip all three files together
- In Teams, go to Apps → Manage your apps → Upload an app → Upload a custom app
- Select your .zip file and install it
For a complete manifest.json template, see the Teams manifest schema documentation.
Step 9: Store credentials in Portablemind
Save the following in the Teams channel's setup wizard (Administration → Communications Hub → Manage → Teams tile), then click Save & Enable:
| Field | Value | Where to find it |
|---|---|---|
bot_id | Application (client) ID | Azure App Registration → Overview |
bot_password | Client secret value | Azure App Registration → Certificates & secrets |
tenant_id | Directory (tenant) ID | Azure App Registration → Overview |
service_url | https://smba.trafficmanager.net/teams/ | Default value — rarely changes |
team_ids | Your Team ID(s) | Teams → Get link to team → groupId |
Note: Teams @mention requirement: in team channels, the bot only receives messages when @mentioned. In 1:1 chats, all messages are received automatically.
Slack setup
Tip: The fastest path is in-app: open the Slack tile in Administration → Communications Hub → Manage and click Add to Slack to authorize the connection via OAuth — no manual app creation needed. The manual steps below remain available in the wizard under Advanced: Manual Setup.
Connecting Slack manually involves creating a Slack App, adding the right permissions, and configuring event subscriptions so Slack notifies the Hub when messages arrive.
Step 1: Create a Slack App
- Go to api.slack.com/apps
- Click Create New App → From scratch
- Give your app a name (e.g., "Portablemind Bot") and select your workspace
- Click Create App
Step 2: Add bot token scopes
Go to OAuth & Permissions in the sidebar, scroll to Scopes, and add these Bot Token Scopes:
| Scope | Purpose |
|---|---|
chat:write | Send messages to channels |
chat:write.customize | Display AI agent names instead of bot name on replies |
channels:read | List public channels (for channel discovery in Portablemind) |
channels:history | Read messages in public channels the bot is in |
groups:read | List private channels (for channel discovery) |
groups:history | Read messages in private channels the bot is in |
im:history | Read direct messages to the bot |
files:read | Access files shared in conversations |
users:read | Resolve user information |
Step 3: Install the app to your workspace
- Still on OAuth & Permissions, scroll up and click Install to Workspace
- Review the permissions and click Allow
- Copy the Bot User OAuth Token (starts with
xoxb-) — this is yourslack_bot_token
Step 4: Get the signing secret
- Go to Basic Information in the sidebar
- Under App Credentials, copy the Signing Secret — this is your
slack_signing_secret
Step 5: Enable event subscriptions
- Go to Event Subscriptions in the sidebar and toggle it ON
- Set the Request URL to:
https://hub.portablemind.ai/webhooks/slack/YOUR_TENANT_ID/events
Slack will send a verification challenge — the Hub responds automatically. You should see a green "Verified" checkmark.
- Expand Subscribe to bot events and click Add Bot User Event for each:
| Event | Description |
|---|---|
message.channels | Messages in public channels the bot is in |
message.groups | Messages in private channels the bot is in |
message.im | Direct messages to the bot |
- Click Save Changes
Warning: Without these events, inbound messages will not work. Outbound messages (Portablemind → Slack) will still function, but Slack won't notify the Hub when users send messages in channels.
Step 6: Store credentials in Portablemind
Save the following in the Slack channel's setup wizard (Administration → Communications Hub → Manage → Slack tile → Advanced: Manual Setup), then click Save & Enable:
| Field | Value | Where to find it |
|---|---|---|
slack_bot_token | Bot User OAuth Token (xoxb-...) | OAuth & Permissions page |
slack_signing_secret | Signing Secret | Basic Information → App Credentials |
Step 7: Invite the bot to channels
Warning: You can link any visible Slack channel to a Portablemind conversation, but the bot can only send and receive messages in channels where it has been invited.
To invite the bot to a channel, open the Slack channel and type /invite @YourBotName. The bot will now receive messages and can respond in that channel.
Recommended workflow: link the channel in Portablemind first, then invite the bot in Slack. Unlike Teams, the bot receives all messages in a channel — no @mention required.
Discord setup
Discord integration connects text channels in your Discord server to Portablemind conversations. The bot listens for messages via Discord's Gateway (WebSocket) connection.
Step 1: Create a Discord application
- Go to the Discord Developer Portal
- Click New Application
- Name it (e.g., "Portablemind Bot") and click Create
Step 2: Add a bot
- Go to the Bot section in the sidebar
- Click Reset Token and copy the token immediately — this is your
bot_token - Under Privileged Gateway Intents, enable Message Content Intent
- Click Save Changes
Warning: The bot token is only shown once when you reset it. If you lose it, you'll need to reset it again (which invalidates the old token).
Step 3: Invite the bot to your server
- Go to OAuth2 → URL Generator in the sidebar
- Under Scopes, check
bot - Under Bot Permissions, check
Send Messages,Read Message History, andView Channels - Copy the generated URL at the bottom, open it in your browser, and select the server to add the bot to
Step 4: Get the server (guild) ID
- In Discord, go to User Settings → Advanced → enable Developer Mode
- Right-click on your server name in the sidebar
- Click Copy Server ID — this is your
guild_id
Step 5: Store credentials in Portablemind
Save the following in the Discord channel's setup wizard (Administration → Communications Hub → Manage → Discord tile), then click Save & Enable:
| Field | Value | Where to find it |
|---|---|---|
bot_token | Bot token | Developer Portal → Bot → Reset Token |
guild_id | Server (Guild) ID | Right-click server → Copy Server ID |
Note: Unlike Slack and Teams, the Discord bot receives all messages in all text channels it has access to — no invite or @mention required.
Twilio SMS setup
Twilio SMS enables your Portablemind conversations to send and receive text messages. When someone texts your Twilio number, the message appears in the linked Portablemind conversation. If no conversation is linked, one is created automatically.
Step 1: Get your Twilio credentials
- Log in to the Twilio Console
- On the dashboard, find and copy:
| Value | Notes |
|---|---|
| Account SID | Starts with AC — this is your twilio_account_sid |
| Auth Token | Click to reveal — this is your twilio_auth_token |
Step 2: Get a phone number
- In Twilio Console, go to Phone Numbers → Manage → Buy a number
- Choose a number with SMS capability
- Note the number in E.164 format (e.g.,
+18005551234) — this is yourtwilio_phone_number
Step 3: Configure Twilio webhooks
- Go to Phone Numbers → Manage → Active Numbers → click your number
- Under Messaging, set:
| Setting | Value |
|---|---|
| A message comes in | Webhook, POST, https://hub.portablemind.ai/webhooks/twilio/YOUR_TENANT_ID/sms/inbound |
| Status callback URL | https://hub.portablemind.ai/webhooks/twilio/YOUR_TENANT_ID/sms/status |
- Click Save
Step 4: Store credentials in Portablemind
Save the following in the SMS channel's setup wizard (Administration → Communications Hub → Manage → SMS tile), then click Save & Enable:
| Field | Value | Where to find it |
|---|---|---|
twilio_account_sid | Account SID (AC...) | Twilio Console → Dashboard |
twilio_auth_token | Auth Token | Twilio Console → Dashboard |
twilio_phone_number | E.164 format (e.g., +18005551234) | Twilio Console → Phone Numbers |
domain | hub.portablemind.ai | Hostname only — no https:// |
Warning: The
domainmust be the hostname only (e.g.,hub.portablemind.ai), not a full URL. The Hub addshttps://automatically.
Auto-created conversations
When an SMS arrives from a phone number that isn't linked to any Portablemind conversation, the system automatically creates a new conversation and links it. The conversation is named twilio-sms-+18005551234 with the phone number in the description. Future messages from the same number route to the same conversation.
Outbound SMS registration requirements
Note: US carriers require registration for outbound SMS. Without it, outbound messages may be blocked.
- Local numbers (10DLC): requires A2P campaign registration (Brand + Campaign) — 3-7 business days
- Toll-free numbers: requires toll-free verification — 1-3 business days
Inbound SMS works immediately regardless of registration status. Trial accounts can only send to verified caller IDs.
Twilio Voice setup
Twilio Voice provides an AI-powered voice agent that answers inbound calls with real-time speech recognition and text-to-speech. The agent can look up caller context from Portablemind (who is calling, their history, open projects) and perform mid-call data lookups triggered by natural language.
Voice uses the same Twilio account and phone number as SMS. If you've already set up SMS, you just need to add the voice webhook and a few extra configuration values.
Step 1: Configure the voice webhook
- In the Twilio Console, go to Phone Numbers → Manage → Active Numbers → click your number
- Under Voice & Fax, set:
| Setting | Value |
|---|---|
| A call comes in | Webhook, HTTP POST, https://hub.portablemind.ai/webhooks/twilio/YOUR_TENANT_ID/voice/twiml |
- Click Save
Step 2: Get an OpenAI API key
The voice agent uses a fast OpenAI model (GPT-4o-mini by default) for real-time responses during calls. This is separate from the LLM models used in Portablemind conversations.
- Go to OpenAI API Keys
- Create a new key and copy it
Step 3: Store credentials in Portablemind
Save the following in the Voice channel's setup wizard (Administration → Communications Hub → Manage → Voice tile), then click Save & Enable:
| Field | Value | Notes |
|---|---|---|
twilio_account_sid | Account SID | Same as SMS |
twilio_auth_token | Auth Token | Same as SMS |
twilio_phone_number | Phone number | Same as SMS (E.164 format) |
domain | hub.portablemind.ai | Hostname only |
openai_api_key | Your OpenAI API key | For fast voice responses |
openai_model | gpt-4o-mini | Default — fast and cost-effective |
tts_provider | ElevenLabs | Text-to-speech provider |
tts_voice_id | ElevenLabs voice ID | Optional — uses default voice if empty |
welcome_greeting | Your greeting message | What the bot says when answering |
context_provider | portablemind | Enables caller context enrichment |
Voice + SMS shared conversations
Voice and SMS share the same conversation for a given phone number. When a caller's phone number is mapped to an SMS conversation, voice calls from that number will load the same conversation context and post transcripts to the same thread.
Caller context enrichment
When the context provider is enabled, the voice agent automatically looks up the caller's phone number in Portablemind to find who they are, what projects they're associated with, and any relevant history. This context is injected into the AI prompt so the agent can greet the caller by name and have informed conversations.
Linking channels to conversations
After setting up credentials, you link external channels to specific Portablemind conversations. This determines which conversation receives messages from which external channel.
Linking happens from the conversation's Channel Details dialog, on its External Channels tab: you add a mapping, choosing the external system and resource type, then selecting the specific external channel:
| Resource type | How it works |
|---|---|
| Discord channels | Search and select a channel from your Discord server |
| Slack channels | Search and select a channel from your Slack workspace |
| Teams conversations | Search and select a channel from your Teams team |
| SMS conversations | Enter a phone number in E.164 format (e.g., +18005551234) |
Once the mapping is saved, messages flow in both directions. Any AI agents in the conversation participate just as they do in the AI Assistant — external users are effectively chatting with them from Teams, Slack, Discord, or SMS.
Cross-channel bridging
A single Portablemind conversation can be linked to multiple external channels across different platforms. When a message arrives on any linked channel, it is fanned out to all other linked channels on the same conversation. This means a Discord message will appear in Teams and Slack, and vice versa.
Webhook URL reference
These are the webhook URLs used by each channel (replace YOUR_TENANT_ID with your actual tenant ID):
| Channel | Webhook URL | Where to configure |
|---|---|---|
| Teams | https://hub.portablemind.ai/webhooks/msteams/YOUR_TENANT_ID/messages | Azure Bot → Configuration → Messaging endpoint |
| Slack | https://hub.portablemind.ai/webhooks/slack/YOUR_TENANT_ID/events | Slack App → Event Subscriptions → Request URL |
| Discord | No webhook needed — Discord uses a Gateway (WebSocket) connection | — |
| Twilio SMS | https://hub.portablemind.ai/webhooks/twilio/YOUR_TENANT_ID/sms/inbound | Twilio Console → Phone Number → Messaging |
| Twilio Voice | https://hub.portablemind.ai/webhooks/twilio/YOUR_TENANT_ID/voice/twiml | Twilio Console → Phone Number → Voice |
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
| Outbound works but inbound doesn't (Slack) | Bot events not subscribed | Add message.channels, message.groups, message.im in Event Subscriptions |
| Outbound works but inbound doesn't (Teams) | Messaging endpoint not set or wrong tenant ID | Check Azure Bot → Configuration → Messaging endpoint matches your tenant ID |
| Bot doesn't respond in Slack channel | Bot not invited to channel | Type /invite @BotName in the Slack channel |
| Bot doesn't respond in Teams channel | Bot not @mentioned | @mention the bot in team channels. 1:1 chats don't need @mentions. |
| No channels found when adding a mapping | Credentials not configured or Hub hasn't refreshed | Verify credentials are saved in Portablemind. The Hub refreshes its channel list every 5 minutes. |
| Slack shows "Your request URL responded with an HTTP error" | Wrong webhook URL format | Use the tenant-scoped URL: .../webhooks/slack/YOUR_TENANT_ID/events |
| SMS outbound blocked (error 30034) | A2P registration not complete | Complete 10DLC campaign registration or toll-free verification in Twilio |
| Azure client secret expired | Teams integration stopped working | Create a new client secret in Azure and update the bot_password in your Portablemind channel configuration |