# How to Integrate Retool with Autopilot (Ortto)

- Tool: Retool
- Difficulty: Intermediate
- Time required: 25 minutes
- Last updated: April 2026

## TL;DR

Connect Retool to Autopilot (now Ortto) by creating a REST API Resource with Ortto's API base URL and your API key in the Authorization header. Use Ortto's REST API to build a marketing automation dashboard — manage contacts, visualize journey performance, view audience segments, and track activity metrics from a centralized Retool operations panel for your customer journey automation workflows.

## Build a Marketing Journey and Contact Management Dashboard in Retool

Ortto (formerly Autopilot) is designed around the concept of visual customer journeys — automated multi-step workflows that move contacts through targeted communication sequences based on their behavior, attributes, and engagement. While Ortto's builder is excellent for designing journeys, operations teams often need a faster way to perform administrative tasks: looking up individual contact status in journeys, bulk-managing audience segments, checking journey performance metrics, or triggering specific contacts into journeys based on external data — tasks that are repetitive and slow through Ortto's standard UI.

Connecting Ortto to Retool solves this operational friction. Your marketing operations team gets a custom panel where they can search contacts by email or attribute, see which journeys each contact is currently enrolled in, view segment membership and counts, check email delivery and click rates across active journeys, and add or update contact data that feeds into Ortto's personalization engine — all without navigating through Ortto's visual builder interface.

Ortto's REST API uses simple API key authentication via the Authorization header. The API provides access to contacts (create, read, update, delete), activities (track custom events for contacts), journeys (list and view analytics), and audiences (segment management). Retool's server-side proxy keeps your API key secure, and the combination of Retool's query editor and Table components makes it straightforward to build the operational interfaces that Ortto's marketing-focused UI doesn't prioritize.

## Before you start

- An Ortto account (formerly Autopilot) with API access enabled — generate an API key from Settings → API in the Ortto dashboard
- Your Ortto API key stored as a configuration variable in Retool
- A Retool account with permission to create Resources
- Familiarity with Retool's query editor, Table component, and JavaScript transformers
- Basic understanding of Ortto's core concepts: contacts, journeys, audiences, and activities

## Step-by-step guide

### 1. Generate an Ortto API key and create the Retool resource

Log into your Ortto account and navigate to Settings → API. Click 'Create API Key' and give it a descriptive name such as 'Retool Integration'. Copy the generated key — Ortto only shows it once, so store it immediately.

In Retool, go to Settings → Configuration Variables. Create a variable named ORTTO_API_KEY, paste the API key as its value, and mark it as Secret. This keeps the key out of query configurations and accessible only to Retool's server-side processes.

Next, navigate to the Resources tab and click Add Resource. Select REST API from the list. Name the resource 'Ortto API'.

In the Base URL field, enter https://api.ap3api.com/v1. This is Ortto's REST API base URL. If your Ortto account is on a specific regional deployment, verify the correct API base URL in Ortto's developer documentation for your region.

In the Authentication section, select Bearer Token. In the Token field, reference the configuration variable: {{ retoolContext.configVars.ORTTO_API_KEY }}.

Add a default header: key = Content-Type, value = application/json. Click Save Changes. Test the connection by creating a simple GET query to /contacts?limit=5 — a successful response confirming your first few contacts validates that the resource is properly configured.

**Expected result:** The Ortto API resource is saved with Bearer token authentication. A test query to /contacts?limit=5 returns your first contacts, confirming the connection is working with proper API key authentication.

### 2. Query Ortto contacts and build the search panel

Create queries to search and retrieve contact data from Ortto. In your Retool app, open the Code panel and add a new query. Name it searchContacts and select the Ortto API resource.

Set Method to POST and Path to /contacts/get. Ortto's contact search uses a POST body rather than query parameters to allow complex filter expressions. Set Body Type to JSON and enter the search payload:

For simple email lookup, include a fields_mapping parameter specifying which contact attributes to return, and a filter expression matching the email field. For broader search, use Ortto's filter syntax with text_search or attribute conditions.

Create a second query named getContactById that takes a contact ID from a selected table row and calls GET /contacts/{{ table_contacts.selectedRow.id }} to retrieve the full contact profile with all attributes and custom fields.

Create a third query named getContactJourneys that calls GET /contacts/{{ table_contacts.selectedRow.id }}/journeys to list all journey enrollments for the selected contact, including current status and step information.

Add a Text Input component named textInput_email for email search, a Table component named table_contacts bound to searchContacts results, and a detail panel that shows getContactById and getContactJourneys data when a contact row is selected.

```
// JSON body for Ortto contacts POST search
{
  "limit": 50,
  "offset": 0,
  "sort_by_field_id": "str::email",
  "sort_order": "asc",
  "fields": [
    "str::email",
    "str::first",
    "str::last",
    "str::phone",
    "bol::gdpr",
    "dtz::created-at"
  ],
  "filter": {
    "op": "and",
    "filters": [
      {
        "field_id": "str::email",
        "type": "text_search",
        "text_search_value": "{{ textInput_email.value }}",
        "text_search_type": "contains"
      }
    ]
  }
}
```

**Expected result:** The contact search panel returns matching contacts from Ortto. Selecting a contact row loads their full profile and journey enrollment history in the detail panel below the table.

### 3. Build journey list and analytics queries

Create queries to list all active journeys and retrieve their performance metrics. Create a query named getJourneys. Set Method to GET and Path to /journeys. Add URL parameters:
- key = limit, value = 100
- key = status, value = active

This returns a list of all active Ortto journeys with their IDs, names, status, and creation dates.

For journey-level metrics, create a query named getJourneyStats. Set Method to GET and Path to /journeys/{{ table_journeys.selectedRow.id }}/stats. This returns aggregate performance data for the selected journey including total enrolled, active, completed, and exited contact counts.

For step-level analytics (showing where contacts drop off in the journey), create a query named getJourneyStepStats with Path /journeys/{{ table_journeys.selectedRow.id }}/steps. This returns an ordered list of journey steps with contact counts at each step, enabling funnel visualization.

Bind the getJourneys results to a Table component named table_journeys. Configure an event handler on row selection to trigger getJourneyStats and getJourneyStepStats.

Add a Chart component for funnel visualization. Set the chart type to Bar and bind it to the step stats data: x-axis = step name, y-axis = contact count at that step. This shows the journey funnel with drop-off rates visible at each step.

Add Stat components showing the top-level journey metrics: enrolled, active, and completed counts from getJourneyStats.

```
// JavaScript transformer — format journey step stats for funnel chart
const steps = (data.steps || []);
return steps.map((step, index) => ({
  step_number: index + 1,
  step_name: step.name || `Step ${index + 1}`,
  step_type: step.type || 'action',
  contacts_entered: step.entered || 0,
  contacts_completed: step.completed || 0,
  contacts_active: step.active || 0,
  completion_rate: step.entered > 0
    ? `${Math.round((step.completed / step.entered) * 100)}%`
    : 'N/A',
  avg_time_hours: step.avg_time_seconds
    ? (step.avg_time_seconds / 3600).toFixed(1) + 'h'
    : 'N/A'
}));
```

**Expected result:** The journey list table shows all active Ortto journeys. Selecting a journey loads aggregate stats (enrolled, active, completed) in stat components and renders a funnel chart showing contact count at each journey step with completion rates.

### 4. Build audience segment queries and management panel

Create queries to list and manage Ortto audience segments. Create a query named getAudiences. Set Method to GET and Path to /audiences. This returns all defined audiences with their IDs, names, filter definitions, and contact counts.

For a specific audience's member list, create a query named getAudienceContacts. Set Method to POST and Path to /contacts/get. Include a filter in the body that references the selected audience ID: { 'audience_id': '{{ table_audiences.selectedRow.id }}' }. This returns all contacts currently in the selected audience.

For audience growth tracking, create a query named getAudienceHistory if Ortto's API supports historical count data. If not, store daily audience count snapshots in Retool Database using a scheduled Workflow and query the historical data from there.

Bind the getAudiences results to a Table component named table_audiences. When a row is selected, trigger getAudienceContacts to populate a second Table showing the audience members.

