cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
StephenM
Level: Powered On

Grab part of outlook subject with Flow Expression

I am building a Flow with Outlook as the trigger - i need to grab the subject and remove part of it. 

 

the email subject will be somehting like "SM Trigger :123" and it will always start with "SM Trigger:". I need to use the bit after (in this case 123) as the file name to save it.

 

any help on how to grab just the bit after the ":" (e.g. 123) would be much appreciated

 

I'm thinking either a last(split(  or replace( but i cant quite figure it out.

 

thanks

Stephen

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Grab part of outlook subject with Flow Expression

Hi @StephenM,

 

Please take the following flow configuration for a reference.


I used actions initialize variable and Set variable in the flow.


The function used in the Compose action is:

split(triggerBody()?['Subject'],':')


The function used in the Set variable action is:

outputs('Compose')?[1]

3.PNG


When a new email with the subject “SM Trigger: test123”arrives, the flow works fine and it returns “test123” after the “:”, please check the following screenshot:

4.PNG

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 REPLIES 2
Community Support Team
Community Support Team

Re: Grab part of outlook subject with Flow Expression

Hi @StephenM,

 

Please take the following flow configuration for a reference.


I used actions initialize variable and Set variable in the flow.


The function used in the Compose action is:

split(triggerBody()?['Subject'],':')


The function used in the Set variable action is:

outputs('Compose')?[1]

3.PNG


When a new email with the subject “SM Trigger: test123”arrives, the flow works fine and it returns “test123” after the “:”, please check the following screenshot:

4.PNG

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jsearcy
Level: Powered On

Re: Grab part of outlook subject with Flow Expression

This answer is most helpful. Thank you! Another question related to this topic: How would you get the first two words in an outlook subject?

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 147 members 3,699 guests
Please welcome our newest community members: