I am trying to create a feature in my chatbot where a question is asked and the bot recognises that it is a question, copies the question and posts the question in a Teams channel. I can make the bot post a standard pre-written message but I am wondering if it is possible for the bot to replicate the question it is asked and post it in Teams. If anyone knows if/how then please let me know!
Hi @Anonymous
Yes, that should be possible. Below is an example.
First create the Power Automate flow.
https://docs.microsoft.com/en-us/power-virtual-agents/advanced-flow
1. Add a Power Virtual Agents trigger action. Add a text input, call that Question.
2. Add a Post message in a chat or channel action. Use the Question field in the Message field of the action.
3. Add a Return value(s) to Power Virtual Agents action. Add a Result text output. Set a message which you can use to confirm to the user the message has been posted to the channel.
Power Virtual Agent setup.
1. Create a new topic in a bot. Call it CloneQuestion. Add a trigger phrase like Clone a Question. Save your topic and go to the authoring canvas.
2. Add a Question like 'What is your question?'. Use the user's entire response. Save that response in a variable like VarQuestion.
3. Add a Call Action. Connect it to the flow we created earlier. Make sure you map the VarQuestion to the Question input variable from the flow.
4. Add a Show message. Use the output result variable to show the confirm message to the user.
The result will look something like this.