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 / Extracting String from...
Power Automate
Unanswered

Extracting String from Email Subject

(0) ShareShare
ReportReport
Posted on by 44

Hi y'all,

 

EDIT:

This was solved! Apparently functions don't work as functions if they are text.

Also if someone is looking at my "indexof#" trying to use it: the formula should actually be 

add(int(indexOf(variables('EmailSubjectString'),'#')),1) you will get an error if you have the ",1" inside the int function!

 

 

ORIGINAL POST:

I am trying to accomplish automating a sales order fulfillment tracker  and I need help parsing out strings from the email subject line to use as my key value. I found a similar post in the community  but the problem with using the "from" is that it always comes from different people so I can't depend on that to be constant.

 

I am trying to use a unique to each request phrase in the subject line to be the key value that will be the "link" between my email chains and a sharepoint Key column. 

 

The key ID will be generated by concatenating from a VBA excel request tool where it populates the request number in the subject line (as well as other more reader friendly text): "REQ# + Date (year / month / day / hours / seconds) + Site Name" so a request made on August 19th 2020 at 9:30.15 for site AbbeyRd would appear in the subject line as "REQ#20200819096015AbbeyRd". I put the "@"  as where they want to pick it up from (also populating from the excel request tool).

 
 

 

I am trying to use indexing to find the # character, find the @ character, and return everything in between the two, as site names do not have a set character count. 

image.png

 

image.png

 

When I ran this one, the output was just one of the functions and not the unique ID. Am I missing something?

 

Thank you in advance! 

 

 

-KL

Categories:
I have the same question (0)
  • Verified answer
    Jcook Profile Picture
    7,781 Most Valuable Professional on at

    Hello @SupplyChainKL 

     

    It looks like you're typing the expression directly as text. Please use the expression editor to add expressions:

    Jcook_0-1597852742365.png

     

  • SupplyChainKL Profile Picture
    44 on at

    Hi @Jcook !

     

    Ok I will try that and reply back. 

     

    Making it as a function seems like a great place to start! 

  • SupplyChainKL Profile Picture
    44 on at

    Yay! Wow that was a pretty easy fix.... Must have been an easy layup for you @Jcook ! Thank you so much! 🙂

     

    image.png

     

    (I just added a "send email" step with the output so I could see if it worked or not with the unique# and it did)

     

     

    Thanks again! 

  • Jcook Profile Picture
    7,781 Most Valuable Professional on at

    @SupplyChainKL

     

    No problem, you're very good with your expressions, you wrote them all with no syntax helper in the expressions tab 👍

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

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard