Marketo Connector

The Anypoint Connector for Marketo is a closed-source connector which 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:

  • MarketoDB instance with REST support

  • Set of valid credentials, including the required Marketo endpoints, pointing to your instance. For more information check this

  • MuleSoft Enterprise License

For hardware and software requirements please visit this page.

Namespace and Schema

When designing your application in Studio, the act of dragging the connector from the palette onto the Anypoint Studio canvas should automatically populate the XML code with the connector namespace and schema location.

If you are manually coding the Mule application in Studio’s XML editor or other text editor, paste these into the header of your Configuration XML inside the tags.



Schema Location


CRM Integration

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, please use the Test Connectivity button in your global configuration for Marketo connector.


The Marketo connector requires the following:

Application/Service Version

Anypoint Studio


Mule Runtime

EE 3.7.0 and above


JDK 7 and above

Installing and Configuring


To install the Marketo connector:

  1. Open Anypoint Studio and got to Help > Install New Software

  2. Locate the Marketo connector.

  3. Click Next and accept the license agreement.

  4. Restart Studio when prompted.

For more information on how to install a connector click here.

After installing the connector, your studio palette should contain the following. It would be useful at this point to filter your palette to show only message processors relating to the Marketo connector.

Upgrading from an Older Version

  • Uninstall the previous Marketo Connector.

  • Install the latest version of Marketo Connector from the Update site (via Install New Software in the Help menu in Studio).

  • Ensure that the Maven dependencies have been updated correctly from Marketo[v1.2.5] to Marketo[v2.0.0].

  • Update flows that are using Phased Out or Deprecated operations.

    • Remember that marketo:config does NOT support the SOAP fields anymore. Now you only have ClientId, Client Secret and Rest Endpoint url.

Using the Connector

To set up the Global Configuration:

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

  2. Inside the filter textbox enter "Marketo", and select Marketo: Configuration, from the Connector Configuration directory.

  3. When you select the global element of your choice, you are presented with the global element properties to enter.

    1. The Client Id field refers to your launchpoint id.

    2. The Client Secret field should contain the corresponding secret of your LaunchPoint.

    3. The Rest Endpoint Url field should contain the url to your REST WebService.

The following screenshot 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 application to CloudHub or to a Mule ESB server. However, you may hardcode your connection credentials into the Global Element Properties shown below 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 e.g. HTTP.

  • A Transform Message component.

  • A transformer e.g. Object to json.

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

Invoking an Operation

In order to invoke a simple operation (such as the Leads | Create Or Update operation), you can 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 created in the previous section and choosing the operation to invoke.

  3. Now, click on Transform Message. By the agility of Datasense, you are presented with a list of possible lead fields to use, as available to your Marketo instance.

    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" xmlns:json="http://www.mulesoft.org/schema/mule/json" xmlns:dw="http://www.mulesoft.org/schema/mule/ee/dw" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:marketo="http://www.mulesoft.org/schema/mule/marketo" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/marketo http://www.mulesoft.org/schema/mule/marketo/current/mule-marketo.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd
http://www.mulesoft.org/schema/mule/ee/dw http://www.mulesoft.org/schema/mule/ee/dw/current/dw.xsd
http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/current/mule-json.xsd">
    <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"/>

Demo Applications

You can download a fully functional demo application using the Marketo connector from this link.

See Also

  • For additional technical information on the Marketo Connector, please visit our technical reference documentation. You may also want access to MuleSoft’s expert support team, which requires a Mule Enterprise subscription and log into MuleSoft’s Customer Portal.

  • For more information on the Marketo API, please visit the Marketo API documentation page.

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!