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 Automate
Suggested Answer

Renaming a file HELP

(1) ShareShare
ReportReport
Posted on by 2

Good Afternoon Everyone! 

 

 

I am having an issue with my Power Automate Flow and am in need of assistance. For some background information as to why I need this. I recently started a new position in my company to where Power Automate is used quite a bit, however, I am extremely new to Power Automate and pretty much anything coding related. The data I am needing to get is located in an SQL server in a different department that I don't have access to, yet, and no clue when I will be granted access to said database. The data my team needs actually gets emailed to our shared outlook mailbox every 30 minutes in the form of an excel workbook. This is where Power Automate comes in. 

 

1) Outlook Operator – When a new email arrives in a shared mailbox (V2) 

 

2) For Each Operator 

  • Outlook Operator - Get Attachment (V2) 

  • Sharepoint Operator - Create File 

 

3) ?? 
 
The flow has worked flawlessly up through the end of the 2nd step, however, when I try to use any operator to rename I can't seem to get it correct and no idea why. 

 

Here is what I am wanting to do: Take the Created File it receives and rename it to the current date, example: 2024-09-03. The reason behind this is because the emails that come in every 30 minutes are named like this "2024-09-03- 1300" and the next one would be "2024-09-03 1330". Having it being renamed to the same filename throughout the day will indeed overwrite the file, but each attachment just adds another 'row' of data so I won't be losing anything. Then when the new data for the next day starts it will create a new file with the new date. 

 

I've looked around and researched but at this point I feel like I am just overlooking whats right in front of me. Any thoughts? 

Categories:
I have the same question (0)
  • Suggested answer
    trice602 Profile Picture
    15,404 Super User 2025 Season 2 on at
    Hi,
     
    That's great that you are already creating the files in step #2.  All you need to do is rename the file at the same time when you are creating it, shown below:
     
    Here you will use an expression formatDateTime(utcNow(), 'yyyy-MM-dd') + the .xlsx file extension.
     
     
    ------------------------------------------------


    If this was helpful, please like and/or mark as a verified answer to help others find this too!


    Always glad to help! 💯💯💯💯💯

    Tom 

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

     

     
  • CU04091319-0 Profile Picture
    2 on at
    @trice602 - Thank you! This was spot on and resolved that absolutely, though I do have another question if you don't mind.

    Is there a new action I can do that will delete files that are older than 8 days? In the sharepoint folder I'd like to keep the current day and the previous 6 days but delete the rest. Is this possible?
  • trice602 Profile Picture
    15,404 Super User 2025 Season 2 on at
    Hi,
     
    Yes there is a way to delete files older than 8 days.  Please mark this one as a verified answer (thanks in advance) and then create a new post for the delete files question and I would be happy to help and others too!
     
    ------------------------------------------------


    If this was helpful, please like and/or mark as a verified answer to help others find this too!


    Always glad to help! 💯💯💯💯💯

    Tom 

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

     

     
  • trice602 Profile Picture
    15,404 Super User 2025 Season 2 on at
    Hey there!
     
    I am following up on this post renaming a file help in this category general discussion from 09/03/2024.  I know the post is a little older, but it is a common question here so wanted to take a moment and follow-up. I see there have been 3 replies and 1 likes and asking if your question has been answered.  If so, please help the community out by completing one or more of the following actions!  Thanks in advance!
     
    Easy as 1-2-3 ‼️💯⭐😎🆒🙏
     
    1) Mark a reply as a verified answer - this is essential, and it helps others with the same general question find this thread. ✅
    2) You can also mark one of more replies as a verified answer.  Please take a moment and give the author credit for volunteering their time. ✌️
    3) Like one or more replies.  Kudos always greatly appreciated! 👍
     
    Pro tip:  if you found your own solution or workaround, feel free to add a reply to your own post and mark it as the solution too!  The goal is to get this thread marked with a verified answer by anyone that finds one or more replies helpful!
     
    Again, thanks in advance for reading and responding, always glad to help!  Tom 💯💯💯💯💯
  • trice602 Profile Picture
    15,404 Super User 2025 Season 2 on at
    If I can help with anything else please let me know or tag me in a future post, I enjoy reading and answering questions.  Always glad to help!  Tom 💯💯💯💯💯

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 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard