Skip to main content

Notifications

Copilot Studio - General
Answered

Flow returning a JSON?

Posted on by 71

Afternoon!

 

I am trying to get a JSON back from search_for_user_(v2) to pass to the composer and I am sure out to do that.  I can append to a string with a concat function however I am not sure how to bring it back from a string to json in composer for the foreach?

 

Let me know!

-n

Categories:
  • Verified answer
    nk1ng Profile Picture
    nk1ng 71 on at
    Re: Flow returning a JSON?

    Welp, I finally got it.

    Flow (and set for the 'return' to be global in PVA):

    nk1ng_3-1627562804816.png

     


    Composer (Create Tab; I used json func here for the string return from PVA to go back to an array in composer):

    nk1ng_4-1627563094893.png

     

    Composer (Bot responses tab):

    nk1ng_1-1627562536034.png

    and

    nk1ng_2-1627562595348.png

     

    The only caveat now is the image for the user, which will work in the test bot however when you publish it to teams won't show the image.  Still working on that...

  • nk1ng Profile Picture
    nk1ng 71 on at
    Re: Flow returning a JSON?

    Update:  I think I got the JSON back to the PVA:

    nk1ng_0-1627411100659.png

     

    However the composer has issues?  Won't run the foreach stating it's "not a collection or structure object"?

    nk1ng_1-1627411227664.png

     

    If you look at the logs on the composer:

    nk1ng_2-1627411442125.png

     

    Let me know!

    -n

     

Helpful resources

Quick Links

Welcome to the Power Platform…

We are thrilled to unveil the newly-launched Power Platform Communities!…

Getting Started…

Welcome to the Power Platform Community! We appreciate your visit…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 138,030

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,085

Leaderboard