Blog Post

Using Power Automate to Overcome Organisational Challenges

Here at Tisski, we’re dedicated to finding the right solutions for our clients and it isn’t unheard of for those clients to request that we:

a) integrate Outlook to Dynamics 365, so emails and attachments can be easily related to sales or incident records, providing a clear picture of their customers’ needs; and

b) reduce the storage levels that having a great many number of months’ or even years’ worth of email attachments will generate.

Many clients wish to have the 360-degree view that a good email chain provides but may be more comfortable with the simplicity of SharePoint.

Harnessing Power Automate functionality

The good news is, there are several ways to solve this, for example, by having users remove attachments once the email has been processed or deleting attachments in bulk if they are older than X months or years. For one of our recent clients, we are utilising Power Automate.

At its simplest, we could copy attachments into the standard SharePoint email library and have this shown in the ‘related documents’ section, deleting the attachment; but for this client in particular, there were several very detailed requirements.

Firstly, the SharePoint Case Library had a specific structure: Cases grouped by the year of case creation and using the case ticket number rather than the ID (Case/[Case: Created on Year]/[Case Name]_[Case Number]), and on top of that, each folder had its own series of subfolders relating to various email categories.

Incoming and outgoing emails are categorised according to the particular process they relate to, and the attachments were required to be placed in a specific ‘process’ folder in the related SharePoint folder.

So, in addition to dealing with the out of the ordinary folder structure and the dynamic storage location for email attachments, the client still wanted some reference of the recently removed attachments in the email itself, enabling users to have a crystal-clear view of the conversation.

The end result

We’re pleased to have been able to utilise Power Automate to meet these requirements; upon creation of a case, a template SharePoint folder is copied and named accordingly and the document location record is created with the custom relative URL – or, if a user is fast enough, the default document location is updated.

A scheduled process runs periodically, reviewing all emails with an attachment, processing those that have been categorised, or emails older than five days for those that remain uncategorised.

A child process is called to retrieve the document location record for the regarding objects SharePoint URL, which is appended with the email category, and the attachment is copied into the relative folder on SharePoint. For each attachment, a custom entity record is create and associated to the email, containing the attachment details and a link to the file on SharePoint. This allows the user to open the attachment in a similar manner to the default experience.

This process has been refined as the client’s requirements have evolved and concerns over what to do with signature icons, corrupt files not creating on SharePoint and emails with many attachments causing back logs have all been examined. What’s more, the basic principles contained in a template process can be transplanted between any projects that have this requirement.

Useful Links

Related Updates

Deep Dive into D365: Supply Chain Management


Deep Dive into D365: Supply Chain Management

Read more


A Guide to Microsoft Azure

Read more