cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Help with automated flow to pull string from email subject line

Need help getting this flow to work. I'm really close. 

 

Here is the string of text. I need to pull from | to | in bold below. 

 

ENVIR - SEV2 - CUST - INC #12345 | Test String Data Blob | Has been created

 

At first I was using something like this, but found that sometimes the string of data was longer than 60 characters. 

substring(triggerBody()?['Subject'],indexOf(triggerBody()?['Subject'],'|'),60)


So then I switched over to this. I've got it really close, as of right now it is pulling the "Has been created" instead of "Test String Data Blob"
First(split(last(split(triggerbody()?[
'Subject'],'|')),'|'))
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Help with automated flow to pull string from email subject line

hi @Ahansen  try this.

split(triggerbody()?['Subject'], '|')[1]


Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

View solution in original post

5 REPLIES 5
Highlighted
Super User
Super User

Re: Help with automated flow to pull string from email subject line

hi @Ahansen  if you wnat just the secod value you can split it like this

 

split(outputs('Compose'), '|')[1]

 

compose is your entire string.



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
Highlighted
New Member

Re: Help with automated flow to pull string from email subject line

I want the section in bold below

 

ENVIR - SEV2 - CUST - INC #12345 | Test String Data Blob | Has been created


Problem is that, as of right now it is pulling the "Has been created" instead of "Test String Data Blob"
 
I am currently using this:
First(split(last(split(triggerbody()?[
'Subject'],'|')),'|'))
Highlighted
Super User
Super User

Re: Help with automated flow to pull string from email subject line

hi @Ahansen  try this.

split(triggerbody()?['Subject'], '|')[1]


Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

View solution in original post

Highlighted
New Member

Re: Help with automated flow to pull string from email subject line

@ChristianAbata very close! Details below. Its good except for it is including the ending | character. Anyway to filter that out? I could live with it if I have to, but ideally I wanted to just get the text that is in between the two | characters. 

 

Source data:

ENVIR - SEV2 - CUST - INC #12345 | Test String Data Blob | Has been created

Function:

split(triggerbody()?['Subject'], '|')[1]


Result:

Test String Data Blob |

Highlighted
Super User
Super User

Re: Help with automated flow to pull string from email subject line

sure @Ahansen  you can use replace

 

replace(split(triggerbody()?['Subject'], '|')[1],'|','')

 

let me know...

 

 



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Users online (8,573)