Now a days writing logic is very simple, specially using Microsoft Power Automate (formally known as “Microsoft Flow”)
We can write a logic and build simple automation to speed up the process. Here in this post I am going to show the process to build a simple flow to store a specific Email Attachment to SharePoint or One Drive Business.
During my Two Implementation of MSD365 Finance I have received one common request from Client / Users to Get Daily / Specif date’s Bank balance report from system. In D365FO we have one report in Cash & Bank management module called “Bank account balance report”. Using this report we can get exact bank balance as on today, as there is no parameter to inset date to run this report. Due to which Finance team has to generate this report on daily basis and has to store somewhere for future use or validation.
To remove this manual work we have implemented solution that contain Two Step procedure.
- First to run this report on daily basis at the end of the day and send email to specific person using standard functionality of Email from Dynamics 365 Finance.
- Secondly we have created one Simple Microsoft flow to identify new email based on subject of email and store attachment in Specific SharePoint folder with unique name which contain Date and time.
So, Let’s see how it’s work in practical way.
Create Simple Microsoft Flow to Store Attachment on SharePoint Folder
Login to Microsoft Automate and Click on Create Flow:
After that you can either select Trigger point of flow or skip it and add after words.
One you start, you have to follow following stages:
Let’s understand each step in detail.
Step -1 : What should system check on arrival of each new email in a specific Email Folder?
In my example I have created very check list. I wanted to check new email in my inbox folder with attachment and Subject as “Bank Balance Report”.
Step – 2 : What should be the Action?
Here I have Selected Standard connector “SharePoint” and selected action as “Create File”.
Step – 3 : Where you want store? What would be the name and content of File?
In this stage you have to provide path to store file, name of file and content of file.
once you filled all details it will be looked like following form:
As you can see I have selected folder path as “/Document/Testing” to store my report and as I wanted dynamic file name, so I have selected two different part First Receiving Time and Second name of Attachment. it will help me to identify the report of different time.
So as our flow design is completed now it’s time to play in Dynamics 365 Finance.
Run report from Dynamics 365 Finance & Sent Email
Let’s run the report from system and provide appropriate inputs to trigger Microsoft Flow.
Go to Cash and Bank management and run “Bank account balance report”
Now changed destination from Screen to “Email”.
Now insert Email Id with you have created Microsoft Flow and insert Proper Subject and File Format as required.
Here you can provide recurrence of action as you required.
now click on and you will get notification of Action Completion.
Let’s Check the email and outputs.
Check Flow Status:
Now Check your Folder:
As you can see now, Flow run successfully and stored our attachment in specif folder as required.
There is a lot of things that we can do it using Microsoft Automate. We might discuss in future, till then cheers.
I hope you have liked this solution.
Please feel free to connect in case of any help required.