Jul 11 2023 08:29 AM
I have a PowerAutomate workflow to send an automated email when the Status of a Library item changes. I want it to include the latest check in comment. Currently the comment appears in the email, but it looks like HTML is showing - it includes {"value":"(the check in comment)"}. Is there a way to modify this so it just shows the comment and now the brackets or quote marks?
Here's what I have so far. I'm on Microsoft 365.
Jul 12 2023 03:15 AM
Solution@Tracky You have to use the value from outputs of HTTP request to SharePoint action instead of body. Then it should work for you.
You can also use the expression for such requirements like:
body('Send_an_HTTP_request_to_SharePoint')?['value']
Example:
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Jul 12 2023 05:59 AM
@ganeshsanap Thank you for your reply. I was able to add the Body expression in the Compose field.
Just to clarify, what should I include in the Apply to each field? Is it Outputs? Do I also include Outputs to get the comment to appear in the automated email? Screenshots below.
Jul 12 2023 06:31 AM
@Tracky Do don't need to use Apply to each action for your requirements (It was a part of my flow, you can ignore it).
Add expression given in my above response to compose action (you can adjust the action name as per your flow action name if required) and then directly use compose action outputs in the send an email action.
OR If you don't want to use compose action, you can also add the expression using dynamic content in send an email action directly.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Jul 12 2023 01:00 PM
@ganeshsanap Unfortunately it's still not working. I'm currently not receiving emails at all. Screenshots below -
Does the syntax in Send an HTTP request appear correct? Do I need to enter something in the Body field under Send an HTTP request to SharePoint?
Jul 13 2023 03:32 AM
@Tracky I think you are missing "/" before CheckInComment in Uri.
Try using Uri like:
_api/Web/GetFileByServerRelativeUrl('<fileURL>')/CheckInComment
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
Jul 13 2023 05:21 AM
@ganeshsanap Got it working! Thank you very much for your help.
Jul 12 2023 03:15 AM
Solution@Tracky You have to use the value from outputs of HTTP request to SharePoint action instead of body. Then it should work for you.
You can also use the expression for such requirements like:
body('Send_an_HTTP_request_to_SharePoint')?['value']
Example:
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.