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 / How to set the "Attach...
Power Automate
Unanswered

How to set the "Attachment name" to be the actual file name when sending an email using Power Automate

(1) ShareShare
ReportReport
Posted on by 29

We have a Power Automate flow that gets the attachment from Microsoft Forms. For the attachment, Flow asks Attachment Name and Attachment Content. We are able to give a name to the Attachment name, and use the "Attachment" object from Forms to be the Attachment Content. However, we prefer the Attachment name to be the actual filename of the attachment, is there a way to do that?

 

20201105164552.png

 

 

Categories:
I have the same question (0)
  • Verified answer
    abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @photonacl 

     

    You need to use Upload Attachments (JSON data). Declare a Parse JSON and generate the schema based on upload attachments data. Using this you should be able to get the filename.

     

    Please see this video which explains how to get the filename and content.

     

    https://www.youtube.com/watch?v=IDW3ikTHu9U

     

    Thanks

  • photonacl Profile Picture
    29 on at

    Thank you, I followed the video and it worked.

     

    Just something to optimize things - Is it possible to somehow have the filename preserved as its original, instead of having "1, 2, 3, 4" appended after them if there are multiple files with the same file name got uploaded? This is trivial but thought it won't hurt to ask just in case you know something quick right on top on your head. But if not, this is perfectly fine.

     

    Thanks,

    Leon

     

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

    Hi @photonacl 

     

    So in Forms can you upload multiple files with same filenames? Could you please explain?

  • photonacl Profile Picture
    29 on at

    Sure I can explain, sorry for the confusion - 

     

    Because when multiple files are uploaded to the same OneDrive folder, over time, there are cases where two or more files may share the exact same file name, I think OneDrive is doing the job of renaming the files by appending indices. This eliminates the duplicated filename issue.

     

    However, when I use Flow to pull the filename to be emailed, the file name may be already renamed with the the index number, instead of the original file name user uploaded.

     

    Hope that makes sense.

     

    Leon

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