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 / I want to return speci...
Power Automate
Answered

I want to return specific data within a subject line into an existing list

(0) ShareShare
ReportReport
Posted on by

Hello -- I've created the beginning of the flow: the email populates into a folder in my inbox, and I've began on the next step. 

This is what I have so far:

 

When a new email arrives

Inbox

To

From

etc..

 

Create Item 

Site: Sharepoint site

List name

List item 1. substring(triggerBody()?['Subject'], 5, 4)

  • which works^ - it returns the value I needed.

List item 2. 

  • I need to return the last element of the subject line but not sure how

 

Example Subject Line:

ABC: Jane D--3F (Frank)

 

I have successfully extracted information from list item 1. with the formula above.

 

What formula would I use to return (Frank) without paranthesis?

 

Categories:
I have the same question (267)
  • ScottShearer Profile Picture
    25,277 Most Valuable Professional on at

    Here is one way to go about this.  I could have collapsed this into one action but I separated it into a number of variables for clarity.

     

    String2.jpg

     

    Formula for Find start of String: 

    add(lastIndexOf(triggerBody()?['Subject'],'('),1)
     
    Formula for Find End of String:
    lastIndexOf(triggerBody()?['Subject'],')')
     
    Formula for String Length:
    sub(variables('EndString'),variables('StartString'))
     
    Formula for Title column:
    substring(triggerBody()?['Subject'],variables('StartString'),variables('StringLen'))
     
    All variables are integers
     
    Please let me know if this solves your issue.
     
    Scott
  • Verified answer
    v-yuazh-msft Profile Picture
    on at

    Hi @ mariexela,

     

    Could you please share a screenshot of the configuration of your flow?

    Do you want to get the "(Frank)" in the subject line "ABC: Jane D--3F (Frank)"?

     

    Please take a try to create a flow as below:

    Capture.PNG

     

    The expression in the Compose as below:

    first(skip(split(triggerBody()?['Subject'],' '),3))
     
    The flow would run successfully as below:
    Capture.PNG

     

     

     

    Regards,
    Alice Zhang

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 398 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 323 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 183 Most Valuable Professional

Last 30 days Overall leaderboard