Replies: 1 comment
-
Yes, proactive messaging is possible — here is howProactive messaging (sending a message to a user without them messaging you first) is a well-supported pattern in the Bot Framework ecosystem and works with the Teams AI Library. Let me walk through each of your questions. 1. Is proactive messaging possible with Python + M365 Agents Toolkit?Yes. There are two paths depending on which SDK layer you are using:
Both approaches let you send a message triggered by an external HTTP call (Postman, Power Automate, a webhook, etc.). 2. Do you need BotBuilder?You already have it. The 3. How it works: the standard approachThe pattern has two parts: Part A — Capture the conversation reference when the user first interacts with your bot: Every incoming activity contains the information your bot needs to reach back out to that user later. You store either a full Part B — Expose an HTTP endpoint that external tools can call to trigger the proactive message: When Postman (or Power Automate, or any webhook) hits this endpoint, your code retrieves the stored reference and sends the message. 4. Code example using Bot Framework SDK (
|
| Resource | Link |
|---|---|
| Send proactive messages (Teams docs) | learn.microsoft.com |
| Bot Framework proactive message how-to | learn.microsoft.com |
| BotBuilder-Samples: 16.proactive-messages (Python) | GitHub |
| Bot conversation sample (Python) | GitHub |
| Graph API: Send message in a chat | learn.microsoft.com |
Hope this helps — feel free to follow up if you run into issues with any of these approaches.
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have built a Teams bot using the Microsoft 365 Agents Toolkit for Python (microsoft-teams-ai) and the bot works correctly for normal conversations.
Now I need to send a proactive message to a Teams user when an external trigger happens (example: Postman request, webhook, or Power Automate call).
My question:
Is it possible to send a proactive message using Python and the M365 Agents Toolkit, triggered externally?
If yes:
What is the correct approach for proactive messaging using the microsoft-teams-ai SDK only?
I’m specifically asking about proactive messages initiated outside the Teams conversation, coming from Postman/Power Automate, and delivered to the user in Teams.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions