Skip to content
← Developer Hub

Developer Hub

Microsoft Teams Integration

Build an Azure Bot, wire it to a raia Agent via n8n, and sideload a custom Teams app for personal, team, and group-chat scopes.

01

Overview

Connect a raia Agent to Microsoft Teams by building an Azure Bot and packaging it as a custom Teams app. This guide covers the full setup: Azure Bot creation, n8n webhook workflow, manifest configuration, and sideloading the app into Teams.

02

Azure Bot & Workflow Configuration

Create Azure Bot

  1. 01

    Create an Azure Bot resource. Choose Single Tenant as the type of app.

  2. 02

    Create a new Microsoft App ID during setup.

  3. 03

    Navigate to Azure Bot → Settings → Configuration and copy the App Tenant ID.

Configure n8n Webhook

  1. 01

    Open n8n and create a POST Webhook. Name it Webhook and configure it to respond immediately.

  2. 02

    Add an IF node with the condition: {{ $json.body.type }} == "message".

  3. 03

    On the TRUE path, add an HTTP Request node to get an OAuth token.

HTTP Request — OAuth token (POST):

url
https://login.microsoftonline.com/{APP_TENANT_ID}/oauth2/v2.0/token
KeyValue
grant_typeclient_credentials
client_id{FROM OAUTH}
client_secret{FROM OAUTH}
scopehttps://api.botframework.com/.default

HTTP Request — Send message (POST):

url
{{ $('Webhook').item.json.body.serviceUrl }}v3/conversations/{{ $('Webhook').item.json.body.conversation.id }}/activities
KeyValue
AuthorizationBearer op_token }
Content-Typeapplication/json
  1. 04

    Return to Azure Bot → Settings → Configuration.

  2. 05

    Set the Messaging Endpoint to your n8n Webhook URL.

03

Message Payload

The JSON body sent back to Teams via the Bot Framework activity endpoint should look like this:

json
{
  "type": "message",
  "from": {
    "id": "{{ $('Webhook').item.json.body.recipient.id }}",
    "name": "{{ $('Webhook').item.json.body.recipient.name }}"
  },
  "recipient": {
    "id": "{{ $('Webhook').item.json.body.from.id }}"
  },
  "conversation": {
    "id": "{{ $('Webhook').item.json.body.conversation.id }}"
  },
  "text": "Hello from raia."
}
04

Create the Custom Teams App

A Teams app package requires three files zipped together:

  1. 01

    outline.png — 32×32 pixels exactly.

  2. 02

    color.png — 192×192 pixels exactly.

  3. 03

    manifest.json — Teams app manifest (see example below).

Zip all three files into app-package.zip.

Download app-package.zip
05

Example manifest.json

json
{
  "$schema": "https://developer.microsoft.com/json-schemas/teams/v1.17/MicrosoftTeams.schema.json",
  "manifestVersion": "1.17",
  "version": "1.0.0",
  "id": "886dfe00-189b-4b39-a9a7-94b5c518c769",
  "developer": {
    "name": "RAIA AI",
    "websiteUrl": "https://raiaai.com",
    "privacyUrl": "https://www.raiaai.com/raia-privacy-policy",
    "termsOfUseUrl": "https://www.raiaai.com/raia-terms-of-services"
  },
  "name": {
    "short": "RAIA Agent",
    "full": "RAIA Teams Agent"
  },
  "description": {
    "short": "Your AI-powered assistant for Teams.",
    "full": "RAIA is an intelligent bot that helps your team with various tasks and provides quick access to information."
  },
  "icons": {
    "outline": "outline.png",
    "color": "color.png"
  },
  "accentColor": "#FFFFFF",
  "bots": [
    {
      "botId": "886dfe00-189b-4b39-a9a7-94b5c518c769",
      "scopes": ["personal", "team", "groupChat"],
      "supportsFiles": false,
      "isNotificationOnly": false
    }
  ],
  "permissions": [
    "identity",
    "messageTeamMembers"
  ],
  "validDomains": [
    "raia.app.n8n.cloud"
  ]
}

Replace the id and botId with your actual Microsoft App ID, and update validDomains to match your n8n instance domain.

06

Upload the Custom App

1. Enable Microsoft Teams Channel in Azure

  • Open the Azure Portal and navigate to your Azure Bot resource.
  • Go to Settings → Channels and select Microsoft Teams.
  • Accept the Terms of Service.
  • Ensure Cloud Environment is set to Microsoft Teams Commercial.
  • Click Apply and confirm the Teams channel shows a green checkmark.

2. Configure Teams Admin Center

  • Sign in to the Teams Admin Center.
  • Go to Teams apps → Setup policies.
  • Edit the Global (Org-wide default) policy and enable Upload custom apps.
  • Go to Teams apps → Manage apps and enable Let users interact with custom apps in preview.

3. Sideload and Install the Bot

  • Open Microsoft Teams and click Apps.
  • Select Manage your apps → Upload an app → Upload a custom app.
  • Select app-package.zip.
  • Click Add. Optionally install into a Team, Channel, or Group Chat.
07

Test Your Bot in Teams

  • Personal Chat — Send messages like hello or help.
  • Team / Channel — Use @raia-teams-agent help.
  • Group Chat — Add the bot and @mention it.
  • Functionality — Verify all core workflows behave correctly.