Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Compose comments

(1) ShareShare
ReportReport
Posted on by

Hello!

I need help with a flow that reads incoming emails and updates the status and comments on a SharePoint list. The status is captured 100%, but the comments are not, and I don't know how to fix the function to make it work 100%.

Here is the flow and the function. The comments are always very similar, like: IPN666666 Call 1 13 March 2024 AP.

When I read the output from "HTML to text," one thing I notice is:

  • If the flow doesn't work, it shows: Comments:\n| IPN666666 Call 1 13 March 2024 AP|
  • If it does work, it shows: |\nComments: | IPN666666 Call 1 13 March 2024 AP|

Thank you!

I have tried removing the trim () but it now capture the entire email contents.
 
May be a graphic of floor plan and textMay be an image of textMay be an image of ‎text that says '‎! InvalidTemplate Unable to process template language expressions in action Compose_comments inputs at line יס' and column ניס' 'The template language expression trim/split(splitloutputs(Html_to _text')? ['body] Comments ניזדן ננס(' cannot be evaluated because array index יוי is outside bounds (0, 0) of array, Please see https://ka.ms/logicexprssions for usage details.'.‎'‎
  • shirokun Profile Picture
    on at
    Compose comments
    hello yes! please see below. on the body it looks like it did find the "comment: |"
     
    EXTERNAL SENDER. Does this email look suspicious? Click on Report Message/Phish
    Alert in the top right of your Outlook toolbar. Do not open attachments or click
    on links.

    --------------------------------------------------------------------------------

     

    Hello,


    An update has been made: Rec ID: |1324351| Gender: |F|

    MOB: |3/11/2026| Status: |Completed| Comments:
    |IPN123552 NGIM 22 Jul 2024| ID: |167| Thank you,
     
  • Expiscornovus Profile Picture
    31,844 Most Valuable Professional on at
    Compose comments
    That means it cannot find the 'Comments: |' part in your Body field?
     
    Have you checked the Body field of that output? In the screenshot I only see the statusCode and headers, I don't see a Body field. Can you share that part of the screenshot as well?
  • shirokun Profile Picture
    on at
    Compose comments
    Hi Thank you so much for this. 
    here is the result: 
    and the output
  • Expiscornovus Profile Picture
    31,844 Most Valuable Professional on at
    Compose comments
    Can you try the below expression with a replace function instead?
     
    split(split(replace(outputs('Html_to_text')?['Body'], '\n', ' '), 'Comments: |')[1], '|')[0]
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492