Looking for PowerObjects? Don’t worry, you’re in the right place! We’ve been part of HCL for several years, and we’ve now taken the final step in our acquisition journey: moving our website to the HCL domain. Nothing else is changing – we are still fanatically focused on Microsoft Business Applications!

PowerObjects Blog 

for Microsoft Business Applications


Using Power Automate to Automatically Move Your Notes Attachments to SharePoint

Post Author: Joe D365 |

If you are like a lot of D365 users, you have probably run into an issue with storage space one time or another. This has been a tricky problem to solve in the past, but with Microsoft’s introduction of Power Automate, users now have the ability to not only move attachments over to SharePoint more easily, but also to automate and customize this process.  

In this post, we’ll not only show you how to use Power Automate to automatically move notes attachments from your D365 environment over to SharePoint, but we will also make the process even easier by providing you with a pre-built flow to import into your org.  

Let’s get started! 

Using Power Automate to automatically move your Notes Attachments to SharePoint  


Create SharePoint site and provide access to all in the organization:

1. Open Office 365 Login | Microsoft Office and Sign in and Navigate to SharePoint.

2. Create Site in SharePoint.


3. Provide Site Name and select Privacy settings to Public - anyone in the organization can access this site and click Next.

4. Click Finish.

5. Open Microsoft 365 Admin Center and click Show all Left Pane.


6. Click on SharePoint.

7. In SharePoint admin center select Sites >Active Sites.

8. Select the site you just created and click on Sharing -> Anyone -> Save.

Once you have set up your SharePoint site and have confirmed you have the proper permissions as described above, you are ready to create your flow. Start by navigating to https://flow.microsoft.com/ and sign up for a trial version of Power Automate (or subscribe).

  • If you would like to start from scratch, you can reference this blog.
  • If you would like to use the pre-configured flow, you can download the zip file here, and then follow the steps listed below:

1. After you log in to Power Automate, make sure you are connected to the correct environment.

2. Then, click on MyFlows from the left navigation pane and then select the Import button.


3. From there, click on Upload > Select the zip file you just downloaded (PowerAutomateNotesAttachmentToSharePoint.zip)

4. Click on Select during import > Create new to establish your SharePoint connection.

5. Click on Create a connection.

6. Select SharePoint as your connection type  .

6. Select option to Connect directly (cloud services) > Create.


 7. You will be prompted to pick an account to authenticate.

From there, you should see the status “Connected.”

8. Navigate back to the page where you imported your package. Select and save your connection.

9. Click on Select during import > Create new to establish your common data service connection.


10. Click on + New connection.

11. Search for and select Common Data Service


 12. Click on Create.

 13. You will be prompted to select an account to authenticate.


From there, you should see the status “Connected.”

14. Navigate back to import package page. Select and save your connection.


15. Make sure option to “create as new” is selected and then click on Import.

16. Once the flow has been successfully imported, navigate back to “my flows,” select the flow just imported and click on Edit.

17. In the “when a record is created” tab, associate the environment field to the correct D365 environment.

18. Click on the next tab Create file and update the SharePoint URL to the correct SharePoint URL (for example, the one you just created in the above steps when you created a new SharePoint Site).

19. Drop down to the next tab “create sharing link for a file or folder.

  • Update SharePoint URL to your SharePoint URL.
  • Update library name to “Documents” by selecting “Documents” from dropdown.
  • Then click on Save to save flow.

20. You will also be able to check your flow in case of any errors and test to ensure it is working as expected.

You can choose to test automatically or via a manual trigger.

If testing via a manual trigger, add a test attachment to a note on any entity:

Once this manual trigger is performed, you will see the flow kick in as the attachment is replaced with a link to the attachment in SharePoint:

Now your Power Automate flow for moving notes attachments to SharePoint is ready! All new notes attachments in your Dynamics 365 system will be automatically moved over to SharePoint.

Advanced features

You can also create some advanced features such as moving only PNG files or moving attachments only from an Accounts entity, for example. You can also choose to keep attachments in a single folder. 

If you would like to implement this advanced feature (or any other advanced features), begin by navigating back to your flow via “My flows.” Select the flow you just created and click on “Edit.”

Example Scenario 1: If you want to move only PNG file types to SharePoint. 

Under ‘When a record is created’ tab, click on ‘Add an action.’ 

2. Search for and select that Condition control. 

3. Set the condition to Mime Type is equal to image/png and move all below actions to the Yes condition (Drag and drop will work).

Then, click on Save to save new condition in flow.

Example Scenario 2: If you want to move attachments only from Accounts Entity 

Add a condition and set Regarding Type is equal toaccounts


Then click on ‘save’ to save new condition to flow.

Example Scenario 3: If you want to keep all attachments of a record in a single folder .

While creating the file, mention Regarding after the Folder Path

Moving existing attachments over to SharePoint

If you were using our deprecated PowerAttachment add-on to move attachments over to SharePoint (see this blog) and have existing attachments that are either Waiting Process or Failed in the PowerAttachment Queue, you can download and use this flow that we have created to help you move your existing attachments stuck in the PowerAttachment queue over to SharePoint. Once you import this flow, the below changes need to be done after importing.

1. Add a connection for each step (Current Environment)

2. In ‘Create File’ step:

  • Update SharePoint URL

3. In ‘Create sharing link’ for a file or folder:

  • Update SharePoint URL
  • Update library name to “Documents” from drop down

Now you know how to import our preconfigured flow to automatically move notes attachments from your Dynamics 365 system to SharePoint! You also have a flow you can import if you are trying to clean up attachments stuck in the deprecated PowerAttachment queue. We hope this helps you to manage your storage space. For our pre-configured flow and instructions on how to move email attachments over to SharePoint see this blog

By Joe D365
Joe D365 is a Microsoft Dynamics 365 superhero who runs on pure Dynamics adrenaline. As the face of PowerObjects, Joe D365’s mission is to reveal innovative ways to use Dynamics 365 and bring the application to more businesses and organizations around the world.

Leave a Reply

Your email address will not be published.

PowerObjects Recommends