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 / Extract information fr...
Power Automate
Unanswered

Extract information from subject line of Gmail

(0) ShareShare
ReportReport
Posted on by 22

I am building a new flow that pulls information from both the subject and body of the email. I have the flow for pulling the information I need from the body, but can't figure out how to extract just the information I need from the subject. 

 

The subject line is:
Typing Test Results for John Doe: additional text here

 

I want to pull only "John Doe" and have it entered into a Spreadsheet. 

 

The information is pulling from a Gmail account. This is currently what my flow looks like:

jsurrette_0-1634845866015.png

 

How would I trim the subject line? 

Categories:
I have the same question (0)
  • VJR Profile Picture
    7,635 on at

    HI @jsurrette 

     

    Out of the below line which part is going to be fixed/constant?

     

    Typing Test Results for John Doe: additional text here

     

    1. Are the wordings "Typing Test Results for" going to be fixed?

    2. Is the colon : after the name always going to be present?

  • jsurrette Profile Picture
    22 on at

    Hello @VJR!

     

    This is an automated email, so everything will be fixed with the exception of the name. It will always say the same thing, which is:

     

    Typing Test Results for _____ ______: additional text here

  • Verified answer
    VJR Profile Picture
    7,635 on at

    Hi @jsurrette 

     

    In that case use a single Compose action.

    VJR_0-1634875011644.png

     

    Below is what is written in the above Inputs using Expression

    replace(first(split(triggerBody()['text'],':')),'Typing Test Results for ','')
     
    The part in blue bold will be your dynamic content for the entire subject line coming from Gmail.
     
    This is the output after running the flow
    VJR_1-1634875149161.png

     

    Ran another time with input as: 
    Typing Test Results for Mr ABC: additional text here
     
    This time it shows output as 
    VJR_2-1634875260640.png

     

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard