# Marketo

### Connect to Marketo

1\. Go to the **Resources** page and click the <img src="/files/luUqNwhjG7IZbheUpaBG" alt="" data-size="line">  button.&#x20;

2\. Select **Marketo**.

3\. Enter your account credentials and click **Connect**.&#x20;

{% hint style="info" %}
**Step 1: (Optional) whitelist Acho's IP address**

If you don't have IP Restriction enabled in Marketo, skip this step.

If you have IP Restriction enabled in Marketo, you'll need to whitelist the Acho's service IP address `10.128.15.195`. Whitelist it by following the Marketo documentation for [allowlisting IP addresses](https://docs.marketo.com/display/public/DOCS/Create+an+Allowlist+for+IP-Based+API+Access) for API based access.

**Step 2: Create an API-only Marketo User Role**[**​**](https://docs.airbyte.com/integrations/sources/marketo#step-2-create-an-api-only-marketo-user-role)

Follow the [Marketo documentation for creating an API-only Marketo User Role](https://docs.marketo.com/display/public/DOCS/Create+an+API+Only+User+Role).

**Step 3: Create an Acho Marketo API-only user**[**​**](https://docs.airbyte.com/integrations/sources/marketo#step-3-create-an-airbyte-marketo-api-only-user)

Follow the [Marketo documentation to create an API only user](https://docs.marketo.com/display/public/DOCS/Create+an+API+Only+User)

**Step 4: Create a Marketo API custom service**

Follow the [Marketo documentation for creating a custom service for use with a REST API](https://docs.marketo.com/display/public/DOCS/Create+a+Custom+Service+for+Use+with+ReST+API).

Make sure to follow the "**Credentials for API Access"** section in the Marketo docs to generate a **Client ID** and **Client Secret.** Once generated, copy those credentials and keep them handy for use in the Acho UI later.

**Step 5: Obtain your Endpoint and Identity URLs provided by Marketo**[**​**](https://docs.airbyte.com/integrations/sources/marketo#step-5-obtain-your-endpoint-and-identity-urls-provided-by-marketo)

Follow the [Marketo documentation for obtaining your base URL](https://developers.marketo.com/rest-api/base-url/). Specifically, copy your **Endpoint** without "/rest" and keep them handy for use in the Acho UI.
{% endhint %}

4\. Choose tables to import and click **Finish Setup**.&#x20;

5\. You will see a  <img src="/files/-MgBo4LSmdK4OS-NqLZy" alt="" data-size="line"> icon next to your resource. It may take a few minutes to several hours depending on the data size and the number of your tables. Once your data is ready, you will receive a notification email.&#x20;

### Supported table <a href="#output-schema" id="output-schema"></a>

* **activities\_X** where X is an activity type contains information about lead activities of the type X. For example, activities\_send\_email contains information about lead activities related to the activity type `send_email`. See the [Marketo docs](https://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Activities/getLeadActivitiesUsingGET) for a detailed explanation of what each column means.
* **activity\_types.** Contains metadata about activity types. See the [Marketo docs](https://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Activities/getAllActivityTypesUsingGET) for a detailed explanation of columns.
* **campaigns.** Contains info about your Marketo campaigns. [Marketo docs](https://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Campaigns/getCampaignsUsingGET).
* **leads.** Contains info about your Marketo leads. [Marketo docs](https://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Leads/getLeadByIdUsingGET).
* **lists.** Contains info about your Marketo static lists. [Marketo docs](https://developers.marketo.com/rest-api/endpoint-reference/lead-database-endpoint-reference/#!/Static_Lists/getListByIdUsingGET).
* **programs.** Contins info about your Marketo programs. [Marketo docs](https://developers.marketo.com/rest-api/endpoint-reference/asset-endpoint-reference/#!/Programs/browseProgramsUsingGET).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.acho.io/acho-studio/resources/import-data/marketo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
