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 / removing text from cer...
Power Automate
Unanswered

removing text from certain point for sharepoint list

(0) ShareShare
ReportReport
Posted on by 93

Hi,

 

I am currently building a flow where i only want to pull certain data into the sharepoint file.

 

currently have the below formula set up

 

When new email arrives

HTML to text (Preview)
Create an item
in the subject box: have the current expression: 

last(split(body('Html_to_text'),'you?:'))
so it is pulling the information from after the question asked but it keeps pulling the rest of the data. 
 
i basically want from after answering the question to not be added to sharepoint list. 
 
the word on all document is 'Copyright'
 
hope that makes sense
 
thanks
 
Ali 
Categories:
I have the same question (0)
  • efialttes Profile Picture
    14,756 on at

    Hi!

    It is difficult to do a suggestion without having an example of the email content, or at least the content after closest to the answer you need to extract (under copyright, if I understood properly).

    It is common to use split() WDL function to grab information, assuming:

    • the text structure remains the same,
    • there are two patterns we can use to delimit the target data to be extracted, one just before and one just after it
    • the pattern just before your target data (''you?:') is present just once on your text

    As an example, let's assume all your emails contain the following structure:

     

    you?: xxx

    Destination: yyy

     

    If you need to extract xxx, I would start experimenting with the following expression:

     

    trim(first(split(last(split(outputs('Compose'),'you?:')),'Destination:')))

     

     

     

    Hope this helps

  • AliciaDG Profile Picture
    93 on at

    HI thanks for your response,

     

    i don't have a compose function. below is the current info i have see image below

     

    the first expression i have is:

    last(split(body('Html_to_text'),'for?:'))
     
    that brings up the answer to the question we are asking. After the question we have the rest of the form which has the copyright jargin. That is the info that we don't want in our sharepoint list.
     
    i tried the flow below - it is still pulling the data from copyright onwards
     
    P report image.JPG

     

  • efialttes Profile Picture
    14,756 on at

    Hi!

    So you need to find a pattern that is always present just after the response you wanna extract, and apply the same approach from the example I shared in previous posts. In such example, the pattern was the text "Destination:"

     

    So the example I shared had the following email body structure

    for?: xxx
    
    Destination: yyy

     

    And the following expression helps you to extract 'xxx':

     

    trim(first(split(last(split(outputs('Compose'),'for?:')),'Destination:')))

     

    Once you find a pattern, it's very easy

    Hope this helps

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 641

#2
Vish WR Profile Picture

Vish WR 640

#3
Haque Profile Picture

Haque 495

Last 30 days Overall leaderboard