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 / Download Attachment to...
Power Automate
Unanswered

Download Attachment to one drive and Rename CSV file

(1) ShareShare
ReportReport
Posted on by 2

Hi, Can Someone help my out how do I download a file to OneDrive and rename it to "CPLF" which will replace existing file.

 

teja_f3_0-1690113525870.png

teja_f3_1-1690113535038.png

 

 

1.jpg
2.jpg
Categories:
I have the same question (0)
  • trice602 Profile Picture
    16,164 Super User 2026 Season 1 on at

    Hi @teja_f3 ,

     

    Here's a flow to review.  Please mark as a solution and give me a thumbs up (I'm collecting badges and kudos).  Always glad to help! Tom

     

    trice602_0-1690139146338.png

     

  • trice602 Profile Picture
    16,164 Super User 2026 Season 1 on at

    One note here, in case you don't know:  when you add the action 'Get attachments' and select the "MessageID" from the trigger, your 'Get attachments' will automatically get wrapped inside the apply_to_each.  Always glad to help! Tom 👍🏽👍🏽👍🏽👍🏽👍🏽

  • trice602 Profile Picture
    16,164 Super User 2026 Season 1 on at

    trice602_1-1690139343436.png

     

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

    Hi @teja_f3 

     

    You flow mappings looks ok to me except couple of things

     

    1. You can directly declare the value under the create file action and it will overwrite the existing file. You don't have to use initialise variable but nothing wrong in that too.

     

    2. Its about your IF condition. Remember the comparisons are case sensitive. So if you looking to get only .CSV files then better to convert to one case either small or capital using the expression ToUpper() or ToLower(). Also in my condition I used the operator as ends with. Here is my condition.

     

    image.png

     

    If you flow is not working then I believe your attachment is something like test.csv and you are checking CSV (capital) which won't evaluate it correctly. I am not sure about you have three conditions and one is left to blank as well.

     

    Above the expression I used is

     

    toLower(outputs('Get_Attachment_(V2)')?['body/name'])
     
    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

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
Valantis Profile Picture

Valantis 711

#2
Vish WR Profile Picture

Vish WR 691

#3
Haque Profile Picture

Haque 525

Last 30 days Overall leaderboard