Tuesday, November 26, 2019

Moving Attachments of Dynamic 365 CRM to Azure Blob - Power Automate


Many Dynamic CRM customers might have experience on high storage cost which is due to continuous upload of attachments in Note sections.

With an advancement in Power Automate one can easily move attachments to Azure Blob and manage them well within Dynamic CRM. In this Blog, I would be explaining the detail approach and concept of how smartly we can manage notes and attachments.

For a compete Demo, please refer to below video.



Before we dive deeper into technical stuff, here are some important fact
  • SharePoint storage cost is very small about $0.20 per GB/Month compared to CRM’s $9.99/GB/Month. So, CRM space is around 50 times costlier than SharePoint space.
  • Azure blob costs about $0.03/GB/month- which is 6.5x less than SharePoint storage cost and 300x less than CRM storage cost.

Azure Blob storage: Massively scalable object storage for unstructured data. Store any type of unstructured data—images, videos, audio, documents and more.


Here are the Technical Steps.

Create custom entity (new_CustomAttachment) for storing migrated data about Notes and Attachments.

Here is a screen shot of a custom entity, all fields are single line of text, except Note description which is Multiple line of text.



Handling Azure Storage
  1. Create a Resource Group – CRM_NotesAndAttachment
  2. Create a Root Folder within a Container – CRM_OrganizationName

For Azure Blob Connection in Power automate, you will require Account Name and Key Please refer here how-to setup Azure Blob Connection here.


MS Flow to move attachment to Azure Blob

Step 1) Select the Triggering Action for When an Annotation (Notes) is created and select Notes as an Entity



Step 2) Add a condition branch to check if Notes have Attachment to it.




Step 3) For True condition, we have three further steps.


Step 3.1) Create Blob


Step 3.2) Create Custom CRM Record for Blob Storage


Step 3.3) Delete annotation record



Thanks.

vipinjaiswal12@gmail.com

1 comment:

SS said...

Hi vipin,

Your post is very helpful.

Is there a way to update the same notes with the blob url

I need to move the attachemnt to blob and update the notes with the blob url.

Thanks,
Sulochana S