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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Delete string content ...
Power Automate
Unanswered

Delete string content from specific word to other specific word

(0) ShareShare
ReportReport
Posted on by

Hi, I'm building a flow which receives a json, in the json there is a property I need to show in a report but the property content is kinda unreadable

Example:

Hello Team,\n\n \n\nPlease assign the ticket to the IT support team.\n\n \n\nThanks,\n\*****\n\n \n\nFrom: *****V S\nSent: Wednesday, March 8, 2023 11:41 AM\nTo: *****V <*****@*****.com>; *****S E <*****@v*****.com>\nCc: ***** *****<*****@*****.com>; ***** *****\n<*****@*****.com>\nSubject: RE: IN10 - VAN - Unable to make payment via h2h\n\n \n\nHi Sid,\n\n \n\nI have requested the concerned team to discuss this with SAP and provide an\nupdate. Kindly note the timeline for these kind of requests are relatively high


I would like to know if there is a way to delete the string content between "From:" to "Subject:"
And have this as a result

Hello Team,\n\n \n\nPlease assign the ticket to the IT support team.\n\n \n\nThanks,\n\*****\n\n \n\nRE: IN10 - VAN - Unable to make payment via h2h\n\n \n\nHi Sid,\n\n \n\nI have requested the concerned team to discuss this with SAP and provide an\nupdate. Kindly note the timeline for these kind of requests are relatively high



JosueViq_0-1686071400684.png

 




Categories:
I have the same question (0)
  • v-wenjuan-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Here's my demo:

    vwenjuanmsft_1-1686132583240.png

     

    indexOf(outputs('Compose'),'From:')
    take(outputs('Compose'),outputs('Compose_2'))
    add(indexOf(outputs('Compose'),'Subject:'),8)
    slice(outputs('Compose'),outputs('Compose_4'))
    concat(outputs('Compose_3'),outputs('Compose_5'))

     

     

    Here's result:
    vwenjuanmsft_0-1686132495110.png

     

    Community Support Team _ Wenjuan Zou

    If this post helps, then please consider Accept it as the solution to help the other members find it.

     

  • Community Power Platform Member Profile Picture
    on at

    Hi, thanks for the response

    Is there another alternative in case that those string doesn't exist (from:, to:, cc:, subject:).
    Sometimes the text will look like this 

    Hi Team, Please check we are getting error while posting. attached screenshot for reference.

    And the indexOf() function is going to return a -1, that will make the take() function fail

  • v-wenjuan-msft Profile Picture
    Microsoft Employee on at

    Then you have to find a word which will absolutely show up as a flag, so that you can locate to the content you want and don't want.

     

    Community Support Team _ Wenjuan Zou

    If this post helps, then please consider Accept it as the solution to help the other members find it.

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard