<dependency>
<groupId>com.mulesoft.connectors</groupId>
<artifactId>mule-marketo-connector</artifactId>
<version>x.x.x</version>
<classifier>mule-plugin</classifier>
</dependency>
Adobe Marketo Connector - Mule 4
Adobe Marketo Connector v3.0
Anypoint Connector for Adobe Marketo (Marketo Connector) is a closed-source connector that provides a connection between the Mule runtime engine (Mule) and Adobe Marketo REST APIs. This connector implements all supported v1.0 Adobe Marketo API endpoints and provides Mule 4 DataWeave functionality.
Release Notes: Marketo Connector Release Notes
Exchange: Marketo Connector
Before You Begin
To use this information, you must be familiar with Adobe Marketo, Mule runtime engine (Mule), Anypoint Connectors, Anypoint Studio, Mule concepts, elements in a Mule flow, and Global Elements.
You need login credentials to test your connection to your target resource.
For software requirements and compatibility information, see the Connector Release Notes.
POM File Information
To use this connector with Maven, use this pom.xml dependency:
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.
Add the Connector to Your Studio Project
Anypoint Studio provides two ways to add the connector to your Studio project: from the Exchange button in the Studio taskbar or from the Mule Palette view.
Add the Connector Using Exchange
-
In Studio, create a Mule project.
-
Click the Exchange icon (X) in the upper-left of the Studio task bar.
-
In Exchange, click Login and supply your Anypoint Platform username and password.
-
In Exchange, search for "marketo".
-
Select the connector and click Add to project.
-
Follow the prompts to install the connector.
To Configure in Studio
-
Drag the connector operation to the Studio Canvas.
-
Click the green plus button to configure the connector
-
A window appears so that you can configure the following fields:
Field | Description |
---|---|
Base Path |
The Marketo base path to start from, for example |
Client Id |
Your Marketo Client ID. |
Client Secret |
Your Marketo Client Secret. |
Host |
Domain where your Marketo instance is hosted. |
Port |
Port of Marketo instance. |
Protocol |
The protocol to use for data transfer such as HTTPS. |
Access Token Url |
The URL used to achieve an authorization token. |
Use Case: XML
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:os="http://www.mulesoft.org/schema/mule/os"
xmlns:ee="http://www.mulesoft.org/schema/mule/ee/core"
xmlns:marketo-rest-api="http://www.mulesoft.org/schema/mule/marketo-rest-api"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core
http://www.mulesoft.org/schema/mule/core/current/mule.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/marketo-rest-api
http://www.mulesoft.org/schema/mule/marketo-rest-api/current/mule-marketo-rest-api.xsd
http://www.mulesoft.org/schema/mule/ee/core
http://www.mulesoft.org/schema/mule/ee/core/current/mule-ee.xsd
http://www.mulesoft.org/schema/mule/os
http://www.mulesoft.org/schema/mule/os/current/mule-os.xsd">
<configuration-properties file="mule-app.properties"
doc:name="Configuration properties"/>
<http:listener-config name="HTTP_Listener_config"
doc:name="HTTP Listener config">
<http:listener-connection host="localhost" port="8081" />
</http:listener-config>
<marketo-rest-api:config name="Marketo_Rest_API_Config" doc:name="Marketo Rest API Config" property_basePath="/"
property_clientId="${clientId}"
property_clientSecret="${clientSecret}"
property_host="${host}"
property_accessTokenUrl="${accessTokenUrl}"
property_port="${port}"
property_protocol="${protocol}"/>
<os:object-store name="Object_store" doc:name="Object store" config-ref="ObjectStore_Config"/>
<os:config name="ObjectStore_Config" doc:name="ObjectStore Config" />
<flow name="Create_Form" >
<http:listener doc:name="HTTP" config-ref="HTTP_Listener_config" path="/createForm" />
<ee:transform doc:name="Transform Message">
<ee:message >
<ee:set-payload ><![CDATA[%dw 2.0
output application/json
---
{
"description": "FormDemo",
"folder":"22498",
"name": "MarketoDemoForm_01"
}]]></ee:set-payload>
</ee:message>
</ee:transform>
<marketo-rest-api:create-form doc:name="Create form" config-ref="Marketo_Rest_API_Config"/>
<ee:transform doc:name="Object to JSON">
<ee:message >
<ee:set-payload ><![CDATA[%dw 2.0
output application/json
---
payload]]></ee:set-payload>
</ee:message>
</ee:transform>
<os:store doc:name="Store form id" key="formId" objectStore="Object_store">
<os:value ><![CDATA[#[payload.result[0].id]]]></os:value>
</os:store>
<set-variable
value="#[payload.result[0].id]"
doc:name="Set Variable"
variableName="id"/>
<set-variable
value="#[payload.result[0].name]"
doc:name="Set Variable"
variableName="name" />
<logger level="INFO" doc:name="Logger"
message="Created form named: #[vars.name] with id: #[vars.id]" />
</flow>
</mule>