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 Apps / Folder name in letter ...
Power Apps
Answered

Folder name in letter body (like file name)

(0) ShareShare
ReportReport
Posted on by 19

Hello community! 

Need your help. 

I create a flow (when i'm upload the new file to Sharepoint - automaticly sending e-mail to user).

In letter bodu i add file name via 

@{triggerBody()?['{FilenameWithExtension}']} 
Also i'm add the 
@{triggerBody()?['{Path}']}\n, but from path i need only the folder name (files location). 
Can you help with this?
 
Regards, Nicholas.
I have the same question (0)
  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Nicolas_P ,

    You just want to get the name of the file's parent folder, right?

    Add a Filter Array action before sending an email as below:

    1. Set From field as below, the split will split the text based on specified delimiter character, and return an array.

    split(triggerBody()?['{Path}'],'/')

    2. Click Edit in Advanced Mode, input:  @equals(empty(Item()),false) to filter out empty item in array.

    3. in the email body, use last(body('Filter_array')) expression to get the file's parent folder name.

    Snipaste_2020-04-02_17-29-03.pngSnipaste_2020-04-02_17-28-46.png

    Sik

     

  • Nicolas_P Profile Picture
    19 on at

    Hello @v-siky-msft !

     

    Many thx for your answer, i'm doing step by step as your instruction, but there are next mistake:

    Please correct to add a valid "Filter_array" link for the original "Send_an_email"...( 

     

     

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Nicolas_P 

     

    Where did the error occur?

    Please post the detailed flow steps and expressions, this helps us to analyze the problem.

    Sik

  • Nicolas_P Profile Picture
    19 on at

    @v-siky-msft hello! 

     

    I'll do all step by step on your advice, really. 

    Maybe some problem on Options "Send_an_email"? 

     

    Regards, Nicolas. 

     

     

     

     

    step_1.png
    error.png
    step_2.png
  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Nicolas_P ,

     

    OK. I got you. The issue is from last(body('Filter_array')) expression in email body.

    You have to replace the 'Filter_array' by the real localized name of 'Filter Array' action

    Snipaste_2020-04-03_15-40-48.png

    Hope this helps.

    Sik

  • Nicolas_P Profile Picture
    19 on at

    Dear Sik! 

     

    Man thx for your help, i'm doing the correct for your instruction and all is working great!

     

    One question - is it possible to make a trigger not for one files added? If i'm add the two or more files with few minutes delays, can the all of filenames and paths be in one letter?

     

    Regards, Nicolas.

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 883

#2
Valantis Profile Picture

Valantis 571

#3
11manish Profile Picture

11manish 477

Last 30 days Overall leaderboard