# How to Integrate Retool with Tableau

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

## TL;DR

Connect Retool to Tableau using a REST API Resource with Tableau personal access token authentication. You can query Tableau Server or Tableau Cloud to list workbooks, views, and data sources, embed Tableau dashboards inside Retool Custom Components using the JavaScript Embed API, and combine Tableau visualizations with editable Retool UI components for a unified operational tool.

## Embed Tableau Dashboards and Manage Tableau Content From Retool

Tableau is powerful for data visualization, but it is not designed for operational workflows — you cannot build an approval form next to a Tableau chart, or trigger a database update from a Tableau filter selection. Retool fills this gap by integrating with Tableau in two complementary ways: via the Tableau REST API for programmatic management of workbooks, views, and data sources, and via the Tableau Embed API for rendering live Tableau visualizations directly inside Retool Custom Components.

The REST API integration gives Retool apps the ability to list all workbooks published to a Tableau site, retrieve metadata about specific views, query who has permission to access content, and trigger workbook data refresh operations. This is useful for building Tableau content management tools, refresh monitoring dashboards, and publishing automation for data teams. Authentication uses Tableau's personal access tokens, which are exchanged for a session token via a sign-in API call — this exchange is performed as a Retool query, and the resulting token is stored in a Retool variable for use in subsequent requests.

The Embed API integration allows a Tableau view or dashboard to render as a live, interactive visualization inside a Retool Custom Component iframe. Users can filter and interact with the Tableau dashboard directly without leaving Retool, while adjacent Retool components — Tables, Forms, Buttons — can read data from your databases and perform write operations. This hybrid architecture is ideal for teams that have significant Tableau investments and want to wrap Tableau analytics with operational capabilities like approval workflows, data entry forms, and alert management.

## Before you start

