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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Need help creating a f...
Power Automate
Unanswered

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,865 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.


  • abm abm Profile Picture
    32,865 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,865 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,865 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

Forum hierarchy changes are complete!

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

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard