Showing results for 
Search instead for 
Did you mean: 
New Member

Questions about variables

I’m typing this in bed, so I am not looking at my chatbot and may not remember the exact names of things. But, we can work through that.

I have a couple questions about variables, both local and global.

Question 1

When my bot starts, it appears, to the user, to be asking a question. “What acronym would you like the definition for?” This is being displayed using the message tool, since, If I use the question tool, the bot will not realize it if a user is trying to type a trigger phrase instead of an acronym. If a user types in a word or phrase that does not fit any of my trigger phrases, the agent will default to the fallback topic. I believe that’s what it’s called.


Now, the word or phrase they typed in is stored in some variable by the system. Something like errorPhrase or errorTriggerPhrase. How can I get that phrase or word and make it a global variable? The only way I have been able to make a global variable like bot.varMyVariable, is to use the question tool, accepting anything they type as the answer, and making that answer a global variable in the question tool. But again, in the question tool, nothing they type gets checked for triggers.

Question 2

How can I pass more than one variable into an action flow?


Question 3

Why can’t action flows see all my global variables?


Last question

At least in my company, there are system variables like bot.userID and bot.userFullName. So you can personalize questions and answers by throwing in their name like the bot knows them.

How can I access these variables from within an action flow without having to make it the one variable I seem to be allowed to pass in when the action flow is started?


Frank Puthuff

Dell Technologies


Hey there @F_DPuthuff ,


I'll answer your questions in order.


Regarding Question 1, that is a more involved customization that we would need more information in order to debug. If possible, screenshots of that initial acronym topic would be greatly appreciated to gain more insight into what exactly is going on that the bot is exhibiting that behavior. 


Regarding Question 2, you can pass any number of variables into a Power Automate flow by adding additional inputs to the Power Virtual Agents node that begins any flow created using the "Create a Flow" action in your PVA topic.

Screenshot 2022-04-13 115102.png

When you save the flow, and then select it from the "Choose an Action" option in PVA, it will automatically create the number of inputs you specified in the flow, and ask you to fill them. 

Screenshot 2022-04-13 115521.png


Regarding Question 3 and your final Question, Power Automate is a separate application from Power Virtual Agents, and therefore the general state of your bot, which is where global variables are stored, is not shared when you run a flow. If you wish for a flow to see one of your global variables, you will need to use the process I mentioned above to add it as one of the required parameters. The same is true for system variables.


Additionally, the above statements are also true in reverse. Power Automate variables you create will not be natively passed back into Power Virtual Agents. To pass back data you receive from a flow, you can add additional outputs as needed in the ending "Return value(s) to Power Virtual Agents" node at the end of your flow.


Hope this clears most things up!


Thank you for using Microsoft Power Platform Communities!

Bryn Baker

Support Engineer

Microsoft Power Platform

If this post helps, then please consider accepting it as the solution to help other members find it more quickly! Have a great day!

Helpful resources

Power Virtual Agents News & Announcements

Power Virtual Agents News & Announcements

Keep up to date with current events and community announcements in the Power Virtual Agents community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Virtual Agents Community Blog

Power Virtual Agents Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (5,139)