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.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

AI Builder AMA June 7th carousel (up on May 25th, take down June 8th) (1).png

'Ask Microsoft Anything' about AI Builder!

The AI Builder team invite you to ask questions and provide helpful answers at our next AMA.

Top Solution Authors
Users online (1,522)