Tip #1215: Automatically manage folder tracking

Public service announcement: we are back from the Merry Year hiatus and straight to tipping.

Tracking folders is a cool feature where you can configure an Exchange folder to be a tracked folder and optionally link it to a Dynamics 365 record so that any email landing in that folder will be automatically tracked and Regarding will be set to that record.

This is great if I want to follow specific records, for example, a large opportunity.

image

Create a subfolder in the Inbox

SNAGHTMLb783c16

Open Personal Options > Email tab > Configure Folders Tracking Rules

image

So now I would shove any correspondence that may be related into that folder and let the system do the work.

This is all nice and emails are, indeed, tracked. But what happens when the opportunity is closed? Well, nothing. Wouldn’t it be nice if we can “untrack” the folder? If for nothing else then for the 25 tracked folders limit – I want to have some space for the new opportunities (and no, I didn’t win the one above).

Enter Flow. Why not workflow? Because Flow has two distinctive advantages:

  1. It can actually delete records
  2. It can access tracking folders configuration records  – Mailbox Auto Tracking Folders (mailboxtrackingfolders) entity

The flow logic is as following. Just one screenshot, people, as it fits on one screen!

image

  1. Trigger on when opportunity record Updated, filter on statecode. Technically, should add an extra step validating that opportunity has been indeed closed.
  2. Get all mailbox tracking folders where Regarding is equal to that opportunity. Folder tracking is a per-user feature so multiple users can be tracking the same opportunity.
  3. Loop through returned records and nuke them.

Tested and tracked folder is as good as gone!

Wouldn’t it be nice if we could also create tracking folder configuration if certain conditions are met, like opportunity value > $1,000,000? Unfortunately, configuring tracking folder requires knowledge of Exchange folder id and I’m yet to figure out how to find that easily. Drop me a line if you figured that out!

(Cover photo by Omid Kashmari on Unsplash)

3 thoughts on “Tip #1215: Automatically manage folder tracking

  1. Max says:

    Hey man, first of all: thanks for this tip. I wanted to also create something that will automatically create a tracking folder, but it seems not possible. I get the following error: “The dynamic schema response from API ‘commondataserviceforapps’ operation ‘GetMetadataForPostEntity’ is too large, only schemas with at most ‘1024’ properties are supported.” When using the ‘Add a new row’ action in Power Automate. Seems that you can not write to a table that has more than 1024 different ‘items’ you can write to. Pretty mad to see that Microsoft has added so many standard tables, it breaks their own product.

    • “automatically create a tracking folder” – how are you doing that? Power Automate action? When saving flow or when running? A bit more information would help to figure out what’s going on. The error feels like a phatom one.

      • Max says:

        Have you read my full reply? “When using the ‘Add a new row’ action in Power Automate.”

        But because my description was still somewhat vague, i’ll explain it in more detail:
        I’m literally getting this error when saving the flow, because the operation ‘GetMetadataForPostEntity’ can only handle 1024 columns, i suppose. And because the table Mailbox Auto Tracking Folders is programmed to be able to track *any* type of entity (table), and there are more than 1024 tables in Dataverse, the operation ‘GetMetadataForPostEntity’ cannot be performed and the flow gives an error when trying to save it.

        The only thing that works is deleting the auto tracking ability, like the OP showed

Leave a Reply

Your email address will not be published. Required fields are marked *