Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Copilot Studio - General
Answered

Unable to extract a value from Jason from power automate and then pass it to Virtual agent

(0) ShareShare
ReportReport
Posted on by 72

I am new to Power Virtual and was trying to extract a value from Jason and past to output for Power Virtual agent but kept getting the error "The output you selected is inside a collection and needs to be looped over to be accessed. This action cannot be inside a foreach.". Tried to create a variable to store value from Jason but still can't get it to work. 

 

Appreciate any guidance to perform this and thank you in advance

 

Tak103_0-1637680074021.png

 

 

Categories:
  • Tak103 Profile Picture
    72 on at
    Re: Unable to extract a value from Jason from power automate and then pass it to Virtual agent

    Thanks Pstork1.

  • Verified answer
    Pstork1 Profile Picture
    66,287 Most Valuable Professional on at
    Re: Unable to extract a value from Jason from power automate and then pass it to Virtual agent

    You can't return an array of data to the Bot from a flow.  You have to format the array as some type of string.  There are ways to create markup to turn the array entries into a Table (as a string).  Then you can return the string and have the Bot display the table.  Here's a screenshot of an example.  varAvailable is an array variable that was Parsed from JSON.  I then created a three column table by looping through the array and appending three values separated by pipe characters into a string.  That string is then returned to the Bot.  The Bot will display it as a table.

    image.png

     

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Copilot Studio - General

#1
Pablo Roldan Profile Picture

Pablo Roldan 27

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 25

#3
stampcoin Profile Picture

stampcoin 10

Overall leaderboard