Nav

Marketo Connector

Select

The Anypoint Connector for Marketo is a closed-source connector which provides a connection between the Mule and Marketo REST APIs. This connector implements all supported v1.0 Marketo API endpoints and provides Mule 4 DataWeave functionality.

Prerequisites

This document assumes that you are familiar with Marketo, 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 hardware and software requirements and compatibility information, see the Connector Release Notes.

To use this connector with Maven, view the pom.xml dependency information in the Dependency Snippets in Anypoint Exchange.

What’s New in this Connector

First Mule 4 version.

To Install Connector in Studio

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

  2. Click Login in Anypoint Exchange.

  3. Search for this connector and click Install.

  4. Follow the prompts to install this connector.

When Studio has an update, a message displays in the lower right corner, which you can click to install the update.

To Configure in Studio

  1. Drag and drop the connector to the Studio Canvas.

  2. Click the green plus button to configure the connector

  3. A window appears so that you can configure the following fields:

Studio Configuration options

Field Description

Base Path

The Marketo base path to start from, for example / (forward slash).

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: Create a Program in Studio 7

Studio flow Listener

Use Case: XML


         
      
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?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>

To Connect in Design Center

  1. In Design Center, select a trigger such as the HTTP Listener or Scheduler.

  2. Select the plus sign to add a component.

  3. Select the connector as a component.

  4. Configure these fields:

Design Center REST API Configuration

Field Description

Base Path

The Marketo base path to start from, for example / (forward slash).

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.

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.

+