web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Issues with text output
Power Automate
Answered

Issues with text output

(0) ShareShare
ReportReport
Posted on by 15

Hello all. Hoping this is a simple thing, but not sure how to resolve. We have an SMS to email relay that changes the HTML to text (using the Html to text (preview)), and the output is correct, but is something like this (Number is fake and the URL is fake):

 

You've received an incoming SMS from John Doe to +185456731597:

Test 10 — ClickSend.com

[https://randomsuperlongurl.com]

 

Basically, I want to trim the output so that it ignores everything before the "+185456731597:" and everything from "— ClickSend.com" after, so that it just gives the output "Test 10" (or whatever that SMS would be).

I am trying to use compose inputs with no luck.

Any help would be greatly appreciated!

Categories:
I have the same question (0)
  • VictorIvanidze Profile Picture
    13,079 on at

    Could you show the HTML output before Html to text (preview) action?

  • kljsdofiuapdf Profile Picture
    15 on at

    Sure! Here it is:

    kljsdofiuapdf_0-1675235943600.png

     

  • kljsdofiuapdf Profile Picture
    15 on at

    Sorry, misunderstood. Here is (part) of the HTML from the body of the ingested email:

    "subject":"Incoming SMS from John Doe","bodyPreview":"You've received an incoming SMS from John Doe to +185456731597:\r\nTest 12\r\n— ClickSend.com","importance":"normal","conversationId":
  • VictorIvanidze Profile Picture
    13,079 on at

    No I mean real HTML text in Body.

  • kljsdofiuapdf Profile Picture
    15 on at

    Sorry, I posted it above once I re-read your post.

  • Verified answer
    v-liwei-msft Profile Picture
    Microsoft Employee on at

    Hi @kljsdofiuapdf 

     

    Please try:

    vliweimsft_1-1675236398994.png

    trim(first(split(last(split(outputs('Html_to_text')?['body'],'+185456731597:')),'— ClickSend.com')))

    vliweimsft_0-1675236384415.png

     

    Best Regards,

    Levi

     

  • VictorIvanidze Profile Picture
    13,079 on at
    split(triggerOutputs()?['Body/Body']?['bodyPreview'],decodeUriComponent('%0D%0A'))[1]
  • kljsdofiuapdf Profile Picture
    15 on at

    Marked answer as solution. Thank you so much for your help, this was driving me crazy!!

  • VictorIvanidze Profile Picture
    13,079 on at

    Note my approach doesn't require "Html To Text" action at all.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 227

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard