web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Active Discussion

Reduce HTML content of emails

(0) ShareShare
ReportReport
Posted on by 2,466

We are experiencing rapid growth of our database storage. The capacity report shows that a majority of storage is consumed by table ActivityPointer. Our analysis of the data in that table shows that the data is mainly in the description field of email activities. On average, one email has a size of about 200 KB. Analysis of a few samples indicates that most of the size is caused by mostly unnecessary html code.

Our plan to mitigate the storage growth is to remove the unnecessary html code and just keep the parts that are actually necessary to display the email in the intended layout. A proof of concept with Tidy HTML shows promising results and should reduce storage needs by about 70%.

Is there a third party solution or product available that does this or something similar? Bonus points if the solution offers archiving of the original email, adds compression for the content of the description field and/or provides telemetry on number of records processed and data reduced/saved.

If no third party solution is available, we plan to implement this ourselves. Current approaches are using an Azure Function that gets triggered by the Azure Service Bus integration of Dataverse or a Power Automate flow. Alternatively, a custom workflow activity could be implemented that does this, thus removing the need for additional Azure components.

Appreciate any thoughts or preferences for one of these approaches.

  • prt33k Profile Picture
    6,907 on at

    Hi,

    Have you checked the activitymimeattachment/attachment table too? Usually the email will have image which are the main reason for increased size and that can be then moved to sharepoint/azure blob.

    There is a third party solution for this : www.mscrm-addons.com/.../AttachmentExtractor

    Custom approach is fine too however you need to consider that once email is received it then goes to 'Closed' state and will not allow direct edit. You might need to switch the status back and forth to get this to work.

    Thanks,

    Prateek

  • Florian Hopfner Profile Picture
    2,466 on at

    Thanks, the closed state is a good hint.

    Yes, the attachement table has a similar size, but since it is counted against file and not database storage, we see no need to reduce its size.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 101 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 72

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans