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

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Automate Sharepoint to...
Power Automate
Answered

Automate Sharepoint to Outlook. Adding extra layer to pick files from different folders monthly

(0) ShareShare
ReportReport
Posted on by 139

Automated flow from Sharepoint to Outlook every week with changing file names already created. I want to add an extra layer where this flow can also pick up changing folders every month. 

 

2023-09-11_09-47-45454545.png

The flow that is already created is as follows:

2023-09-11_09-47-4545454599.png

This community rocks and your help is much appreciated.

Categories:
I have the same question (0)
  • Ahmedz Profile Picture
    139 on at

    trice602

  • trice602 Profile Picture
    15,890 Super User 2026 Season 1 on at

    Hi @Ahmedz ,

     

    Are you saying that when a new email arrives with your CSAT attachment you want to dynamically save it to the appropriate month/year folder and rename it as something else?

     

     

  • Ahmedz Profile Picture
    139 on at

    Thanks for your response. No . So I want the flow to detect the month change and automatically switch to the next month and fetch the file for that week from the new folder and send it to the customer. For example. The code that I have will fetch the file for this month , approximately 4 files but as soon as we move in October then this code will break. So I want to add additional layer so that the code fetches the file from the new folder next month and sends it out. 

  • Verified answer
    trice602 Profile Picture
    15,890 Super User 2026 Season 1 on at

    Hi @Ahmedz ,

     

    Ok, so here's a new compose 3 to make the dynamic folder path, you many need to tweak the hard-coded part

     

    trice602_0-1694555810443.png

     

    The additional compose 3 looks like this:

     

    concat(formatDateTime(outputs('Compose'),'yyyy'),' - ',formatDateTime(outputs('Compose'),'MM'))
     
    And essentially returns 2023 - 09 right now, will return 2023 - 10 next month, etc, etc
     
    If I helped you solve this today, please mark as a solution so others can find the formula for dynamic folder paths too!
     
    trice602_1-1694555885562.png

     

    trice602_2-1694555926293.png

     

     

  • Ahmedz Profile Picture
    139 on at

    Do I need to add the compose 3 outputs anywhere else other than the path you shared ? Like the email or somewhere else ? 

  • Verified answer
    trice602 Profile Picture
    15,890 Super User 2026 Season 1 on at

    No, works as is.

     

     

  • Ahmedz Profile Picture
    139 on at

    Thank you so much! I haven't tried it but I know it will work. I will accept this solution and you are a true champ  🙂

  • trice602 Profile Picture
    15,890 Super User 2026 Season 1 on at

    Thank you for the kinds works; I enjoy volunteering and helping!

     

     

  • Ahmedz Profile Picture
    139 on at

    Hello! So I tried and I am having these issues. Maybe you can direct in where I am going wrong. 

     

    2023-09-11_09-47-45DCD454xx5 4353345347rgrg56455559046460999.png

    2023-09-11_09-47-45DsfCD454xx5 4353345347rgrg56455559046460999.png

     

    2023-09-11_09-47-45DsfCDdfd454xx5 4353345347rgrg56455559046460999.png

     

    2023-09-11_09-47-45DsfC dfcDdfd454xx5 4353345347rgrg56455559046460999.png

  • Ahmedz Profile Picture
    139 on at

    The code I used was this for Compose 3 :

     

    concat(formatDateTime(outputs('Compose'),'yyyy'),' - ',formatDateTime(outputs('Compose'),'MM'))

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 237 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 176 Super User 2026 Season 1

#3
Power Platform 1919 Profile Picture

Power Platform 1919 96 Super User 2026 Season 1

Last 30 days Overall leaderboard