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 / 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

 

 

Categories:
I have the same question (0)
  • trice602 Profile Picture
    15,402 Super User 2025 Season 2 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
    15,402 Super User 2025 Season 2 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
    15,402 Super User 2025 Season 2 on at

    trice602_1-1690139343436.png

     

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

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard