cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Aazza
Helper III
Helper III

Approval Comments into Compose action

I have set up a variable so that I can get the comments from an approval and add them into the next approval. I am now trying to get each approvals comments separately instead of all in one variable so i can add them to separate excel columns. I have placed a compose action under the append to string variable but when trying to get the compose action in the dynamic content it doesn't appear as it is in an apply to each. How do I overcome this?

no compose action in dyanmic content.pngappend and compose.pngappend to string approval comments.png

8 REPLIES 8
Pstork1
Dual Super User
Dual Super User

If you manually use the JSON Outputs('Compose') once you exit the loop you will have access to the comments.  But at that point the Compose will be an array of all the entries you made inside the loop.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Hi Pstork,

I have just attempted to manually use the JSON Outputs('Compose') and still unable to access the comments so that i can update each individual column in the excel with each approval comments.

fchopo
Super User
Super User

Hi @Aazza 

I don't understand your problem at all, but in any case... Why don't you try to store the comments inside an Array instead of using a single variable for all the comments?

Regards,

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

With an array can i choose to take multiple comments and use them in Start and Wait for Approval Description and in other cases only take certain comments i.e. Start and Wait for Approval 2's comments only and update a column in excel labelled Approval 2 Comments?

fchopo
Super User
Super User

Just trying to understand your problem... But I can't :S Let's see if other Superusers can help!

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

I've been struggling to explain it myself to be honest, what I am trying to do is run a multi-approval flow that depending on a certain questions answer from Microsoft Form do a different thing. Problem i kept running into was Nesting issues due to a lot of Apply to each actions in my flow from trying to get approvals comments and approves emails into other actions.

Here's a simple example

image.png

If you look at the results of Compose 2 'outputs('Compose') you will see it is an array of each response added to the Compose inside the loop.

image.png

Using JSON we can access individual elements of that array as seen in the output of Compose 3 'outputs('Compose_2')[1]', This is the second element in the array.  So the individual comments can now be used outside of the array.

image.png



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Makes sense, will have a go. From this I should be able to add all the comments from each different approval into  the compose action and take out individual elements to update a column in an excel spreadsheet or take out all of the elements to fill the next approvals description.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate 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 Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (2,218)