cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tanguy_Vaucher
Frequent Visitor

Approvals comments in mail body

Hello,

 

I need to add comments from multi approvals in my Flow.

 

This is structured like this :

 

p.1.JPGp.2.JPG

 

I tried to add "Approvals - Comments" in mail body but it create an Apply to each and don't stay in mail body.

 

Anybody have a solution for this ?

 

thanks in advance!

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Tanguy_Vaucher ,

 

You could add a condition to check if the comment is null as screenshot below:

1.png

 

The expression in the Condition of my flow as below:

empty(items('Apply_to_each')?['comments'])

 

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-alzhan-msft
Community Support
Community Support

Hi @Tanguy_Vaucher ,

 

The "Responses comments" dynamic content is an array and it contains the comments from all the approver.

You could refer to screenshot below to create the flow:

1.png

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @v-alzhan-msft ,

 

Thanks for your answer. It works fine when everyone approve, but when one approver leave the comment section empty, the flow fails.

 

I have this error "The execution of template action 'Commentaires_ETEC' failed: the result of the evaluation of 'foreach' expression '@outputs('Décision_ETEC')?['body/responses']' is of type 'Null'. The result must be a valid array."

 

Note that I have 3 differents Approvals in my flow because I need to apply differents conditions for each.

 

Here is my new Flow :

 

1.JPG2.JPG3.JPG4.JPG

 

Best regards

Hi @Tanguy_Vaucher ,

 

You could add a condition to check if the comment is null as screenshot below:

1.png

 

The expression in the Condition of my flow as below:

empty(items('Apply_to_each')?['comments'])

 

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

Top Solution Authors
Users online (2,024)