- Access to Tableau Server or Tableau Cloud with a user account that has Creator or Explorer license
- A Tableau personal access token (PAT) created in your Tableau account settings (My Account → Personal Access Tokens)
- Your Tableau Server URL (e.g., https://tableau.yourcompany.com) or Tableau Cloud pod URL (e.g., https://us-west-2b.online.tableau.com)
- Your Tableau site name (the string after /site/ in your Tableau URL — empty string for the default site)
- A Retool account with permission to create Resources and Custom Components

## Step-by-step guide

### 1. Create a Tableau personal access token

Before configuring Retool, you need a Tableau personal access token (PAT) for API authentication. Sign in to your Tableau Server or Tableau Cloud instance and click your user avatar in the top-right corner. Select 'My Account Settings' from the dropdown. On the account settings page, scroll down to the 'Personal Access Tokens' section. Click 'Create new token'. Enter a descriptive name like 'Retool API Integration' and click 'Create token'. Tableau will display the token name and token secret exactly once — copy both values immediately and store them securely. The token name is a human-readable identifier, and the token secret is the actual credential you will use for authentication. PATs in Tableau expire after 15 days of inactivity by default (configurable by Tableau Server administrators to up to 1 year). If you are working with Tableau Cloud, the PAT expiration policy may differ — check with your Tableau administrator. Unlike a basic API key that is passed directly in headers, Tableau's PAT must first be exchanged for a session token via a sign-in API call — a two-step authentication process that Retool handles through queries, as you will configure in subsequent steps. Store the PAT name and secret in Retool's configuration variables for security.

**Expected result:** A Tableau personal access token name and secret are copied and ready. Both values are stored safely — the secret cannot be viewed again after the creation dialog is closed.

### 2. Create a REST API Resource pointing to Tableau's REST API

In Retool, navigate to the Resources tab from the left sidebar of your organization homepage. Click '+ Create new', scroll through the connector list, and select 'REST API'. On the configuration screen, set the Name to 'Tableau API'. For the Base URL, use your Tableau Server or Tableau Cloud URL — for example, https://tableau.yourcompany.com for Tableau Server, or https://us-west-2b.online.tableau.com for Tableau Cloud. Add a header with key Content-Type and value application/json. For authentication, select 'No authentication' — leave this blank because Tableau's authentication is session-based and handled through a sign-in query rather than a static header. The Tableau REST API version should be specified in each query path: the current stable version is api/3.19. Add a custom header Accept with value application/json to tell Tableau to respond in JSON format rather than its default XML. Click 'Test connection' — it may return a 404 or similar since there is no authentication yet, but the important thing is that Retool can reach the base URL without network errors. Click 'Save resource'. You will handle authentication via a sign-in query in the next step rather than in the resource configuration itself.

**Expected result:** A REST API Resource named 'Tableau API' is saved in Retool with the correct base URL and JSON headers. The resource is available in the query editor dropdown.

### 3. Authenticate with Tableau's REST API using a sign-in query

Tableau's REST API uses a session-based authentication model: you first call a sign-in endpoint with your PAT credentials, receive a session token, and then include that session token in all subsequent API requests as a header called X-Tableau-Auth. This requires a two-step setup in Retool. First, create a query named tableauSignIn. Select your Tableau API resource, set the Method to POST, and set the URL path to /api/3.19/auth/signin. In the Body section, select JSON and enter the sign-in request body that includes the PAT name and secret as credentials. Reference your Tableau site name — use an empty string if you are on the default site. Run this query to test. A successful response returns a JSON object with credentials.token (the session token, valid for 4 hours) and credentials.site.id (the site ID needed for content queries). Create a Retool state variable named tableauToken by dragging a Variable component from the component panel or clicking the State section in the left panel and adding a variable. Set its value using the tableauSignIn query's Success event handler: Event: Success → Action: Set variable → Variable: tableauToken → Value: {{ tableauSignIn.data.credentials.token }}. This stores the session token for use in all subsequent queries. For production use, create a second query called tableauSignOut that calls DELETE /api/3.19/auth/signout with the X-Tableau-Auth header, and trigger it when the app closes to clean up sessions.

```
{
  "credentials": {
    "personalAccessTokenName": "{{ retoolContext.configVars.TABLEAU_PAT_NAME }}",
    "personalAccessTokenSecret": "{{ retoolContext.configVars.TABLEAU_PAT_SECRET }}",
    "site": {
      "contentUrl": "{{ retoolContext.configVars.TABLEAU_SITE_NAME }}"
    }
  }
}
```

**Expected result:** The tableauSignIn query returns a credentials object with a token field. The token value is stored in the tableauToken state variable and visible in Retool's State panel.

### 4. Query Tableau workbooks and views

With a session token stored in the tableauToken variable, you can now build authenticated queries to Tableau's content endpoints. Create a new query named getWorkbooks. Select your Tableau API resource, set the Method to GET, and set the URL path to /api/3.19/sites/{{ tableauSignIn.data.credentials.site.id }}/workbooks. Add a header to this specific query: click the Headers section and add X-Tableau-Auth with value {{ tableauToken.value }}. Add URL parameters for pagination: pageSize set to 100 and pageNumber set to 1. Run the query — it returns a workbooks object with a workbook array where each workbook has fields including id, name, description, contentUrl, size, createdAt, updatedAt, and an owner object. Create a JavaScript transformer on this query (Advanced → Transform results) to flatten the response and extract the fields you want for a Table: id, name, project name, owner display name, last updated timestamp, and size in MB. Bind the transformed output to a Table component. Create a second query named getViews with path /api/3.19/sites/{{ tableauSignIn.data.credentials.site.id }}/workbooks/{{ tableauTable.selectedRow.id }}/views — this runs when a workbook row is selected and retrieves all views (individual charts and dashboards) within that workbook. Trigger getViews automatically using a Row Click event handler on the workbooks Table.

```
// Transformer: flatten Tableau workbooks list
const workbooks = data.workbooks?.workbook || [];
return workbooks.map(wb => ({
  id: wb.id,
  name: wb.name,
  project: wb.project?.name || 'Default',
  owner: wb.owner?.name || 'Unknown',
  content_url: wb.contentUrl,
  size_mb: wb.size ? (wb.size / 1024).toFixed(1) : 'N/A',
  last_updated: new Date(wb.updatedAt).toLocaleString(),
  views_count: wb.viewCount || 0
}));
```

**Expected result:** The getWorkbooks query returns a list of workbooks with metadata displayed in a Table. Clicking a workbook row triggers the getViews query and shows the views for that workbook in a second Table.

### 5. Embed a Tableau view in a Retool Custom Component

To render a live Tableau visualization inside Retool, use a Custom Component with Tableau's JavaScript Embed API. This allows the full interactive Tableau experience — filters, drill-downs, marks selection — to appear inside your Retool app alongside other components. In the Retool component panel, drag a Custom Component onto the canvas and resize it to occupy the area where you want the Tableau dashboard to appear. Click 'Edit source' to open the Custom Component editor. In the source editor, write an HTML document that loads the Tableau Embedding API v3 from Tableau's CDN and renders a tableau-viz web component pointing to the specific view URL. The view URL is constructed from your Tableau server URL and the content URL of the selected view. In Retool's Custom Component model, you can pass the selected view URL as a model property that the component reads using Retool.subscribe(). When a user selects a different workbook or view in the Retool Table above, update the Custom Component's model to change the embedded view dynamically. Set the Custom Component's model property viewUrl to {{ tableauViews.selectedRow.content_url }} to make the embedded view change based on Table selection. This creates a fully interactive Tableau analytics experience integrated directly into your Retool operational app, with Retool components for data management running alongside live Tableau visualizations.

```
<!DOCTYPE html>
<html>
<head>
  <style>
    body { margin: 0; overflow: hidden; }
    tableau-viz { width: 100%; height: 100vh; }
  </style>
  <script type="module" src="https://public.tableau.com/javascripts/api/tableau.embedding.3.latest.min.js"></script>
</head>
<body>
  <div id="vizContainer">
    <tableau-viz
      id="tableauViz"
      hide-tabs
      toolbar="hidden">
    </tableau-viz>
  </div>
  <script src="https://cdn.tryretool.com/js/custom-component.js"></script>
  <script>
    Retool.subscribe(function(model) {
      const viz = document.getElementById('tableauViz');
      if (model.viewUrl && viz) {
        viz.setAttribute('src', model.viewUrl);
        viz.setAttribute('token', model.sessionToken || '');
      }
    });
  </script>
</body>
</html>
```

**Expected result:** The Custom Component renders a live Tableau dashboard inside the Retool app. Selecting different views in the Retool Table above updates which Tableau visualization is displayed in the embedded component.

## Best practices

- Store Tableau PAT name and secret as secret configuration variables in Retool (Settings → Configuration Variables, marked as secret) and reference them as {{ retoolContext.configVars.TABLEAU_PAT_NAME }} in the sign-in query body — never hardcode credentials in query configurations.
- Handle session token expiration proactively by adding a Timer component set to 3.5 hours that re-runs the sign-in query before the 4-hour token expiry — this prevents API calls from failing mid-session for long-lived Retool apps.
- Pin your Tableau API version in the URL path (e.g., /api/3.19/) rather than using /api/latest/ to prevent breaking changes from Tableau version upgrades from silently affecting your Retool integration.
- Use the embed approach (Custom Component + Tableau Embed API) for visualizations where interactivity is important — users can filter and drill down without rebuilding those capabilities in Retool Charts. Use the REST API approach for programmatic operations: refresh scheduling, permission auditing, and content management.
- For Tableau Server deployments, whitelist Retool's IP addresses in your server firewall or use Retool's self-hosted deployment in the same VPC as Tableau Server to avoid IP allowlisting requirements.
- Implement Tableau sign-out in the app's cleanup logic — call DELETE /api/3.19/auth/signout with the X-Tableau-Auth session token when the Retool app session ends to avoid accumulating abandoned Tableau sessions on the server.
- For multi-site Tableau Server installations, build a site selector dropdown in Retool that lets users choose which Tableau site to connect to, and parameterize the site ID in all subsequent queries — enabling a single Retool app to manage content across all Tableau sites.

## Use cases

### Build a Tableau content management dashboard

Your data team publishes dozens of workbooks to Tableau Server and needs a management panel showing all workbooks, their last refresh time, owner, and view count — information that requires clicking through multiple Tableau Server menus to find. The Retool app queries Tableau's REST API to list workbooks with metadata, displays them in a Table, and provides buttons to trigger refresh requests and manage permissions — all from a single operational panel.

Prompt example:

```
Build a Tableau workbook management panel that lists all workbooks on the site with their name, owner, project, last_modified date, and total view count. Add a 'Refresh Now' button that calls Tableau's refresh endpoint for the selected workbook, and a permission viewer panel showing which users and groups have access to the selected workbook.
```

### Embed a Tableau dashboard alongside an editable data table

Your operations team uses a Tableau dashboard showing sales performance by region, but when they identify anomalies they need to open a separate system to make corrections. A Retool app embeds the Tableau dashboard in a Custom Component on the left half of the screen, and shows an editable Table bound to your database on the right — users see the Tableau visualization and can correct underlying data in the same interface without switching tools.

Prompt example:

```
Build a split-panel app with a Retool Custom Component on the left embedding a specific Tableau view via the Embed API (https://public.tableau.com/views/...), and a Table component on the right connected to a PostgreSQL query showing the underlying sales data with inline editing and a Save button that UPDATEs records in the database.
```

### Create an automated Tableau refresh scheduler

Your data team needs Tableau workbooks refreshed at specific times that do not align with Tableau's built-in schedule options, or needs to chain a database process before triggering a Tableau refresh. A Retool Workflow with a Schedule trigger authenticates to Tableau's REST API, runs the prerequisite database queries to prepare data, then calls Tableau's workbook refresh endpoint — creating a custom orchestrated refresh pipeline.

Prompt example:

```
Build a Retool Workflow with a daily 6 AM Schedule trigger that first runs a Resource Query to execute a stored procedure on PostgreSQL (the data preparation step), then authenticates to Tableau's REST API using a personal access token sign-in, and finally POST to Tableau's /workbooks/{id}/refresh endpoint to trigger a workbook data refresh.
```

## Troubleshooting

### Sign-in query returns 401 Unauthorized or 'Invalid personal access token'

Cause: The personal access token name or secret is incorrect, the token has expired due to inactivity, or the token was revoked by a Tableau administrator.

Solution: Verify the PAT name and secret match exactly what was shown when you created the token — they are case-sensitive. Check in Tableau (My Account Settings → Personal Access Tokens) that the token still exists and shows a recent last used date. If the token expired, create a new one and update the Retool configuration variables TABLEAU_PAT_NAME and TABLEAU_PAT_SECRET. Tableau administrators can also check server-side token expiration settings.

### Workbooks query returns 404 Not Found after successful sign-in

Cause: The site ID in the query path is incorrect, or you are using the site name instead of the site ID. Tableau's API requires the numeric site ID (from the sign-in response) in the URL path, not the site content URL or name.

Solution: Use {{ tableauSignIn.data.credentials.site.id }} (the site ID from the sign-in response) in your workbooks query path — not {{ retoolContext.configVars.TABLEAU_SITE_NAME }}. The site ID is a UUID string, not the human-readable site name. Verify by checking the sign-in response data in Retool's query results panel.

```
// Correct path format:
// /api/3.19/sites/{{ tableauSignIn.data.credentials.site.id }}/workbooks

// Incorrect (do not use site name in path):
// /api/3.19/sites/MySiteName/workbooks
```

### Embedded Tableau view shows a sign-in prompt inside the Custom Component

Cause: The Tableau Embed API is requesting authentication for the embedded view. Without Connected Apps or Trusted Authentication configured on Tableau Server, embedded views require users to sign in to Tableau separately.

Solution: For Tableau Cloud, configure a Connected App in Tableau Cloud's Settings → Connected Apps to enable JWT-based authentication for embedded content. For Tableau Server, configure Trusted Authentication and pass a trusted ticket in the Custom Component. Alternatively, make the Tableau view public (Permissions → Everyone → Viewer) if the content is not sensitive — this allows embedding without authentication.

### Tableau REST API responses return XML instead of JSON

Cause: The Accept: application/json header is missing from the Resource configuration. Tableau's REST API returns XML by default and only switches to JSON when the Accept header explicitly requests it.

Solution: Edit the Tableau API Resource in Retool (Resources tab → select Tableau API → Edit). In the Headers section, verify Accept: application/json is present. If it is missing, add it and save the resource. All subsequent queries will then receive JSON responses that parse correctly in transformers.

## Frequently asked questions

### Does Retool have a native Tableau connector?

No. Retool does not have a dedicated native connector for Tableau as of 2026. You connect via a generic REST API Resource targeting Tableau Server's or Tableau Cloud's REST API. The session-based authentication requires a two-step sign-in query to obtain a session token before making content queries.

### Can I embed a Tableau Public dashboard in Retool?

Yes. Tableau Public dashboards are publicly accessible and can be embedded in a Retool Custom Component without authentication. Use Tableau's JavaScript Embed API v3 with the public tableau.com URL. The embedded dashboard renders fully interactive — users can apply filters and drill down without leaving Retool. The view URL is available from your Tableau Public profile.

### How do I pass Retool filter values to an embedded Tableau dashboard?

Use the Tableau Embed API's filter capabilities within your Custom Component. In the Retool.subscribe() callback, when the model updates with new filter values, call viz.applyFilterAsync(fieldName, value) on the tableau-viz element. This allows Retool Select or DatePicker components to control filters in the embedded Tableau dashboard, creating a unified filtering experience across both tools.

### Can I trigger Tableau workbook refreshes from Retool?

Yes. Tableau's REST API has a POST /workbooks/{id}/refresh endpoint that initiates a data refresh for a published workbook. Create a Retool query with Method POST targeting this endpoint with the X-Tableau-Auth session token header. Wire it to a Button component's Click event handler. You can also use Retool Workflows to schedule automatic Tableau refreshes at times that are not supported by Tableau's native scheduling.

---

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