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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / Pass variable from Bot...
Copilot Studio
Answered

Pass variable from Bot Framework back to PVA

(0) ShareShare
ReportReport
Posted on by

Hello, I've been looking at creating an adaptive card submit form to retrieve info from users in PVA.  The form itself works great except I'm unsure now how I can then use the submitted data. 

 

Once a user submits a form how can I can use that data for example add it to a SharePoint list etc?

Categories:
I have the same question (0)
  • Verified answer
    GP-26092034-0 Profile Picture
    Microsoft Employee on at

    Hi @AzzaB.

    It is possible today to return variables from a Composer dialog, which you can then use within PVA, to do things like call a Flow, for example.

     

    To do this, you need to set the input / output properties on your Composer dialog. In the screenshot below, I have added two output properties (Variable1 and Variable2, both strings).

     

    dialog-interface.png

     

    Once you have configured your output variables, you can assign values to them within Composer. They sit within the dialog result, so to assign a value to Variable1, you would set your value into dialog.result.Variable1 (an example of this is shown below).

     

    set-property.png

     

    Finally, once you publish your Composer dialog back to PVA and add a redirect to it to your canvas, you will see the output variables are now shown and are available to use within PVA.

     

    composer-dialog.png

     

    Right now, you are limited to multiple primitive properties, as opposed to returning objects, which means you might need to do some variable manipulation within Composer.

     

    Does this help with what you are looking to achieve?

  • AzzaB Profile Picture
    on at

    Hi @GaryPrettyMsft ,

     

    I think that is exactly what I'm looking for!  I'm not particularly experienced so I'll have a play around with it, but as you have described sounds perfect.  Thank you very much!

     

    Cheers,

    Azza.

  • Monkeyman Profile Picture
    325 on at

    Hi,

     

    I am trying to achieve this same functionality, but I do not get the variable ouputs showing on the topic redirect in PVA.  Any ideas?

  • AzzaB Profile Picture
    on at

    For me the key point was as Gary said, defining the input / output in the dialog interface.  E.g. 

    bot1.png

     

    Then when I did the redirect it shows those 2 outputs and I can use them in the flow

    AzzaB_1-1646403244489.png

    hope that helps!

  • nickprado Profile Picture
    14 on at

    In addition to AzzaB's response, if you added the redirect and then changed the topic, remove it and re-add and it should show the outputs.

  • nickprado Profile Picture
    14 on at

    Gary, do you know of a place that shows this in practice with an Adaptive Card with a Submit button? I am having trouble with getting the value from the Adaptive Card out.

  • kacham Profile Picture
    Microsoft Employee on at

    Hi Gary , I have a trouble getting the dialog.result variables back into PVA Bot while using the Adaptive Card with submit Action. 
    - I have Adaptive card in a child dialog and ensured to add the output variables in the Dialog

    - I have updated the Dialog.result.variable to  value from the current turn 

    - After  publishing in bot framework composer , I can see the variables in PVA Topic

    - But, When I try to use the output variable in a next step and Save - the Save Fails showing that the Bot contains Unknown variable and the output variable of child dialog disappears

    kacham_0-1652174570995.png

    kacham_1-1652174826909.png

    kacham_2-1652174926530.png

    Can you please help to understand the issue here , and suggest anything that Im missing here

     

  • AnkurBhayana Profile Picture
    4 on at

    How can we access the Input variables in Dialog Interface. I am unable to access this via dialg.input.variable

  • hiccup Profile Picture
    153 on at

    Hi there

    Did you ever solve this? I'm having the same issue.

    I want to pass an input variable in and use it within my bot but I don't know how to access it from bot framework composer 😞 

     

    Thanks!

  • kacham Profile Picture
    Microsoft Employee on at

    Hi , 

     

    My requirement was to use Adaptive cards in the PVA flow and ability to capture & transfter the Adaptive card inputs to PVA flow . The latest release of PVA allows us to configure Adaptive cards within the online editor without using Bot Framework composer , you can try this option if your requirement is same.

     

    Else , output variables can be configured in the Bot composer - please check this link  Solved: Re: Pass variable from Bot Framework back to PVA - Power Platform Community (microsoft.com) .

    This option works well if we have single output variable. I havent tried passing multiple output variables.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 171

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 130 Super User 2026 Season 1

#3
chiaraalina Profile Picture

chiaraalina 43 Super User 2026 Season 1

Last 30 days Overall leaderboard