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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Users online (2,652)