Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to BetterContact

Scalekit connector
Open markdown

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

Tools
9
What they doRead · write · destructive
5 · 4 · 05 read4 write0 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 BetterContact connection

    In AgentKit > Connections, create a BetterContact 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 = 'bettercontact'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize BetterContact:', 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: 'bettercontact_enrich_company_profile',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user opens the link once and enters their BetterContact 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
  • bettercontact_enrich_company_profileLook up one company by domain or LinkedIn URL and return its profile synchronously.Read-only

    Enrich Company Profile

    Look up one company by domain or LinkedIn URL and return its profile synchronously. Returns name, domain, description, industry, size, founding year, headquarters, address, and keywords. Does not consume credits. Use create_company_finder_search to discover many companies by criteria. Provide company_domain, company_linkedin_url, or both.

    Inputs

    company_domainstring
    Company website or domain. At least one of company_domain or company_linkedin_url is required. Example: microsoft.com.
    company_linkedin_urlstring
    LinkedIn page URL of the company. At least one of company_domain or company_linkedin_url is required. Example: https://www.linkedin.com/company/microsoft.
  • bettercontact_get_company_finder_resultsRetrieve the results of a Company Finder search.Read-only

    Get Company Finder Results

    Retrieve the results of a Company Finder search. Returns the status, credits consumed and left, a summary with the total companies found, and the companies once the search finishes. A status of on_hold means there are not enough credits. Use after create_company_finder_search. While the status is processing, no companies are present, so call again after a short wait.

    Inputs

    request_idstringrequired
    The request id returned when the Company Finder search was submitted. Example: bc39ffbfc24cf043b748.
  • bettercontact_get_credits_balanceRead the credit balance of the account the API key belongs to.Read-only

    Get Credits Balance

    Read the credit balance of the account the API key belongs to. Returns credits_left and the account email. Use before submitting large enrichment or finder requests to check that enough credits remain.

    Inputs

    This tool takes no inputs.

  • bettercontact_get_enrichment_resultsRetrieve the results of an enrichment request submitted with enrich_leads.Read-only

    Get Enrichment Results

    Retrieve the results of an enrichment request submitted with enrich_leads. Returns the request status, credits consumed and left, a summary, and the enriched leads with email, phone, and profile fields once the status is terminated. Use after enrich_leads. While the status is processing, no data is present, so call again after a short wait and branch on status rather than the HTTP code.

    Inputs

    request_idstringrequired
    The request id returned when the enrichment request was submitted. Example: fefbc2203558eb3adcea.
  • bettercontact_get_lead_finder_resultsRetrieve the results of a Lead Finder search.Read-only

    Get Lead Finder Results

    Retrieve the results of a Lead Finder search. Returns the status, credits consumed and left, a summary with the total leads found, and the leads once the status is terminated. A status of on_hold means credits must be topped up to resume. Use after create_lead_finder_search. While the status is processing, no leads are present, so call again after a short wait.

    Inputs

    request_idstringrequired
    The request id returned when the Lead Finder search was submitted. Example: bc39ffbfc24cf043b748.
  • bettercontact_enrich_lead_profileLook up one person and return their profile and current company synchronously.Write

    Enrich Lead Profile

    Look up one person and return their profile and current company synchronously. Returns job title, seniority, LinkedIn headline, location, and company details. It does not return an email address or phone number. Use enrich_leads to get email or phone. Provide linkedin_url alone, or first_name, last_name and company_domain together. Costs 0.1 credit per profile found and nothing when no profile matches.

    Inputs

    companystring
    Company name. Complements company_domain but cannot replace it. Example: Honda R&D Americas.
    company_domainstring
    Domain of the person's company. Required together with first_name and last_name when linkedin_url is not provided. Example: hondaresearch.com.
    first_namestring
    First name of the person. Required together with last_name and company_domain when linkedin_url is not provided. Example: Veronick.
    last_namestring
    Last name of the person. Required together with first_name and company_domain when linkedin_url is not provided. Example: Martinuzzi.
    linkedin_urlstring
    Public LinkedIn profile URL of the person. Sufficient on its own and takes precedence over the name fields. Example: https://www.linkedin.com/in/veronick-martinuzzi-a4533373.