cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lshneier
Helper I
Helper I

how to extract part of a subject of an email

Hi,

 

I'm trying to automatically upload some monthly emails that I get copied into archive folders in SharePoint. I have already set up the outlook rules to move the appropriate emails to a subfolder that would only have these emails and, set the trigger to point to when a file is arrives in this folder. 

 

My issue is I want to load the emails into the folder appropriate for the subject, the relevant month and if it is a first email or a reminder. Whilst for first emails I could set up a simple rule to define the month follow up emails will normally be sent at the start of the next month so wouldn't sit in this rule. The best way I can think of is to extract the month from the subject line of the email.

 

The issue with this is the subject length will vary depending on if it is a first or follow-up and who the main recipient is supposed to be. If the email subject was in excel I'd just use a mix of search and mid to split the text down into just the portion of the text that has the month detail. However, I have no idea what the equivalent for power automate would be.

 

so If anyone has any idea how to extract this part of the subject line from an email that would be great. Similarly most of the subjects are based on the same structure with the month being in the financial month format eg "month 3" but a couple will say June instead. so I'd also appreciate any guidance where I could automate the conversation of the month name to its relative financial month.

2 REPLIES 2
VictorIvanidze
Community Champion
Community Champion

It looks like you want to parse a string. What's the problem?

--------------------------------------------------------------------------------------
Contact me if you are interested in custom Power Automate development.

I think the which I have navigated around after month stumbling through google was i had no idea what the equivalent to excels mid and search functions are. As that is how I would normally find text in a variable position and extract out what I wanted.

 

During some googling I eventually stumbled upon the text function connector and have used combinations of find text position and substring actions, to strip out only the key details I want to use in the rest of the flow. Whilst there are more steps than I think are efficient from my excel background the flow seems to work at the moment.

 

I'm currently working on developing the custom lists that will monitor this flow and allow me to send the notification email out to colleagues once the flow has finished processing. The notification will need to fire on every 17th item in the list only to avoid sending updates for every email in the batch distribution.. 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (3,958)