SOLVED

Add Check In Comment to Automated Email After Status Change

Copper Contributor

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.

workflow 1.PNGworkflow 2.PNGworkflow 3.PNGworkflow 4.PNGworkflow 5.PNG

 

 

 

 

 

6 Replies
best response confirmed by Tracky (Copper Contributor)
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

ganeshsanap_0-1689156881394.png


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.

@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.

 

workflow 6.PNGworkflow 7.PNG

@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.

@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?

 

workflow 8.PNGworkflow 9.PNG

 

 

@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.

@ganeshsanap Got it working! Thank you very much for your help.

1 best response

Accepted Solutions
best response confirmed by Tracky (Copper Contributor)
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

ganeshsanap_0-1689156881394.png


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.

View solution in original post