For bulk contact attribute updates (a common operational task), create a query named updateContactAttributes. Set Method to POST and Path to /contacts. Include an array of contact updates in the body with the contact IDs and attribute values to change. This allows your team to bulk-update marketing consent flags, subscription preferences, or custom segmentation attributes directly from Retool without processing CSV uploads through Ortto's import interface.

For RapidDev integrations, combining Ortto audience data with your CRM or database lets you build enriched segment analysis — showing each audience's contact count from Ortto alongside business metrics like average revenue or product adoption rate from your internal data.

```
// JavaScript transformer — format Ortto audience list for Table component
const audiences = (data.audiences || []);
return audiences.map(audience => ({
  id: audience.id,
  name: audience.name || 'Unnamed',
  contact_count: typeof audience.count === 'number'
    ? audience.count.toLocaleString()
    : 'N/A',
  status: audience.status || 'active',
  filter_type: audience.filter_type || 'dynamic',
  created_at: audience.created_at
    ? new Date(audience.created_at).toLocaleDateString()
    : 'N/A',
  updated_at: audience.updated_at
    ? new Date(audience.updated_at).toLocaleDateString()
    : 'N/A',
  description: audience.description || ''
}));
```

**Expected result:** The audience management panel shows all Ortto segments with contact counts and filter types. Selecting an audience populates a contact list table with the current segment members. Bulk attribute updates run via Retool and refresh the audience counts on completion.

## Best practices

- Store your Ortto API key as a Secret configuration variable in Retool — never paste it directly into query Authorization headers, as configuration variables restrict visibility to server-side processes only.
- Use Ortto's field ID naming convention (str::, int::, dtz::, bol:: prefixes) in all API filter expressions — using display field names instead of internal field IDs is the most common cause of empty search results.
- Add timestamp indicators to all journey and audience analytics panels to communicate data freshness — Ortto analytics are aggregated periodically, not in real time, and your team needs to know when data was last computed.
- Combine Ortto contact data with your CRM or order database in the same Retool app to build enriched operational dashboards — showing marketing engagement alongside purchase history or support ticket data provides more actionable context for operations decisions.
- Use Retool Workflows on a daily schedule to snapshot audience contact counts into Retool Database for historical tracking — Ortto's API typically returns current counts only, so building your own historical dataset is necessary for trend analysis.
- Implement confirmation modals before any journey enrollment or attribute update operations — accidentally adding a contact to a journey or changing a consent attribute can trigger automated communications that are difficult to reverse.
- Test all journey modification operations (adding/removing contacts from journeys) in a staging Ortto environment if available, before exposing the controls in your production Retool app — unintended journey triggers send real emails to real customers.

## Use cases

### Build a contact journey status lookup panel

Create a Retool app where your marketing operations team can search for a contact by email, view all their current journey enrollments and statuses, see their attribute values, and manually trigger or exit them from specific journeys. This replaces repetitive searches through Ortto's contact detail pages for operational requests.

Prompt example:

```
Build a contact lookup panel with an email search input that queries Ortto's contacts API, displays the contact's key attributes and custom fields in a details section, shows a list of active journey enrollments with status and current step, and includes buttons to add or remove the contact from specific journeys.
```

### Journey performance analytics dashboard

Build a Retool dashboard showing performance metrics for all active Ortto journeys — total enrolled contacts, conversion rates at each step, email open and click rates, and journey completion percentages. Add Chart components to visualize journey funnel drop-off rates and identify which steps are underperforming.

Prompt example:

```
Create a journey analytics panel that lists all active journeys from Ortto's journey API, displays enrolled count, completion rate, and average time-to-complete for each, and shows a funnel chart visualization for the selected journey's step-by-step conversion rates.
```

### Audience segment management and growth tracking panel

Build a Retool panel that lists all Ortto audience segments with their current contact counts, filters, and last-modified dates. Add a Chart component to visualize segment growth over time for key audience groups, and include controls to export segment member lists or trigger bulk updates to contact attributes based on segment membership.

Prompt example:

```
Create an audience management panel showing all Ortto audiences with contact count, creation date, and filter summary in a Table, a line chart showing 30-day growth for selected audiences, and a detail view that lists the first 100 contacts in a selected audience with their email and key attribute values.
```

## Troubleshooting

### All API queries return 401 Unauthorized despite a correctly entered API key

