Marketo Connector - Mule 3

Marketo Connector v2.0.n

Anypoint Connector for Adobe Marketo (Marketo Connector) is a closed-source connector that provides a connection between Mule and Marketo REST APIs, implementing all the supported v1.0 Marketo API endpoints, including powerful DataSense functionality. Marketo Connector is a wrapper connector developed with MuleSoft’s Anypoint Connector DevKit version 3.8.2.

Before You Begin

This document assumes that you are familiar with the Marketo API.

To use this connector you need a:

  • Marketo instance with REST support.

  • Set of valid credentials, including the required Marketo endpoints, pointing to your instance. For more information, see Marketo Developer Documentation.

  • MuleSoft Enterprise License.

Install the Connector

  1. In Anypoint Studio, click the Exchange icon in the Studio taskbar.

  2. Sign in to Exchange with your Anypoint Platform credentials.

  3. From Anypoint Exchange, click Provided by MuleSoft.

  4. Search for the Mule 3 connector and click Install.

Configure the Marketo Connector Global Element

To set up the Global Configuration:

  1. Go to the Global Element tab and click Create.

  2. Inside the filter text box, enter Marketo and select Marketo: Configuration from the Connector Configuration directory.

  3. Enter these Global Element properties:

    1. Client ID: Your LaunchPoint ID.

    2. Client Secret: The corresponding secret for your LaunchPoint.

    3. Rest Endpoint URL: The URL of your REST web service.

The following image shows the Marketo configuration with Spring property placeholders (for more information see Configuring Properties) for the connection field values. This is the recommended approach when you plan to deploy your app to CloudHub or to a Mule runtime server. However, you may hardcode your connection credentials into the Global Element Properties shown here if you are in the development stage and simply want to speed up the process.

marketo global configuration

Before testing or running a project that uses the Marketo connector, start adding the following to your project:

  • Your Marketo credentials and endpoints in a .properties file and load them using the Property Placeholder component.

  • An inbound endpoint into your flow. For example, HTTP.

  • A Transform Message component.

  • A transformer For example, Object to JSON.

Use the Connector

See a full list of operations for any version of the connector Marketo Technical Reference.

Namespace and Schema

When designing your app in Studio, dragging the connector from the Mule Palette view onto the Anypoint Studio canvas automatically populates the XML code with the connector namespace and schema location.

If you are manually coding the Mule app in Studio’s XML editor or another text editor, paste this into the header of your configuration XML, inside the tags:

Namespace: http://www.mulesoft.org/schema/mule/marketo

Schema Location: http://www.mulesoft.org/schema/mule/marketo/current/mule-marketo.xsd

Marketo API Limitations

  • Only static lists are accessible. Smart lists are not accessible via the API.

  • Marketo has a daily request limit. You can check this limit in your Sandbox > Admin > Web Services.

CRM Integration Limitations

Instances that have a native CRM integration enabled will have Company, Opportunity, and Sales Persons APIs disabled by Marketo. So while the operations are available for selection, Marketo’s API would respond with an error specifying they cannot be used. If you’re not sure about their availability in your environment, use the Test Connectivity button in your global configuration for Marketo connector.

To Invoke an Operation

To invoke a simple operation (such as the Leads > Create Or Update operation), follow these steps:

  1. From the palette, drag and drop the Marketo connector into your flow by placing it between the Transform Message and the Object to JSON Transformer.

  2. Configure the connector by selecting the connector configuration you previously created and choosing the operation to invoke.

  3. Click Transform Message. From DataSense, you are presented with a list of possible lead fields to use:

Marketo Connector
%dw 1.0
%output application/java
	company: "ACME",
	billingCity: "Texas",
	website: "123boom.com",
	industry: "Explosives"

The complete example flow is included here for your reference.

complete example flow
<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:metadata="http://www.mulesoft.org/schema/mule/metadata"
    <marketo:config name="Marketo__Configuration" clientId="${clientId}"
    clientSecret="${clientSecret}" restEndpointUrl="${restEndpointUrl}"
    doc:name="Marketo: Configuration"/>
    <http:listener-config name="HTTP_Listener_Configuration"
    host="" port="8081" doc:name="HTTP Listener Configuration"/>

<flow name="Create-Lead-Flow">
        <http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP"/>
        <dw:transform-message doc:name="Transform Message">
            <dw:set-payload><![CDATA[%dw 1.0
%output application/java
	company: "ACME",
	billingCity: "Texas",
	website: "123boom.com",
	industry: "Explosives"
        <marketo:create-or-update-lead config-ref="Marketo__Configuration" doc:name="Create Lead"/>
        <json:object-to-json-transformer doc:name="Object to JSON"/>

Using the Connector in a Mavenized Mule App

If you are coding a Mavenized Mule app, include this XML snippet in your pom.xml file:


Replace x.x.x with the version that corresponds to the connector you are using.

To obtain the most up-to-date pom.xml file information, access the connector in Anypoint Exchange and click Dependency Snippets.

See Also

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub
Submit your feedback!
Share your thoughts to help us build the best documentation experience for you!
Take our latest survey!