Skip to main content


Calling Actions from Copilot Studio

Sample Code for integrating Azure Bot Framework based Skill bot with Co-Pilot Studio - with support for Proactive Messaging

Posted on by

We have an existing Bot Framework Based bot that can act as a skill bot to other  Bot Framework based Consumer/Parent bots where the end user is on Teams.  The nature of the skill bot is that in response to a message from the user, the bot will generate one or more messages over the next  several minutes.    In other words, it is not a simple request/response type of getWeather bot.   The skill bot is doing some automation, and the every few seconds will send the update of progress or may ask the user to make another choice.  All this works today ( End user on Teams <-> Skill Consumer Bot <-> Our Skill Bot )


Now we wish to have a Co-Pilot Studio Bot  invoke our skill bot.


This is what we have been able to gather so far by watching the incoming messages from Co Pilot Studio parent

1.  The built it co-pilot studio chat widget presents itself with a service url of and channel id of pva-studio . An AAD ID for the end user is made available

2. If we attach a Teams channel to the Co-pilot studio, the incoming user messages resemble more of the tradition scenario presented in the preamble above.   We are able to send proactive messages back to the end user on Teams from our skill bot.

However the same fails for scenario 1 above and 3 below.


3. If we attach a custom web site with an embedded web chat to the co-pilot studio as a channel, the resulting message format changes as well.  Here the messages present themselves with service url of directline but the channelid is now "directline"  We are not able to respond out of box with the existing skill bot at all.   In this case, there is no AAD ID presented for the end user as well.


With that background:


Is there sample code available to extend a skill bot built with the Azure Bot Framework to handle scenarios 1 and 3 ?


For purpose of clarification:
1. We are not trying to send a proactive message from the copilot studio bot to the end user, but from our skill bot  to the end user (via the co pilot studio bot)
2. We are not trying to use the co-pilot studio bot as a skill bot - we are doing the reverse.




  • cloudatica Profile Picture
    cloudatica 42 on at
    Sample Code for integrating Azure Bot Framework based Skill bot with Co-Pilot Studio - with support for Proactive Messaging
    You may want to check out this article
    Also available as a video tutorial
  • HenryJammes Profile Picture
    HenryJammes on at
    Re: Sample Code for integrating Azure Bot Framework based Skill bot with Co-Pilot Studio - with support for Proactive Messaging

    Hi @ESGAUR2023,


    Not sure I fully follow or understand the issue, but using Bot Framework skills in Copilot Studio is documented here: Use Microsoft Bot Framework skills - Microsoft Copilot Studio | Microsoft Learn.


    When deploying to a website or custom app, the channel is Direct Line. When deploying to Teams, it is a different one. That said, I would expect the messages sent by your skill to relayed and available in the Teams channel.


    I guess the skill can only send messages when it's invoked and can't proactively start or send messages if it hasn't been called as part of your Copilot Studio bot logic. In Copilot Studio, proactive messages are sent using that approach, but this is for Teams: Notify bot users in Teams with proactive messages - Microsoft Copilot Studio | Microsoft Learn.


    If the skill was invoked, is there any chance it can retain the conversation id and Direct Line token in order to send events to the Copilot Studio bot? That way it may be able to proactively invoke itself, for e.g. with Event Trigger.

Helpful resources

Quick Links

Exciting News for Copilot Studio Communi…

Get ready to experience a whole new level of engagement with the Copilot Studio…

Celebrating the May Super User of the…

LaurensM is an exceptional contributor to the Power Platform Community…

Check out the Copilot Studio Cookbook…

We are excited to announce our new Copilot Cookbook Gallery in the Community…


WarrenBelz Profile Picture

WarrenBelz 137,998

RandyHayes Profile Picture

RandyHayes 76,308

Pstork1 Profile Picture

Pstork1 63,059


Featured topics