Cause: The API key may have been regenerated in Ortto (each time you create a new key in Ortto Settings, previous keys are invalidated), or the configuration variable value in Retool contains leading/trailing whitespace from a copy-paste operation.

Solution: Navigate to Ortto Settings → API to verify your current active API key. Regenerate a new key if needed. In Retool, go to Settings → Configuration Variables, click on ORTTO_API_KEY, and carefully update the value — ensure there are no leading or trailing spaces. Also verify the API base URL matches your Ortto account's regional deployment.

### Contact search returns empty results even for a known email address

Cause: Ortto's contact search POST body uses a specific filter syntax where the field_id must use the internal field naming convention (str::email, not 'email'). Using incorrect field IDs in the filter results in no matches even when contacts exist.

Solution: Verify the filter uses the correct Ortto field ID format: 'str::email' for email, 'str::first' for first name, etc. For custom fields, find the exact field ID in Ortto Settings → Data Sources → Fields — the ID shown there is what the API expects. Also ensure the text_search_type is set correctly ('exact' for precise matching, 'contains' for partial matching).

### Journey analytics data shows incorrect or stale contact counts

Cause: Ortto's journey analytics data is aggregated on a schedule rather than computed in real time. Analytics numbers may lag behind actual journey activity by 30 minutes to several hours depending on your Ortto plan and server load.

Solution: Add a timestamp to your analytics dashboard showing when the data was last refreshed, and set user expectations that journey metrics are not real-time. For time-sensitive operational decisions, use the contact search and journey enrollment queries (which return current status) rather than the aggregate analytics endpoints, as contact-level data reflects current state more accurately.

### Bulk contact update query returns partial success with some contacts failing

Cause: Ortto's batch contact update API processes contacts individually and can succeed for some while failing for others in the same request. Contacts may fail due to missing required fields, invalid attribute values, or contacts that have been hard-deleted from Ortto.

Solution: Check the API response for an errors array alongside the success array — Ortto's batch endpoints return separate success and failure lists. Parse both in your JavaScript transformer and display failed contact updates in a separate error Table. For contacts that consistently fail, check their status in Ortto — they may be suppressed, deleted, or have a data integrity issue preventing updates.

## Frequently asked questions

### Is Autopilot the same as Ortto?

Yes. Autopilot rebranded to Ortto in 2022. The platform is the same product with the same customer journey automation capabilities, now operating under the Ortto brand. The API endpoints and documentation are available at ortto.com. If you see references to 'Autopilot' in older integrations, the underlying API patterns and concepts are identical to the current Ortto API.

### Does Ortto have a native connector in Retool?

No, Ortto does not have a native connector in Retool as of 2026. You connect it using Retool's generic REST API Resource type with Bearer token authentication using your Ortto API key. This means you need to know the specific endpoint paths and request body structures for each API operation you want to use.

### Can I trigger contacts into Ortto journeys from Retool?

Yes, Ortto's API allows you to add contacts to specific journeys programmatically. Use a POST request to Ortto's journey enrollment endpoint with the contact ID and journey ID. This enables your team to trigger journey enrollment from Retool operations panels — for example, enrolling a customer into an onboarding journey when a deal closes in your CRM, triggered by a button click in your Retool CRM dashboard.

### How do I track custom events for contacts in Ortto from Retool?

Use Ortto's activities API (POST /activities) to send custom events for specific contacts. Include the contact's email or ID, the activity type key (defined in Ortto's activity schema), and any attribute values associated with the activity. This allows your Retool tools to trigger Ortto journeys based on internal business events — such as a support case closure, a successful payment, or a specific product action recorded in your database.

### Can I use Retool to manage Ortto email templates or campaign content?

Ortto's API provides limited access to email template management. You can retrieve journey and email metadata, but direct template content editing is primarily done through Ortto's visual builder rather than the API. For content management use cases, Retool is better suited to the operational layer — contact management, journey analytics, and audience segmentation — rather than creative content authoring which benefits from Ortto's native email designer.

---

Source: https://www.rapidevelopers.com/retool-integrations/autopilot
© RapidDev — https://www.rapidevelopers.com/retool-integrations/autopilot
