Dec 29 2017 05:56 AM
Dec 29 2017 05:56 AM
Can anyone give me some quick tips or is it even possible.
Report to a mailbox comes everyday, named the same.
Want to remove the report from the email, save it to a SharePoint Site with a time date.
Simple attempts to concat a text name of the file and a date are not working out real well.
Anyone help a Flow Noob? Please?
Dec 31 2017 12:38 PM
Hi @Rob Bowman,
A quick way to do this would be to go to the appropriate SharePoint document library, and Create a Flow, using the Flow template called "Save my email attachments to a SharePoint document library". This template should automatically create an Apply to Each Attachment loop, with a Create File action inside it. In the Create File, the default filename is the "Name" which comes from that attachment. You can click in that area to append another field to the filename, and select Received Time from the Dynamic Content dialog (you may need to click See More next to the On New Email header in the Dynamic Content dialog, to see more fields available). That should do it - does this help?
Note that this will append the UTC time, which is how O365 stores things. If you want the time stamp to be your local time, you'd need to add some steps (see my screenshot below):
Does this give you what you're after?
Jan 02 2018 07:46 AM
@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. :)
Mar 19 2021 08:25 AM
Mar 22 2021 06:01 PM
Don't forget to add .pdf to the back of the filename if you haven't already done so.
Mar 26 2021 09:05 AM
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:
Desired attachment filenames in SPOL:
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.
Mar 27 2021 09:59 AM - edited Mar 27 2021 10:01 AM
@Justin_Gangl you can do this if you split the attachment name on the .dot. You need several Compose controls as shown below:
Microsoft Power Automate Community Super User.
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.
Mar 28 2021 04:21 AM
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