Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
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!

  • ahmehade Profile Picture
    15 on at
    Re: Need help creating a flow to automate creating a sharepoint folder based off Month/Year in title of file.

    Amazing, thank you so much!

    That worked perfectly 🙂

  • Verified answer
    abm abm Profile Picture
    32,464 Most Valuable Professional on at
    Re: Need help creating a flow to automate creating a sharepoint folder based off Month/Year in title of file.

    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
    Re: Need help creating a flow to automate creating a sharepoint folder based off Month/Year in title of file.

    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!

  • abm abm Profile Picture
    32,464 Most Valuable Professional on at
    Re: Need help creating a flow to automate creating a sharepoint folder based off Month/Year in title of file.

    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

  • abm abm Profile Picture
    32,464 Most Valuable Professional on at
    Re: Need help creating a flow to automate creating a sharepoint folder based off Month/Year in title of file.

    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?

  • ahmehade Profile Picture
    15 on at
    Re: Need help creating a flow to automate creating a sharepoint folder based off Month/Year in title of file.

    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,464 Most Valuable Professional on at
    Re: Need help creating a flow to automate creating a sharepoint folder based off Month/Year in title of file.

    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

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow