Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Capture comments in Sharepoint list as well as send in an email.

(0) ShareShare
ReportReport
Posted on by 4

Hi

 

I have developed a flow which is doing what I want - get response details when a new form is submitted, then creating and item and then I'm using a switch which has 15 cases based on the answer to a particular question in the form. Depending on this answer it gets sent to the appropriate people for a first to respond approval and then it updates the item and then sends a notification email to the responders email. 

 

I've got this to work to the point I'm happy with however I've been asked by other uses to have the approvers comments show in the sharepoint list and include them in the email. Now I know how to set those but where I'm running in to trouble is trying to initialize a string. When I try to add it to a case it tells me that a string has to be at top level. 

 

From my googling I think my problem is I can initialize strings when I have the switch/case? 

 

This link - Capture comments from approver - had an easy solution to what I wanted to do but I couldn't make it work. 

 

I also tried a variation of this one - Approval workflow capturing comments from approvers email - but it would error when it got to the Switch. 

 

Hoping somewhere here might be able to provide alternatives? Thank You!!! 😀

  • tom_riha Profile Picture
    10,127 Most Valuable Professional on at
    Re: Capture comments in Sharepoint list as well as send in an email.

    Hello @lackinglogic ,

    variables can't be initialised inside loops/switches/etc., if you want a variable you must initialise it at a top level, somewhere right after a trigger. Once it's initialised you can use it anywhere in the flow with the 'Set variable' or 'Append to variable' actions.

    And if you're interested in more alternatives to capture and display approval comments you can check also my approach. 🙂 

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

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

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492