In this blog post, we will explore how to send ClickDimensions emails via Microsoft flow. Because ClickDimensions is native to Dynamics: Customer Engagement, we can utilize the Common Data Service actions and triggers to send ClickDimensions Emails.
To start, ensure your flow is built within a solution! Some triggers and actions are only available within solutions – in our case we’ll be using the Relate Records action later on.
We’ll need to determine what triggers the sending of the email. In later blog posts we’ll explore this in more detail. Once you have determined how you want to trigger the sending of the email, we’ll create that email send record:

We’ll start by filling out some of the required fields on the record:

In this section, it’s important to make the Editor Type Value the same as the Email Template that you intend on using for these sends.
Finally we will need to include the GUID of the template we want to send:

Our next step is to create the relationship between the Contact and the Email send. To do this we will use the Relate Records CDS action. Note: The Relate Records action is only available for Flows built within a Solution!
Once the record is created, we’re going to associate the Contact (or Marketing List/Lead/Account) to the record. This uses the web API. If you’d like the technical explanation for this, you can find it here! If you need detailed information on how this action works, you can read my blog here!

The names of these relationships come directly from the Entity Relationships on the Email Send:

So now, once the Email Send is created, the Relate Record step will connect our Contact to our Email. Our final step is to now send the email. To do this, we will update the Email Send record:

Our main goal here is to set the record to Inactive and Scheduled:

Once that’s done, the ClickDimensions Execute Send will kick in and send your email! Many thanks to Matt Wittemann for his assistance with building this process!
Hi Emma,
why didn’t you use the “Send ClickDimensions Email” entity? It already has the features that you build.
I think I found also a small spelling mistake that makes a big difference in the data model.
“Email Sent” should be “Email Send” in the sentence “First, create a lookup field on the Email Sent to the entity you want to send to.
Best regards,
Ben
LikeLike
Hey Ben! Great question – with that entity, the email would send immediately without giving me the chance to associate who I wanted to associate it with. I needed to create the email, update it with some changes and then send.
LikeLiked by 1 person
Nice! With the recent updates to the “Common Data Service (current environment)” connector, you should be able to skip the part of adding the contact field and using the custom workflow assembly to associate the contact to the Email Send – there is a new “Associate” step available in that CDS connector now: https://docs.microsoft.com/en-us/connectors/commondataserviceforapps/#associate-entities
LikeLiked by 1 person
Yes I saw that but couldn’t get access to it for some reason, I know it has to be built from a solution so I’m working on investigating why that happened!
LikeLike
And now it’s been updated! Thanks for the heads up!
LikeLike
How do I ensure that I’m building the flow within a solution? I thought I was but I still seem to be missing the ‘relate records’ action.
LikeLike
Hi Rich! So sorry this has taken so long, hoping by now you have figured it out! But if you create a solution and add in the flow, you should get access to the relate records action. It is a premium connector to the CDS however!
LikeLike