Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
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.
Categories:
  • Nicolas_P Profile Picture
    19 on at
    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 at
    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 at
    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 at
    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 at
    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 at
    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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Microsoft Dataverse

#1
stampcoin Profile Picture

stampcoin 17

#2
mmbr1606 Profile Picture

mmbr1606 15 Super User 2025 Season 1

#3
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

Overall leaderboard

Featured topics