Forum Discussion
Concat "Todays Date" for File Name - Save Attachment - Help
Sandy Ussia Really wish I would have checked back on this! I spent my Saturday afternoon coming up with something similar. Did not know about the "Convert Time Zone" function! That looks like a handy one! I ended up using the "Name" and "Date Received" in the create file function.
Thank you for responding though. As usual I learned a few things. :)
I have the same requirement. I tried to add the attachments filename+Received Time. But now it seems that the flow shreds the file and the file is no longer a PDF file that can be opened it is an unknown filetype with a filename that did not reflect the expected filename as configured in the create file section in my flow:
- Damien_RosarioMar 23, 2021Silver Contributor
Hi ARadtke
Don't forget to add .pdf to the back of the filename if you haven't already done so.
Cheers
Damien
- Justin_GanglMar 26, 2021Copper Contributor
Hi Damien_Rosario ,
I'm having the same issue with my attachment filename. I have 2 files with the same name coming into a mailbox as attachments, one is a .pdf and the other is a .xlsx. I want to remove the files from the email, and save them to a SharePoint library with today's date/time added to the filename.
Current attachment filenames:
attachmentname.pdf
attachmentname.xlsx
Desired attachment filenames in SPOL:
attachmentname_03-26-2021-2-10-PM.pdf
attachmentname_03-26-2021-2-10-PM.xlsx
In my Create File action, in the File Name field, I've tried using 'Attachments Name'_'Received Time' dynamic content dialogue.
That appends the date after the file extension, attachmentname.pdf_03-26-2021-2-10-PM, giving an unknown filetype.
If I add .pdf in the File Name,
then I get a usable filename, attachmentname.pdf_03-26-2021-2-10-PM.pdf, but it obviously changes my xlsx file to a pdf extension as well.
Any thoughts on how to accomplish this? Appreciate any help you can provide.
- Damien_RosarioMar 28, 2021Silver Contributor
Hi Justin_Gangl
Rob's solution covers a solution pretty well in the order you want to see it in.
Alternatively, you could put the received date at the front of the name followed by the file name. This way the extension will always work and will require no additional actions.
Cheers and best wishes
Damien