Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Tableau

Scalekit connector
Open markdown

The Tableau connector lets your AI agent act in each user's Tableau account. Each user connects their own Tableau API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 49 tools.

Tools
49
What they doRead · write · destructive
27 · 16 · 627 read16 write6 destructive
Users sign in with

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Tableau connection

    In AgentKit > Connections, create a Tableau connection. The name you give it is the connection_name your code passes. See Configure connections.

    Console steps with screenshots

    Connect your Tableau Cloud or Tableau Server site to Scalekit so your agent can browse workbooks, query views, export dashboards, and manage users.

    Scalekit handles session token management automatically. You store your Personal Access Token (PAT) credentials once, and Scalekit signs in and refreshes the session token before it expires — your code never calls the sign-in endpoint directly.

    1. Create a Personal Access Token in Tableau

      A Personal Access Token (PAT) is used by Scalekit to sign in on your behalf and keep the session alive automatically.

      • Sign in to your Tableau site.
      • Click your avatar in the top-right corner → My Account Settings.
      • Scroll to the Personal Access Tokens section.
      • Click + Create new token, give it a name (e.g., scalekit-agent), and click Create.
      • Copy both the Token Name and Token Secret — the secret is shown only once.

    2. Create a connection in Scalekit

      • In Scalekit dashboard, go to Agent Auth → Create Connection.
      • Search for Tableau and click Create.
      • Note the Connection name — use this as connection_name in your code (e.g., tableau).
      • Click Save.

    3. Add a connected account

      A connected account links a user in your system to their Tableau PAT credentials. Scalekit uses these to sign in and refresh the session automatically.

      In the dashboard, to test

      • Open the connection → Connected Accounts tab → Add account.
      • Fill in:
        • Your User’s ID — any identifier for this user (e.g., user_123)
        • Server Domain — your Tableau hostname without https:// (e.g., prod-in-a.online.tableau.com)
        • PAT Name — the token name from step 1
        • PAT Secret — the token secret from step 1
        • Site Content URL — the site identifier from your Tableau URL (leave blank for the Default site)
      • Click Save.

      In production

      Each user adds their own account through the authorization link: they enter their credentials on the page it opens.

      From your backend, if your app already has the credentials

      For example, when users enter them on a settings page in your app:

      import { ConnectorStatus } from '@scalekit-sdk/node'
      const authorizationDetails = {
      details: {
      case: 'staticAuth',
      value: {
      details: {
      domain: 'prod-in-a.online.tableau.com',
      pat_name: 'scalekit-agent',
      pat_secret: process.env.TABLEAU_PAT_SECRET,
      site_content_url: 'mycompany-1234567', // omit for Default site
      },
      },
      },
      };
      let { connectedAccount } = await scalekit.actions.upsertConnectedAccount({
      connectionName: 'tableau',
      identifier: 'user_123',
      authorizationDetails,
      });
      // Make sure the account is ACTIVE before the first tool call.
      if (connectedAccount?.status !== ConnectorStatus.ACTIVE) {
      ({ connectedAccount } = await scalekit.actions.upsertConnectedAccount({
      connectionName: 'tableau',
      identifier: 'user_123',
      authorizationDetails,
      }));
      }
  4. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'tableau'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Tableau:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'tableau_datasources_list',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Tableau credentials there. If your app already has a user's credentials, add the account from your backend instead, as the console steps above show. See Authorize a user for the full flow and statuses.

Most Tableau tools require one or more resource LUIDs. The site ID is resolved automatically by Scalekit after sign-in — you do not pass it to tool calls. Always fetch other IDs from the API — never guess or hard-code them.

ResourceTool to get IDField in response
Workbook IDtableau_workbooks_list or tableau_workbook_searchworkbooks.workbook[].id
View IDtableau_views_list, or tableau_list_views with a workbook_idviews.view[].id
Data Source IDtableau_datasources_listdatasources.datasource[].id
Project IDtableau_projects_listprojects.project[].id
User IDtableau_users_listusers.user[].id
Group IDtableau_groups_listgroups.group[].id
Job IDtableau_job_get (from background job operations)job.id
Site ID (proxy only)tableau_session_getsession.site.id

Recommended start sequence for any agent session:

