Hello,
I need to add comments from multi approvals in my Flow.
This is structured like this :
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!
Solved! Go to Solution.
Hi @Tanguy_Vaucher ,
You could add a condition to check if the comment is null as screenshot below:
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.
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:
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 :
Best regards
Hi @Tanguy_Vaucher ,
You could add a condition to check if the comment is null as screenshot below:
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.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.