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 / After an email arrives...
Power Automate
Unanswered

After an email arrives, remove specific information from subject and body (I.e a reference number with letters)

(1) ShareShare
ReportReport
Posted on by 5

Hi all.

 

I'm looking forward an email after it's been received but before it's forwarded, remove certain data in this case a reference that starts "ab-" and is followed by 6 numbers.

 

Any ideas on if that's possible? Any help is appreciated.

I have the same question (0)
  • trice602 Profile Picture
    16,294 Super User 2026 Season 1 on at

    Hi @Mbates83 ,

     

    Here's a flow for you to consider implementing!  In this example, I use "Send email (V2)" action because the Forward Email action does not allow for a custom subject but this essentially does the job!

     

    Here's the flow and then I will describe it below.  If this was helpful, please mark as a solution so others can find this answer also!

     

    trice602_0-1696517889252.png

     

    The first action is a compose where I want to build our custom, dynamic subject.  There are a lot of ways to do this and this is just one example.

     

    concat(split(triggerOutputs()?['body/subject'], '-')[0], '#XXXXXX')
     
    What this expression does is takes the original subject (everything before the "-") and concatenates it with "XXXXXX" where the X's replace the case reference number.
     
    trice602_2-1696518113690.png

     

    You can use the Format data by examples feature and add in some sample subject lines and this will build the expression for you too.

     

    trice602_3-1696518212974.png

     

    trice602_4-1696518255416.png

     

    trice602_5-1696518310936.png

     

    As discussed, this does not use the Forward email action because there is no way to modify the subject line.  You could also add the "Fwd: " to your subject line too, if desired by adding that to your concat expression:

     

    concat('Fw: ', split(triggerOutputs()?['body/subject'], '-')[0], '-XXXXXX')

     

    The results:

     

    trice602_6-1696518515378.png

     

     

    Let me know if helps you get started this morning!

     

     

     

     


     

     

  • trice602 Profile Picture
    16,294 Super User 2026 Season 1 on at

    Hi @Mbates83 ,

     

    You would build a similar compose to replace the case reference number in the body of the original email with AB-XXXXXX but need specific examples to write the expression.  But I think this is some good framework to get you started.  Have a great day over there!

     

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Are you doing this in cloud flows or desktop flows? @trice602 's solution works for cloud flows. But you posted the question in the forums for desktop flows.

     

  • Mbates83 Profile Picture
    5 on at

    Thanks both, will test and come back if further help is needed 

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 484

#2
11manish Profile Picture

11manish 282

#3
David_MA Profile Picture

David_MA 280 Super User 2026 Season 1

Last 30 days Overall leaderboard