Thursday, May 19, 2022

Power Automate Flow to Attach Notes to the SharePoint Location

How to attach a D365 record Notes attachment to the SharePoint Location using Power Automate Flow?

a) This is my Entity notes attachments as shown in the D365 Records Timeline section: - Input (Resource)


b) Below is my SharePoint location, Here, I will attach Entity Notes from Dynamics 365 using Power Automate Flow. Output (Destination)


Whenever a new note is added or modified it will auto attach my notes attachments to the SharePoint.

Let's Begin.....

Follow the below step-by-step process to attach notes to the SharePoint location.

Step 1: Open Power Automate Flow Portal and then Create an Automated flow as shown:





Step 2: Add a trigger action as shown below:-



 Step 3: Add Create File ->

Site Address: Select your SharePoint Sites Location
Folder Path: Select a Folder from the folder icon
File Name: Select a dynamic value from Notes trigger action
File Content: decodeBase64(triggerOutputs()?['body/documentbody'])                     or File Content: base64ToBinary(triggerOutputs()?['body/documentbody'])

Step 4: Create a sharing link for a file or folder

If you want to create a link in notes for the attachments you can use this step else you can ignore and proceed to the next step.

Site Address: SharePoint Site Location
Library Name: Documents
Item Id: @{outputs('Create_file')?['body/ItemId']} 
Link Type: View Only
Link Scope: People in your organisation


 Step 5: Update a row
To Remove Attachments from the Notes activity -> this is also an optional step.

If you don't want to keep the same file in both the places you can add this step or else ignore it.

Row ID: Unique Identifier for notes


Step 6: Save and Test 





Step 7: No Login to Sharepoint site and Verify it in SharePoint Location:



Note:
The above 3 steps are enough to create a notes attachment to the SharePoint location.


Thank you!

Happy PowerAutomating....!!!!



No comments:

Post a Comment