cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jeffchapmanjc
Level: Power Up

Save email PDF attachment to the current month-named folder in SharePoint

My department's shared mailbox receives 9 automatically generated emails each day with a single PDF file in each email. These 9 emails and attachments represent 9 different buildings. The email's subject and its PDF attachment are similarly named, according to the building. There are 9 SharePoint folders which these 9 files need to be uploaded to, but within each of these 9 folders are 12 subfolders, one for each month of the year. How can I get Flow to save each of these 9 PDF email attachments to their respective current month's subfolder, and have that continue throughout the year unattended? If necessary, I can rearrange the SharePoint folders so the month folders are after the building name folders rather than before.

 

Thanks for the help! I've scoured this forum and the net looking for this scenario without success. 

3 REPLIES 3
Super User
Super User

Re: Save email PDF attachment to the current month-named folder in SharePoint

Hi,

 

Flow step 'SharePoint Create File' there is a property called 'Folder Path'. Here you need to set the below expression

 

utcNow('MMMM')

 

This is will return the current month name. 

 

If you any further help let me know.

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



Super User
Super User

Re: Save email PDF attachment to the current month-named folder in SharePoint

Hi @jeffchapmanjc 

 

Do you need any futher help in this? 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!



Highlighted
ShortRave
Level: Powered On

Re: Save email PDF attachment to the current month-named folder in SharePoint

@abm I already have a full set of month-named folders I need to funnel these month-named files into each day. They are named as follows, "01 January", "02 February", and so on. So if I were to include your suggestion in the "Folder Path" section, can you say how it would need to be modified? It currently looks like this: 

 

/Shared Documents/2019/11 November/Allenmore Hospital Daily Census Report

 

So I'm thinking your suggestion would look like this (please correct me if not):

 

/Shared Documents/2019/11 utcNow('MMMM')/Allenmore Hospital Daily Census Report

 

I don't mind having to create 12 flows (one per month) for each of the 9 file uploads I need to run this automation on. I just want to ensure it works for the month changeovers. Thanks for help!

Helpful resources

Announcements
firstImage

Better Together Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (10,072)