Sunday, May 29, 2022

Power Automate Flow to Move Email Attachments to SharePoint site

 In this blog, I will cover how email attachments can be moved to the SharePoint site location using power automate flow in D365.

I have already created a common child flow to create a folder on the SharePoint site and move attachments to the SharePoint site location. Child Flow: Click here

This flow will work as a parent flow through which a child flow can be called. I have placed a link above.



Let's begin...

1. When an Email is modified 



Filter row: (directioncode eq false and statuscode eq 4 and _regardingobjectid_value ne null)


2.  Condition to check if regarding type (lookup logical name ) is not null


Regarding(Type) : 



3.  In the yes block add a switch statement to call based on regarding the type 


4. If Incident -> Get a Case by ID


Row ID: 




5. Run a child flow -> Call child flow here and pass all the input values 



Child Flow: Look for the child flow which you created a call it here, in my case -> 
Child Flow to Move Attachments to SharePoint

SharePointFolderName: Pass the folder name you want to give for your SharePoint path: In my case it is a case number.
RelativeURL: incidents (I have given this name in SharePoint document location)
SharePointListOrLibraryName: Case (In SharePoint site this is the folder where i want to create folder and upload attachment)
EntityId: Email Message unique Id 
EntityLogicalName: Pass Regarding(Type)

Child Flow : Click Here

Thank you!

Happy Automating...!

Happy Learning......

No comments:

Post a Comment