Custom Connector in MS Flow – Part 2

In the last post, we created a custom connector through Postman collection for Marketo using the API. This article creates a MS Flow and will use that connector to sync the Marketing Campaigns and Marketing Lists to Marketo. 

To create a Flow click here, select the Environment and click on My Flows. 

In this scenario, we will create a Flow that retrieves a Campaign, Marketing List, and all its members and integrates them to the Marketo using a custom connector.  

Create a Flow 

To run the Flow from Campaign Entity in CRM, create a flow with a “When a record is selected” trigger point and add relevant details like the Environment and entity where you want to execute the Flow. If you cannot see this, make sure you are using the Common Date Service connector instead of Common Data Service (Current Environment).

After saving the Flow, you will see your Flow under the flow button on that entity.

If you cannot see this Flow under the relevant entity, make sure you have enabled the MS Flow under the system settings > customizations.  

Settings > Administration > System Settings > Customizations

After this, you can add the required steps to retrieve the Campaigns and their Members to sync them to the Marketo. To sync the records to Marketo, we can use the Actions created in the previous post. 

A complete flow will look like this:

This is how we can synchronize the Campaigns to Marketo. We can configure a flow on a scheduled basis or run manually after creating the campaign. We can also add other different Actions exposed to the Marketo API in the custom connector to enhance the functionality to synchronize the other entities’ records, like contacts or leads.