Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Gleap

Scalekit connector
Open markdown

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

Tools
58
What they doRead · write · destructive
29 · 21 · 829 read21 write8 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 Gleap connection

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

  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 = 'gleap'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Gleap:', 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: 'gleap_companies_list',
    toolInput: { project_id: '6512f0a1b2c3d4e5f6a7b8c9' },
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their Gleap credentials there. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • gleap_companies_listList the companies of a Gleap project, most recently seen first, optionally filtered by name.Read-only

    List Companies

    List the companies of a Gleap project, most recently seen first, optionally filtered by name. Returns a summary per company: companyId, name, plan, value, domain, lastSeenAt and createdAt. Use this to browse or find companies. Use gleap_company_get for the full record.

    Inputs

    project_idstringrequired
    ID of the Gleap project to work in, sent in the Project header. Copy it from Settings > Project > General in the Gleap dashboard; it is the ID your SDK is initialized with. Example: 6512f0a1b2c3d4e5f6a7b8c9.
    limitinteger
    Companies per page, up to 200 (default 50). Example: 20.
    searchstring
    Case-insensitive text to match in the company name. Example: Acme.
    skipinteger
    Number of results to skip, for paging. Example: 0.
  • gleap_company_getGet one Gleap company by its external company ID.Read-only

    Get Company

    Get one Gleap company by its external company ID. Returns the company with name, plan, domain, value, SLA, tags, address, custom data and owner. Use this for a company's details. Use gleap_company_members_list for its contacts.

    Inputs

    company_idstringrequired
    External company ID, the companyId your app sends through the SDK (not the Gleap _id). Example: acme-inc.
    project_idstringrequired
    ID of the Gleap project to work in, sent in the Project header. Copy it from Settings > Project > General in the Gleap dashboard; it is the ID your SDK is initialized with. Example: 6512f0a1b2c3d4e5f6a7b8c9.
  • gleap_company_members_listList the contacts linked to a Gleap company, most recently active first.Read-only

    List Company Members

    List the contacts linked to a Gleap company, most recently active first. Returns each contact's _id, name, email, userId, avatar and lastActivity. Use this for a company's contacts. Use gleap_company_member_add to link another contact.

    Inputs

    company_idstringrequired
    External company ID, the companyId your app sends through the SDK (not the Gleap _id). Example: acme-inc.
    project_idstringrequired
    ID of the Gleap project to work in, sent in the Project header. Copy it from Settings > Project > General in the Gleap dashboard; it is the ID your SDK is initialized with. Example: 6512f0a1b2c3d4e5f6a7b8c9.
    limitinteger
    Contacts per page, up to 200 (default 50). Example: 20.
    skipinteger
    Number of results to skip, for paging. Example: 0.
  • gleap_company_tickets_listList the conversations stamped with a Gleap company, newest activity first.Read-only

    List Company Conversations

    List the conversations stamped with a Gleap company, newest activity first. Returns the company's tickets, or its contacts' survey responses with survey_responses=only. Use this for a company's support history. Use gleap_session_activities_list for one contact.

    Inputs

    company_idstringrequired
    External company ID, the companyId your app sends through the SDK (not the Gleap _id). Example: acme-inc.
    project_idstringrequired
    ID of the Gleap project to work in, sent in the Project header. Copy it from Settings > Project > General in the Gleap dashboard; it is the ID your SDK is initialized with. Example: 6512f0a1b2c3d4e5f6a7b8c9.
    limitinteger
    Conversations per page, up to 100 (default 25). Example: 20.
    skipinteger
    Number of results to skip, for paging. Example: 0.
    survey_responsesstring
    Set only to list the survey responses of the company's contacts instead. Example: only.one of only
  • gleap_current_user_getGet the Gleap user the API key belongs to.Read-only

    Get Current User

    Get the Gleap user the API key belongs to. Returns the user's ID, name, email and settings. Use this to check the connection or find your own user ID.

    Inputs

    project_idstringrequired
    ID of the Gleap project to work in, sent in the Project header. Copy it from Settings > Project > General in the Gleap dashboard; it is the ID your SDK is initialized with. Example: 6512f0a1b2c3d4e5f6a7b8c9.
  • gleap_helpcenter_article_getGet one Gleap help center article, optionally with its content converted to HTML or Markdown.Read-only

    Get Help Center Article

    Get one Gleap help center article, optionally with its content converted to HTML or Markdown. Returns the article with title, description, editor JSON content and settings, plus contentHtml or contentMarkdown when format is set. Use this to read an article. Use gleap_helpcenter_articles_list to find it.

    Inputs

    article_idstringrequired
    Help center article ID, from gleap_helpcenter_articles_list. Example: 6650a1b2c3d4e5f601234567.
    collection_idstringrequired
    Help center collection ID, from gleap_helpcenter_collections_list. Example: 6650a1b2c3d4e5f601234567.
    project_idstringrequired
    ID of the Gleap project to work in, sent in the Project header. Copy it from Settings > Project > General in the Gleap dashboard; it is the ID your SDK is initialized with. Example: 6512f0a1b2c3d4e5f6a7b8c9.
    formatstring
    Also return the content as html or markdown. Example: markdown.one of htmlmarkdown
  • gleap_helpcenter_articles_listList every article in a Gleap help center collection, published and unpublished, in order.Read-only

    List Help Center Articles

    List every article in a Gleap help center collection, published and unpublished, in order. Returns the articles with ID, title, description, draft state and dates; not paginated. Use this to browse a collection. Use gleap_helpcenter_article_get for one article's content.

    Inputs

    collection_idstringrequired
    Help center collection ID, from gleap_helpcenter_collections_list. Example: 6650a1b2c3d4e5f601234567.
    project_idstringrequired
    ID of the Gleap project to work in, sent in the Project header. Copy it from Settings > Project > General in the Gleap dashboard; it is the ID your SDK is initialized with. Example: 6512f0a1b2c3d4e5f6a7b8c9.
  • gleap_helpcenter_collection_getGet one Gleap help center collection.Read-only

    Get Help Center Collection

    Get one Gleap help center collection. Returns the collection with title, description, icon, parent and audience settings. Use this for a collection's details. Use gleap_helpcenter_articles_list for its articles.

    Inputs

    collection_idstringrequired
    Help center collection ID, from gleap_helpcenter_collections_list. Example: 6650a1b2c3d4e5f601234567.
    project_idstringrequired
    ID of the Gleap project to work in, sent in the Project header. Copy it from Settings > Project > General in the Gleap dashboard; it is the ID your SDK is initialized with. Example: 6512f0a1b2c3d4e5f6a7b8c9.