1. tableau_workbooks_list → discover workbooks
2. tableau_list_views → discover views within a workbook (pass workbook_id)
3. tableau_datasources_list → discover data sources

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • tableau_datasource_getRetrieve detailed information about a specific Tableau data source by its ID, including metadata, connections, project, and owner.Read-only

    Get Data Source

    Retrieve detailed information about a specific Tableau data source by its ID, including metadata, connections, project, and owner.

    Inputs

    datasource_idstringrequired
    The LUID of the data source to retrieve
  • tableau_datasource_permissions_listRetrieve the capability grants (permissions) defined for a specific Tableau data source, showing which users and groups can view, edit, or manage it.Read-only

    List Data Source Permissions

    Retrieve the capability grants (permissions) defined for a specific Tableau data source, showing which users and groups can view, edit, or manage it.

    Inputs

    datasource_idstringrequired
    The LUID of the data source to list permissions for
  • tableau_datasources_listRetrieve a filtered, sorted list of published data sources on a Tableau site.Read-only

    List Data Sources

    Retrieve a filtered, sorted list of published data sources on a Tableau site. Supports pagination and filtering by name, type, project, and owner.

    Inputs

    filterstring
    Filter expression to narrow results, e.g. name:eq:SalesData
    page_numberinteger
    Page number for pagination (1-based)default 1
    page_sizeinteger
    Number of data sources to return per page (max 1000)default 100
    sortstring
    Sort expression, e.g. name:asc or updatedAt:desc
  • tableau_extract_refresh_tasks_listList the scheduled extract refresh tasks on a Tableau site, including their schedule and the workbook or data source each task refreshes.Read-only

    List Extract Refresh Tasks

    List the scheduled extract refresh tasks on a Tableau site, including their schedule and the workbook or data source each task refreshes. Use tableau_extract_refresh_task_run to trigger one immediately.

    Inputs

    filterstring
    Filter expression to narrow results, e.g. type:eq:RefreshExtractTask
    page_numberinteger
    Page number for pagination (1-based)default 1
    page_sizeinteger
    Number of tasks to return per page (max 1000)default 100
    sortstring
    Sort expression, e.g. priority:asc
  • tableau_groups_listRetrieve a filtered, sorted list of groups on a Tableau site.Read-only

    List Groups

    Retrieve a filtered, sorted list of groups on a Tableau site. Groups are used to manage permissions for multiple users at once.

    Inputs

    filterstring
    Filter expression to narrow results, e.g. name:eq:Sales
    page_numberinteger
    Page number for pagination (1-based)default 1
    page_sizeinteger
    Number of groups to return per page (max 1000)default 100
    sortstring
    Sort expression, e.g. name:asc
  • tableau_job_getRetrieve the status and details of an asynchronous Tableau job, such as an extract refresh, workbook publish, or flow run.Read-only

    Get Job

    Retrieve the status and details of an asynchronous Tableau job, such as an extract refresh, workbook publish, or flow run. Use this to monitor long-running operations.

    Inputs

    job_idstringrequired
    The LUID of the job to retrieve
  • tableau_jobs_listRetrieve a filtered, sorted list of asynchronous jobs on a Tableau site.Read-only

    List Jobs

    Retrieve a filtered, sorted list of asynchronous jobs on a Tableau site. Jobs include extract refreshes, workbook publishes, data-driven alerts, and flow runs.

    Inputs

    filterstring
    Filter expression to narrow results, e.g. status:eq:InProgress
    page_numberinteger
    Page number for pagination (1-based)default 1
    page_sizeinteger
    Number of jobs to return per page (max 1000)default 100
    sortstring
    Sort expression, e.g. createdAt:desc
  • tableau_list_viewsList views (individual sheets and dashboards) within a specific workbook, or all views across an entire Tableau site.Read-only

    List Views

    List views (individual sheets and dashboards) within a specific workbook, or all views across an entire Tableau site. Supports filtering by name or owner and pagination.

    Inputs

    workbook_idstringrequired
    The LUID of the workbook to list views from. If omitted, lists all views on the site.
    filterstring
    Filter expression using Tableau REST API filter syntax (e.g., name:eq:Sales Dashboard)
    include_usage_statisticsboolean
    Include view usage statistics (total views count) in the response
    page_numberinteger
    Page number to retrieve (1-based)
    page_sizeinteger
    Number of views to return per page (max 1000)

Workflows

The site ID (site LUID) is resolved automatically from the connected account after sign-in. You do not pass site_id to tool calls. For proxy API calls that require a site ID in the URL path, call tableau_session_get once to retrieve it.

Proxy API call

Use the Scalekit proxy to call any Tableau REST API endpoint directly. Binary downloads (PNG, PDF, Excel, .twbx, .tdsx) must use the proxy — use tableau_session_get to retrieve the site ID for the URL path:

// Get site ID once (needed for proxy URL construction)
const session = await actions.executeTool({
toolName: 'tableau_session_get',
connector: 'tableau',
identifier: 'user_123',
toolInput: {},
});
const siteId = session.session.site.id;
// Export a view as PNG
const imageBytes = await actions.request({
connectionName: 'tableau',
identifier: 'user_123',
path: `/api/3.28/sites/${siteId}/views/${viewId}/image`,
method: 'GET',
queryParams: { resolution: 'high' },
});
// Export a view as PDF
const pdfBytes = await actions.request({
connectionName: 'tableau',
identifier: 'user_123',
path: `/api/3.28/sites/${siteId}/views/${viewId}/pdf`,
method: 'GET',
queryParams: { type: 'a4', orientation: 'landscape' },
});
// Download a workbook (.twbx)
const workbookBytes = await actions.request({
connectionName: 'tableau',
identifier: 'user_123',
path: `/api/3.28/sites/${siteId}/workbooks/${workbookId}/content`,
method: 'GET',
});
// Download a data source (.tdsx)
const datasourceBytes = await actions.request({
connectionName: 'tableau',
identifier: 'user_123',
path: `/api/3.28/sites/${siteId}/datasources/${datasourceId}/content`,
method: 'GET',
});
Browse workbooks and views
// List all workbooks on the site
const workbooks = await actions.executeTool({
toolName: 'tableau_workbooks_list',
connector: 'tableau',
identifier: 'user_123',
toolInput: {},
});
// workbooks.workbooks.workbook[] — each has id, name, contentUrl, project
// Search for a workbook by name
const found = await actions.executeTool({
toolName: 'tableau_workbook_search',
connector: 'tableau',
identifier: 'user_123',
toolInput: { name: 'SalesReport' },
});
// List all views within a workbook
const workbookId = workbooks.workbooks.workbook[0].id;
const views = await actions.executeTool({
toolName: 'tableau_list_views',
connector: 'tableau',
identifier: 'user_123',
toolInput: { workbook_id: workbookId },
});
// views.views.view[] — each has id, name, contentUrl
Sign out

Call tableau_auth_signout to invalidate the session token when the agent session ends:

await actions.executeTool({
toolName: 'tableau_auth_signout',
connector: 'tableau',
identifier: 'user_123',
toolInput: {},
});
// The stored session token is now invalid — Scalekit will refresh on next call