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.

 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (1,924)