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

Community site session details

Session Id : hzVLWdOaHvZBVoY9OodiZG
Power Apps - Microsoft Dataverse
Answered

Folder name in letter body (like file name)

Like (0) ShareShare
ReportReport
Posted on 1 Apr 2020 12:05:26 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.
Categories:
I have the same question (0)
  • Nicolas_P Profile Picture
    19 on 15 Jul 2021 at 12:04:31
    Re: Folder name in letter body (like file name)

    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.

  • v-siky-msft Profile Picture
    on 03 Apr 2020 at 07:42:27
    Re: Folder name in letter body (like file name)

    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 03 Apr 2020 at 07:23:52
    Re: Folder name in letter body (like file name)

    @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. 

     

     

     

     

  • v-siky-msft Profile Picture
    on 03 Apr 2020 at 01:17:35
    Re: Folder name in letter body (like file name)

    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 02 Apr 2020 at 11:55:27
    Re: Folder name in letter body (like file name)

    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"...( 

     

     

  • Verified answer
    v-siky-msft Profile Picture
    on 02 Apr 2020 at 09:29:40
    Re: Folder name in letter body (like file name)

    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

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Featured topics