Concat "Todays Date" for File Name - Save Attachment - Help

%3CLINGO-SUB%20id%3D%22lingo-sub-140425%22%20slang%3D%22en-US%22%3EConcat%20%22Todays%20Date%22%20for%20File%20Name%20-%20Save%20Attachment%20-%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-140425%22%20slang%3D%22en-US%22%3E%3CP%3EAll%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECan%20anyone%20give%20me%20some%20quick%20tips%20or%20is%20it%20even%20possible.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EScenario%3A%3C%2FP%3E%0A%3CP%3EReport%20to%20a%20mailbox%20comes%20everyday%2C%20named%20the%20same.%3C%2FP%3E%0A%3CP%3EWant%20to%20remove%20the%20report%20from%20the%20email%2C%20save%20it%20to%20a%20SharePoint%20Site%20with%20a%20time%20date.%3C%2FP%3E%0A%3CP%3ESimple%20attempts%20to%20concat%20a%20text%20name%20of%20the%20file%20and%20a%20date%20are%20not%20working%20out%20real%20well.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnyone%20help%20a%20Flow%20Noob%3F%20Please%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-140425%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EMicrosoft%20Flow%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-140905%22%20slang%3D%22en-US%22%3ERe%3A%20Concat%20%22Todays%20Date%22%20for%20File%20Name%20-%20Save%20Attachment%20-%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-140905%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F16657%22%20target%3D%22_blank%22%3E%40Sandy%20Ussia%3C%2FA%3E%20Really%20wish%20I%20would%20have%20checked%20back%20on%20this!%20I%20spent%20my%20Saturday%20afternoon%20coming%20up%20with%20something%20similar.%20Did%20not%20know%20about%20the%20%22Convert%20Time%20Zone%22%20function!%20That%20looks%20like%20a%20handy%20one!%20I%20ended%20up%20using%20the%20%22Name%22%20and%20%22Date%20Received%22%20in%20the%20create%20file%20function.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20responding%20though.%20As%20usual%20I%20learned%20a%20few%20things.%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-140721%22%20slang%3D%22en-US%22%3ERe%3A%20Concat%20%22Todays%20Date%22%20for%20File%20Name%20-%20Save%20Attachment%20-%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-140721%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F92374%22%20target%3D%22_blank%22%3E%40Rob%20Bowman%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EA%20quick%20way%20to%20do%20this%20would%20be%20to%20go%20to%20the%20appropriate%20SharePoint%20document%20library%2C%20and%20Create%20a%20Flow%2C%20using%20the%20Flow%20template%20called%20%22%3CSPAN%3ESave%20my%20email%20attachments%20to%20a%20SharePoint%20document%20library%3C%2FSPAN%3E%22.%20This%20template%20should%20automatically%20create%20an%20Apply%20to%20Each%20Attachment%20loop%2C%20with%20a%20Create%20File%20action%20inside%20it.%20In%20the%20Create%20File%2C%20the%20default%20filename%20is%20the%20%22Name%22%20which%20comes%20from%20that%20attachment.%20You%20can%20click%20in%20that%20area%20to%20append%20another%20field%20to%20the%20filename%2C%20and%20select%20Received%20Time%20from%20the%20Dynamic%20Content%20dialog%20(you%20may%20need%20to%20click%20See%20More%20next%20to%20the%20On%20New%20Email%20header%20in%20the%20Dynamic%20Content%20dialog%2C%20to%20see%20more%20fields%20available).%20That%20should%20do%20it%20-%20does%20this%20help%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENote%20that%20this%20will%20append%20the%20UTC%20time%2C%20which%20is%20how%20O365%20stores%20things.%20If%20you%20want%20the%20time%20stamp%20to%20be%20your%20local%20time%2C%20you'd%20need%20to%20add%20some%20steps%20(see%20my%20screenshot%20below)%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EWithin%20the%20Apply%20to%20Each%20Attachment%20loop%2C%20click%20the%20%2B%20icon%20just%20above%20the%20Create%20File%20action%2C%20and%20find%20the%20action%20called%20Convert%20Time%20Zone%20(it's%20one%20of%20the%20relatively%20new%20Date%20Time%20connector%20actions).%20You'll%20be%20prompted%20for%20a%20Base%20Time%20(select%20the%20Received%20Time%20as%20above)%2C%20Source%20time%20zone%20(which%20is%20UTC)%2C%20and%20Destination%20time%20zone%20(yours)%20and%20format%20(whatever%20you%20want%20from%20the%20list).%3C%2FLI%3E%0A%3CLI%3EI%20found%20that%20the%20result%20of%20the%20Convert%20Time%20Zone%20action%20doesn't%20seem%20to%20be%20available%20to%20add%20to%20the%20file%20name%20in%20the%20Create%20File%20step%2C%20but%20you%20can%20add%20a%20Compose%20action%20just%20after%20Convert%20Time%20Zone%2C%20and%20for%20the%20Input%20select%20Converted%20Time%20from%20the%20Dynamic%20Content%20dialog.%3C%2FLI%3E%0A%3CLI%3EThen%20in%20the%20Create%20File%20filename%2C%20instead%20of%20Received%20Time%2C%20select%20Output%20(from%20the%20Compose%20action)%20to%20append%20to%20Name%20(I%20added%20a%20space%20also%2C%20for%20legibility).%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20638px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F26236iC2F3B455D6EA8B8B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22DateTime%20stamp%20in%20attachment%20filename.png%22%20title%3D%22DateTime%20stamp%20in%20attachment%20filename.png%22%20%2F%3E%3C%2FSPAN%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDoes%20this%20give%20you%20what%20you're%20after%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESandy%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Contributor

All,

 

Can anyone give me some quick tips or is it even possible.

 

Scenario:

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?

2 Replies
Highlighted

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):

  • Within the Apply to Each Attachment loop, click the + icon just above the Create File action, and find the action called Convert Time Zone (it's one of the relatively new Date Time connector actions). You'll be prompted for a Base Time (select the Received Time as above), Source time zone (which is UTC), and Destination time zone (yours) and format (whatever you want from the list).
  • I found that the result of the Convert Time Zone action doesn't seem to be available to add to the file name in the Create File step, but you can add a Compose action just after Convert Time Zone, and for the Input select Converted Time from the Dynamic Content dialog.
  • Then in the Create File filename, instead of Received Time, select Output (from the Compose action) to append to Name (I added a space also, for legibility).

DateTime stamp in attachment filename.png 

 

Does this give you what you're after?

 

Sandy

Highlighted

@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. :)