Skip to main content

Notifications

Community site session details

Community site session details

Session Id : LXP9FAdzaVFi+z9EP3eVCX
Power Automate - Building Flows
Answered

Extract comment from approval request

Like (0) ShareShare
ReportReport
Posted on 8 Aug 2023 16:51:19 by

Hello, I am currently creating a flow that has two approvals requests, where the second one uses the comments submitted in the first approval request. My flow works fine if a comment is submitted, but fails if there is no comment as the array variable becomes "null". Is there a way to mitigate this? 

Thank you!

error message:

aniokilam_0-1691513357890.png

 

Flow: 

aniokilam_1-1691513400393.pnganiokilam_2-1691513418372.png

 

  • Community Power Platform Member Profile Picture
    on 08 Aug 2023 at 17:47:59
    Re: Extract comment from approval request

    Thank you, this is exactly what I was looking for!

  • Verified answer
    ManishSolanki Profile Picture
    15,085 Super User 2025 Season 1 on 08 Aug 2023 at 17:10:40
    Re: Extract comment from approval request

    Hi @Anonymous 

     

    Pls check for null value using "Condition" action. If value is not null, then append the comments in the array variable as show below:

    ManishSolanki_0-1691514610406.png

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • rzaneti Profile Picture
    3,998 Super User 2025 Season 1 on 08 Aug 2023 at 17:05:52
    Re: Extract comment from approval request

    Hi @Anonymous ,

     

    Try this expression:  if(empty(variables('response')?['comment']), ''variables('response')?['comment']), replacing the red text for the dynamic content of your comment. 

     

    It will append an empty text to your array when there is no comment in the approval. You can also change the empty for any other "default value" when there is no comment in the approval (for doing that, just change the second argument of the expression). 

     

    Let me know if it works for you or if you need any additional help!

     

    -------------------------------------------------------------------------
    If this is the answer for your question, please mark the post as Solved.
    If this answer helps you in any way, please give it a like.

    http://digitalmill.net/

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

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

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 51

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 39 Super User 2025 Season 1

#3
Chriddle Profile Picture

Chriddle 21 Super User 2025 Season 1

Overall leaderboard
Loading started
Loading complete