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 / Need help creating a f...
Power Automate
Answered

Need help creating a flow to automate creating a sharepoint folder based off Month/Year in title of file.

(1) ShareShare
ReportReport
Posted on by 15

Hey everyone,

I have currently created a work flow triggered by MS Forms. The form itself is for event booking. A user can use this form to request a specific room to be booked for an event planned for the future. I have automated the responses to be processed as a PDF and uploaded to SharePoint, however, I want to automate the files to be organized in their respective MM/YYYY folder based off the file name and NOT the date the form was submitted. is this possible?

Example:
File created: 2023/12/25-TitleofEvent.pdf
Automate file to move to/create folder: December 2023

I have copied another workflow which can do this based off the date the form was submitted but ideally i want to upload these to the date the event is organized for.

Thanks all!

Categories:
I have the same question (1)
  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @ahmehade 

     

    Please see below

     

    image.png

     

    Above steps are for creating the folder name using the month name and year.

     

    Expression to get month name and year is as follows:

    formatDateTime(first(split(outputs('Compose'),'-')),'MMMM yyyy')

     

    For file upload see below video.

     

    https://www.youtube.com/watch?v=amByVPsgUw8&t=487s

     

    Thanks

  • ahmehade Profile Picture
    15 on at

    Thank you so much!

    The issue i'm running into here is the automation to create the file actually outputs the file name as "yyyy-mm-dd"

    See image for reference.


    Screenshot 2023-06-30 124657.png
  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @ahmehade 

     

    image.png

     

    I can see the file name under the compose action step. What is the compose 2 action step? Could you please explain?

  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    I think I figured out

     

    Initially you said your filename format is  like below.

     

    2023/12/25-TitleofEvent.pdf

     

    Now in your flow run you are using 

     

    2023-12-25-TitleofEvent.pdf

     

    This is going to mess up my expression I have given earlier.

     

    Let me know  which format you are using? You can't use both formats. Need consistent data quality for processing these.

     

    Thanks

  • ahmehade Profile Picture
    15 on at

    Yes you are correct, My apologies.

    I am using the second format you mentioned (2023-12-25-TitleofEvent.pdf)

    Again, thank you so much for the assistance!

  • Verified answer
    abm abm Profile Picture
    32,985 Most Valuable Professional on at

    Hi @ahmehade 

     

    This is what you need for the newer format

     

    image.png

     

    Expression

     

    concat(formatDateTime(substring(outputs('Compose'),0,10),'MMMM'),' ',substring(outputs('Compose'),0,4))
     
    Thanks
  • ahmehade Profile Picture
    15 on at

    Amazing, thank you so much!

    That worked perfectly 🙂

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 873

#2
Valantis Profile Picture

Valantis 813

#3
Haque Profile Picture

Haque 526

Last 30 days Overall leaderboard