cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
hdonato
Advocate I
Advocate I

Get Microsoft Lists Comments using Flow

Hi, Everyone
Would like to know if there's a way to get the comments on a list item using power automate? or a way to notify users when new comment is added?

hdonato_0-1610026594819.png

 

Would greatly appreciate any help.

Thank you.

31 REPLIES 31
ekarim2020
Super User
Super User

Hi @GuyBoswell,

 

Can you remove the value from the Select field and can you build the expression again?

 

1. Try and find the body field first and select it. This way we know for sure that there is no typo in the action name in the expression

 

findbodyfield.png

 

2. Type the ['d']['results'] part yourself in the expression editor.

 

typedresults.png

 

 

Btw, what headers are you using in the Send an HTTP request to SharePoint action?

 

headersinhttpaction.png

Nope!  You get body('Send_an_HTTP_request_to_SharePoint_-_AllComments')?['body']['d'], not outputs('Send... which throws an error

InvalidTemplate. Unable to process template language expressions in action 'Select' inputs at line '1' and column '3371': 'The template language expression 'body('Send_an_HTTP_request_to_SharePoint_-_AllComments')?['body']['d']' cannot be evaluated because property 'd' cannot be selected. Please see https://aka.ms/logicexpressions for usage details.'.

Expiscornovus
Super User
Super User

Hi @GuyBoswell,

 

Strange that it doesn't like the outputs function. If it wants to use the body function instead you could remove the second body from the expression.

 

In that case the expression would be:

body('Send_an_HTTP_request_to_SharePoint_-_AllComments')?['d']['results']

 

InvalidTemplate. Unable to process template language expressions in action 'Select' inputs at line '1' and column '3369': 'The template language expression 'body('Send_an_HTTP_request_to_SharePoint_-_AllComments')?['d']['results']' cannot be evaluated because property 'results' doesn't exist, available properties are 'Comments'. Please see https://aka.ms/logicexpressions for usage details.'.

cardinalNight
Helper I
Helper I

Was this ever resolved? I'm attempting to setup this exact flow myself, but failing miserably 🙂

"One oddity - if a comment includes an @ it returns something like this for the text of the comment,

@mention{0&$125; Have a look at this"
Has anyone else figured out a way around this issue? We use comments often and use them in automated emails, so this was a bummer to run into.... Tried many different things and haven't figured it out.
@Expiscornovus any ideas?

 

 

Expiscornovus
Super User
Super User

Hi @DawggHouse13,

 

Yes, @DamoBird365 has a great post about how to handle the mentions from the comments list. Have a look at this article: https://www.damobird365.com/microsoft-list-add-comment/

 

NL_Kaleido
Frequent Visitor

Hi @Expiscornovus!

 

I would like to copy an item from my list and paste it into a new list (including Attachments and Comments).

 

I followed the procedure and created the GET request as described (ListName: Name of old List; ListItemId: ID of old list item). Now I want to add the comments to the same item in the new list. I created a POST request, but it doesn't seem to work (ArchiveName: New List Name; ID: ID of create Item in new List; Body: body of GET request)....

 

Can you tell me what could be the problem? You can find the flow in the image below.

 

Best,

Nico

 

NL_Kaleido_0-1657188695804.png

 

 

This is a great solution!... I have a little snag though: I am dumping the results of the flow in a rich text field and getting a whole blob instead of simple comments, author, date/time, etc.  Could it be I'm using the wrong dynamic content for my field?Picture1.png

Here's where I got... Was able to extract date/time and text, although still buried in (much less) code... no luck with 'name' (???)...

 

[{"name":null,"text":"@mention{0}  Adding one more","createdDate":"7/12/2022 10:07 PM"},{"name":null,"text":"@mention{0} Testing comments with @mention ","createdDate":"7/12/2022 8:44 PM"},{"name":null,"text":"Testing comments","createdDate":"7/12/2022 8:44 PM"}]

 

And here's the flow screen shot:

 

Picture1.png

sachk1
Helper I
Helper I

Hi, please post the all steps.

thanks

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,618)