web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to create new fold...
Power Automate
Unanswered

How to create new folder based on certain string on outlook header

(0) ShareShare
ReportReport
Posted on by
Hi community, I need your help (I already search about this particular problem, and no one have the same issue as me, so I need your help).
 
So, I tried to create a flow based on trigger action If a new email arrives (V3), with trigger words in my email (e.g Welcome Back). I want to create new folder inside of my SharePoint based on the name inside of subject/header in outlook (e.g., Alan Walker - Welcome Back). I want to create a new folder with Alan Walker and save the attachment file that I received (with Welcome Back trigger words before) inside the Alan Walker folder.
 
Can someone solve this problem? I already tried creating Initialize Variable action but have a hard time extracting the Alan Walker before, so I can create a new folder based on that name.
Screenshot_19-12-2024_122330_make.powerautomate.com.jpeg
Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,755 Most Valuable Professional on at
     
    You could use slice & indexOf functions for this in an expression. With those functions you can find the place of the - character and slice away the part of the string after that character. I also used a trim function just to remove any unwanted space characters.
     
    Try the below expression in your Initialize variable action
     
    trim(slice(triggerOutputs()?['body/subject'], 0, indexOf(triggerOutputs()?['body/subject'],'-')))

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 103 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 87

#3
trice602 Profile Picture

trice602 63 Super User 2026 Season 1

Last 30 days Overall leaderboard