web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Cannot Publish bot bec...
Copilot Studio
Unanswered

Cannot Publish bot because of an error but chatbot works perfectly fine

(1) ShareShare
ReportReport
Posted on by 28

Hello,

 

I have built a chatbot which has set of question to get input from user and based on those input it runs a flow through power automate to create an item into SharePoint list. I tested chatbot and it works fine but when I try to publish chatbot, below error is throwing: 

variable is being set to incorrect type Assigned embedded optionset expected embedded optionset.

Sharmilshah_0-1705058667025.png


In above snapshot step, bot stores the variable into global variable which is being used by Power automate flow from a different topic. In power automate flow, I converted this choice to text variable. Anyone please help me how to fix this error and get the bot published?

 

Thanks

I have the same question (0)
  • remidyon Profile Picture
    on at

    Hi @Sharmilshah 

    Could you share the YAML of your topic (by opening the code editor and copy-pasting the YAML?). I am unable to reproduce this issue: I have no problem assigning a choice variable to another choice variable (even using a closed list entity)

  • Sharmilshah Profile Picture
    28 on at

    Thank you @remidyon  for looking into this. I have 2 YAML where in 1 it works but in other it doesn't. I tried to copy paste the code here but it doesn't show when I refresh the page. So attaching as word document. First code works but second code in another topic throws an error.

  • Sharmilshah Profile Picture
    28 on at

    @remidyon Did you get a chance to look into the issue and YAML code I sent in earlier message?

  • remidyon Profile Picture
    on at

    @Sharmilshah sorry I have not had the time to look at your issue - I will try to give you a feedback asap

  • Verified answer
    remidyon Profile Picture
    on at

    Hello @Sharmilshah 

     

    I was able to replicate your issue: when you create the multiple-choice option in your question as an open list of string it creates a type of choice in the back with a particular list of values, this type of choice is then transmitted to your global variable when you set it later in your first topic. When you create your second topic and try to assign another type of choice to the same global variable the editor refuses because the list of choice does not match (the 2 list contains different options).

     

    The solution is quite simple: you need to create an entity (type closed list) with all the potential options from your topics and only use the options you need in each topic (you can select the options in your question). Once you do that the type of choice will be common to all your topics and you will be able to assign the Global variable without an issue (I tested it on my side and it works fine).

     

    Closed list Entity:

    remidyon_1-1705673799521.png

     

    Topic 1 with 2 choices

    remidyon_0-1705673770883.png

     

    Topic 2 with 2 different choices (but still from the same entity):

    remidyon_2-1705673833635.png

     

    No problem to assign to the global variable since it is now the same type of choice

    remidyon_3-1705673859960.png

     

    Hope that helps!

     

  • Sharmilshah Profile Picture
    28 on at

    Thanks @remidyon for looking into this and helping me to get the solution. Issue is resolved.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 255 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 205 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 101 Moderator

Last 30 days Overall leaderboard