Microsoft Teams Integration
Connect Microsoft Teams to Raikoo to build intelligent bots that respond to user messages with rich Adaptive Card responses.
What You Can Build
- Helpdesk bots that answer employee questions using your organization's knowledge base
- Workflow triggers that execute automated processes when users send commands
- Notification systems that post updates to Teams channels
- Interactive assistants that help users complete tasks through conversation
Prerequisites
Before setting up Teams integration, you will need:
- Access to Microsoft Azure portal
- Admin access to your Microsoft Teams organization (or ability to request app approval)
- Admin access to your Raikoo organization
Setup Steps
Step 1: Create an Azure Bot Resource
- Go to the Azure Portal
- Click Create a resource
- Search for "Azure Bot" and select it
- Click Create
- Configure the bot:
- Bot handle: A unique identifier for your bot
- Subscription: Your Azure subscription
- Resource group: Create new or use existing
- Pricing tier: Select based on your needs (F0 is free for testing)
- Microsoft App ID: Select "Create new Microsoft App ID"
- Click Review + create, then Create
- Wait for the deployment to complete
Step 2: Get Your Bot Credentials
- Navigate to your newly created Azure Bot resource
- Go to Configuration in the left sidebar
- Note the Microsoft App ID - you will need this
- Click Manage Password next to the App ID
- Go to Certificates & secrets
- Click New client secret
- Add a description and select an expiration period
- Click Add
- Important: Copy the secret value immediately - it will not be shown again
Step 3: Configure the Bot Messaging Endpoint
- In your Azure Bot resource, go to Configuration
- Set the Messaging endpoint to your Raikoo webhook URL
- You will get this URL after creating a trigger in Raikoo
- Format:
https://your-raikoo-domain/api/triggers/{webhookId} - Click Apply
Step 4: Enable Teams Channel
- In your Azure Bot resource, go to Channels
- Click Microsoft Teams
- Review and accept the terms of service
- Click Apply
- Your bot is now enabled for Teams
Step 5: Create a Connection in Raikoo
- Navigate to your organization in Raikoo
- Click Connections in the left navigation
- Click Create Connection
- Configure the connection:
- Name: Give it a descriptive name (e.g., "Teams Helpdesk Bot")
- Description: Optional description of the connection's purpose
- Platform: Select Microsoft Teams
- Go to the Credentials tab
- Enter your Azure Bot credentials:
- App ID: Your Microsoft App ID from step 2
- App Password: The client secret from step 2
- Click Save
Note: Teams connections require your own Azure Bot credentials. This ensures your bot appears with your organization's identity in Teams, and provides full control over authentication and permissions.
Step 6: Create an Integration (Trigger)
- Navigate to Integrations in the left navigation
- Click Create Trigger
- Configure the trigger:
- Name: A descriptive name for this integration
- Description: What this integration does
- External Connection: Select the Teams connection you created
- Go to the Execution tab:
- Execution Mode: Choose "Chat Agent" for conversational AI, or "Workflow" for automated processing
- Project: Select the project containing your agent or workflow
- Chat Agent (if using Chat mode): Select the AI agent to handle messages
- Authentication Mode: Configure how executions are authenticated
- Click Save
Step 7: Update the Azure Bot Messaging Endpoint
- In Raikoo, go to the Webhook tab of your trigger
- Copy the Webhook URL
- Go back to your Azure Bot Configuration
- Paste the URL as the Messaging endpoint
- Click Apply
Step 8: Install the Bot in Teams
For testing or organization-wide deployment:
- In your Azure Bot resource, go to Channels
- Click the Teams icon to open in Teams
- Click Add to install the bot
For app approval process:
- Create a Teams app manifest with your bot details
- Upload to the Teams admin center for approval
- Once approved, users can install from the app catalog
Step 9: Connect a Teams Channel
For messaging channels (not just direct messages):
- In Raikoo, go to your trigger's Channels tab
- Copy the binding command (e.g.,
@Raikoo /connect ABC123) - In Teams, add the bot to a channel
- Send the binding command in that channel
- You should see the channel appear in the Connected Channels list
Message Formatting
Raikoo automatically converts responses to Microsoft Adaptive Cards:
| Markdown | Adaptive Card |
|---|---|
**bold** |
Bold text |
*italic* |
Italic text |
# Header |
Large text block |
| Code blocks | Code block element |
| Lists | Container with items |
[link](url) |
Action.OpenUrl |
For complex responses, your AI agent can generate rich card layouts with images, buttons, and interactive elements.
Bot Commands
Teams bots support special commands:
| Command | Description |
|---|---|
/connect <code> |
Binds the current channel to an Inbound Trigger |
/workflow <id> [params] |
Executes a specific workflow with optional parameters |
Typing Indicator
When processing messages, Raikoo sends a typing indicator so users know the bot is working on a response. This provides a natural conversational experience.
Chat Settings
After creating your trigger, configure chat-specific settings in the Chat Settings tab. These settings control how the bot responds, which users and channels are allowed, and how attachments are handled.
Bot Responses
| Setting | Default | Description |
|---|---|---|
| Send welcome message on install | On | Send a greeting when the bot is added to a channel or conversation |
| Welcome Message | Built-in default | Custom message shown when the bot joins a channel. Leave blank for the default |
| Hello Response | Uses welcome message | Custom response when a user says "hello" or "hi" |
| Help Response | Built-in default | Custom response when a user says "help" |
| Send typing indicator | Off | Show a typing status while the bot is processing (not supported by all platforms) |
User Filtering
Control which users can interact with the bot:
| Setting | Description |
|---|---|
| Allowed Users (whitelist) | Only process messages from these users. Supports patterns. User ID format varies by platform - for Teams, use the AAD Object ID |
| Blocked Users (blacklist) | Ignore messages from these users. Supports patterns like bot-* or service-account |
Channel Filtering
| Setting | Default | Description |
|---|---|---|
| Allowed Channels | Empty (all channels) | Whitelist of channel IDs or patterns |
| Blocked Channels | Empty | Blacklist of channel IDs or patterns |
| Allow direct messages | On | Process 1:1 conversations with the bot |
| Allow channel messages | On | Process messages from group channels (when @mentioned) |
Message Filtering
| Setting | Default | Description |
|---|---|---|
| Required message patterns | Empty | Only process messages matching these glob patterns (e.g., /ticket*) |
| Blocked message patterns | Empty | Ignore messages matching these patterns |
| Max message length | 0 (unlimited) | Skip messages longer than this (in characters) |
Attachments
When users send files alongside their messages, Raikoo can process them and make them available to the AI agent.
| Setting | Default | Description |
|---|---|---|
| Process attachments | Off | Enable attachment processing. When off, attachments are ignored |
| Convert to Markdown file | On | Create .md shadow files for PDFs and DOCX documents (e.g., report.pdf.md) so the agent can read their content |
| Send images to AI | Off | Include images directly in the AI context (requires a vision-capable model) |
| Send PDFs to AI | Off | Include PDFs directly in the AI context (requires a compatible provider such as Anthropic) |
| Send audio to AI | Off | Include audio files directly in the AI context (requires a compatible provider) |
| Send video to AI | Off | Include video files directly in the AI context (requires a compatible provider) |
| Max attachment size (KB) | 5120 (5 MB) | Attachments larger than this are skipped. Set to 0 for unlimited |
| Allowed attachment types | Empty (all types) | MIME type whitelist. Example: application/pdf, image/* |
How Attachment Processing Works
When a user sends a message with attachments:
- Attachments are downloaded from the platform and written to the agent's workspace as files (e.g.,
/report.pdf,/screenshot.png) - Document conversion (if enabled) creates shadow markdown files alongside the originals (e.g.,
/report.pdf.md) so the agent can read their content using tools - Context-stuffing (the "Send to AI" options) additionally includes the file data directly in the AI's input, allowing models that support native file handling to process them directly
- The AI agent is informed that files are available in its workspace and can reference them by path
The workspace approach means the agent can use tools to read, analyze, or transform attachments during the conversation. Context-stuffing provides an additional fast path for models that natively support images, PDFs, audio, or video.
Troubleshooting
Bot Not Responding
- Verify the messaging endpoint URL is correct in Azure Bot Configuration
- Check that your trigger is set to Active in Raikoo
- Verify your App ID and Password are correct
- Check that the Teams channel is enabled in Azure Bot
Authentication Errors
- Ensure the App Password has not expired
- Verify the App ID matches in both Azure and Raikoo
- Check that the bot has the correct permissions
Messages Not Reaching Raikoo
- Verify the messaging endpoint is publicly accessible
- Check Azure Bot Configuration for any errors
- Ensure the Teams channel binding is active
Adaptive Cards Not Rendering
- Ensure your response follows Adaptive Card schema
- Check for invalid elements in the card JSON
- Verify the card version is supported by Teams
Security Considerations
- JWT Verification: All requests are verified using Bot Framework JWT tokens
- Tenant Restrictions: You can restrict the bot to specific Azure AD tenants
- Credential Storage: Credentials are stored securely in Azure Key Vault
- HTTPS Required: All Bot Framework communication uses HTTPS
Best Practices
- Use descriptive names: Name your connections and triggers clearly
- Test in a dedicated channel: Create a test channel before production deployment
- Monitor response times: Complex AI responses may take several seconds
- Use Adaptive Cards: Rich formatting provides a better user experience
- Handle errors gracefully: Provide helpful error messages to users
Sending Proactive Messages
In addition to responding to messages, you can send proactive messages from workflows using the Send Message operation:
- Add a Send Message operation to your workflow
- Select your Teams connection
- Specify the channel or conversation ID
- Compose your message (supports Adaptive Cards)
This is useful for: - Sending notifications when workflows complete - Broadcasting announcements to channels - Following up on previous conversations
Next Steps
- Learn about AI agents to customize your bot's behavior
- Create workflows for complex automation scenarios
- Set up Slack integration for multi-platform bots