Skip to content

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

  1. Go to the Azure Portal
  2. Click Create a resource
  3. Search for "Azure Bot" and select it
  4. Click Create
  5. Configure the bot:
  6. Bot handle: A unique identifier for your bot
  7. Subscription: Your Azure subscription
  8. Resource group: Create new or use existing
  9. Pricing tier: Select based on your needs (F0 is free for testing)
  10. Microsoft App ID: Select "Create new Microsoft App ID"
  11. Click Review + create, then Create
  12. Wait for the deployment to complete

Step 2: Get Your Bot Credentials

  1. Navigate to your newly created Azure Bot resource
  2. Go to Configuration in the left sidebar
  3. Note the Microsoft App ID - you will need this
  4. Click Manage Password next to the App ID
  5. Go to Certificates & secrets
  6. Click New client secret
  7. Add a description and select an expiration period
  8. Click Add
  9. Important: Copy the secret value immediately - it will not be shown again

Step 3: Configure the Bot Messaging Endpoint

  1. In your Azure Bot resource, go to Configuration
  2. Set the Messaging endpoint to your Raikoo webhook URL
  3. You will get this URL after creating a trigger in Raikoo
  4. Format: https://your-raikoo-domain/api/triggers/{webhookId}
  5. Click Apply

Step 4: Enable Teams Channel

  1. In your Azure Bot resource, go to Channels
  2. Click Microsoft Teams
  3. Review and accept the terms of service
  4. Click Apply
  5. Your bot is now enabled for Teams

Step 5: Create a Connection in Raikoo

  1. Navigate to your organization in Raikoo
  2. Click Connections in the left navigation
  3. Click Create Connection
  4. Configure the connection:
  5. Name: Give it a descriptive name (e.g., "Teams Helpdesk Bot")
  6. Description: Optional description of the connection's purpose
  7. Platform: Select Microsoft Teams
  8. Go to the Credentials tab
  9. Enter your Azure Bot credentials:
  10. App ID: Your Microsoft App ID from step 2
  11. App Password: The client secret from step 2
  12. 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)

  1. Navigate to Integrations in the left navigation
  2. Click Create Trigger
  3. Configure the trigger:
  4. Name: A descriptive name for this integration
  5. Description: What this integration does
  6. External Connection: Select the Teams connection you created
  7. Go to the Execution tab:
  8. Execution Mode: Choose "Chat Agent" for conversational AI, or "Workflow" for automated processing
  9. Project: Select the project containing your agent or workflow
  10. Chat Agent (if using Chat mode): Select the AI agent to handle messages
  11. Authentication Mode: Configure how executions are authenticated
  12. Click Save

Step 7: Update the Azure Bot Messaging Endpoint

  1. In Raikoo, go to the Webhook tab of your trigger
  2. Copy the Webhook URL
  3. Go back to your Azure Bot Configuration
  4. Paste the URL as the Messaging endpoint
  5. Click Apply

Step 8: Install the Bot in Teams

For testing or organization-wide deployment:

  1. In your Azure Bot resource, go to Channels
  2. Click the Teams icon to open in Teams
  3. Click Add to install the bot

For app approval process:

  1. Create a Teams app manifest with your bot details
  2. Upload to the Teams admin center for approval
  3. Once approved, users can install from the app catalog

Step 9: Connect a Teams Channel

For messaging channels (not just direct messages):

  1. In Raikoo, go to your trigger's Channels tab
  2. Copy the binding command (e.g., @Raikoo /connect ABC123)
  3. In Teams, add the bot to a channel
  4. Send the binding command in that channel
  5. 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:

  1. Attachments are downloaded from the platform and written to the agent's workspace as files (e.g., /report.pdf, /screenshot.png)
  2. 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
  3. 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
  4. 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

  1. Verify the messaging endpoint URL is correct in Azure Bot Configuration
  2. Check that your trigger is set to Active in Raikoo
  3. Verify your App ID and Password are correct
  4. Check that the Teams channel is enabled in Azure Bot

Authentication Errors

  1. Ensure the App Password has not expired
  2. Verify the App ID matches in both Azure and Raikoo
  3. Check that the bot has the correct permissions

Messages Not Reaching Raikoo

  1. Verify the messaging endpoint is publicly accessible
  2. Check Azure Bot Configuration for any errors
  3. Ensure the Teams channel binding is active

Adaptive Cards Not Rendering

  1. Ensure your response follows Adaptive Card schema
  2. Check for invalid elements in the card JSON
  3. 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:

  1. Add a Send Message operation to your workflow
  2. Select your Teams connection
  3. Specify the channel or conversation ID
  4. 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