Skip to content

sgersz/azureBotTeams

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

azureBotTeams

🤖 Dialogflow CX to Microsoft Teams Bot Integration

🔍 Overview

This project demonstrates how to connect a Google Dialogflow CX agent to Azure Bot Services, and then integrate that bot into Microsoft Teams as a personal assistant that can relay messages into a Teams channel.

This is a rare cross-cloud setup between Google Cloud and Azure, and due to the lack of official documentation, I had to reverse-engineer much of the process through trial, error, and deep debugging.


🛠️ Problem

There was no reliable end-to-end documentation on how to:

  • Route Dialogflow CX responses through Azure Bot Services.
  • Package that bot for use inside Microsoft Teams.
  • Relay conversations into Teams channels with the correct permissions and scopes.

Even Microsoft’s advanced support didn’t have a clear path forward.


✅ Solution Overview

To solve this, I:

  • Connected Dialogflow CX to a GCP-hosted webhook.
  • Registered an Azure Bot to relay those messages.
  • Built a Teams-compatible bot app using the Teams Developer Portal.
  • Published it to Teams for personal chat use and team channel integration.

🧩 Integration Steps

1. Create Your Dialogflow CX Agent

  • Configure intents, flows, and fulfillment in Google Cloud.
  • Enable webhook responses and test within Dialogflow.

2. Expose the Agent via Webhook

  • Deploy a Cloud Function or Cloud Run instance that acts as a proxy.
  • Accept POST requests from Azure and route them to Dialogflow CX.
  • Return CX responses formatted for Microsoft Bot Framework.

3. Register Azure Bot Service

  • Create an Azure Bot resource.
  • Set the messaging endpoint to your GCP webhook.
  • Save your Microsoft App ID and secret for later use.

4. Configure Teams Bot in Developer Portal

This was the most complex part. Here's what worked for me:

🔹 Register a New Teams App

  • Go to Teams Developer Portal and create a new app.
  • Use the same Microsoft App ID from your Azure Bot registration.

🔹 Configure the Bot Identity

  • Add app icons and basic branding.
  • Under App Features, define this app as a Bot.
  • Use the Azure App ID for the bot.
  • Scope the bot to Personal so it can respond 1:1.

🔹 Add Trusted Domains

  • Add domains required for communication:
    • *.botframework.com
    • Your production hosting domain (if needed)

🔹 Validate & Publish

  • Use the built-in validator to check for issues.
  • Publish the app internally to your org.
  • Make sure a Teams admin approves the app and sets proper access.

🚀 Post-Deployment Notes

  • 🔄 Permissions can take several minutes to propagate—be patient.
  • ✅ An admin must approve app permissions or it won’t function.
  • 🧪 Use the “Test in Web Chat” feature under your Azure Bot to validate CX responses before installing in Teams.
  • 🔐 Ensure the app isn’t blocked by org policy.
  • 🔁 Set Teams scopes correctly in the Admin Center to allow channel relays.

🎉 Outcome

  • Users can message the bot in Teams, which relays input to Dialogflow CX.
  • CX generates a response which is returned through Azure Bot to Teams.
  • All queries and responses are captured in a Teams channel for visibility.

📘 Lessons Learned

  • Multi-cloud integration is very real—and very painful without docs.
  • Testing in isolated layers (GCP → Azure → Teams) helped massively.
  • Teams bots require very precise scope

About

Cross-cloud integration: Dialogflow CX → Azure Bot → Microsoft Teams

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published