Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Freshsales

Scalekit connector
Open markdown

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

Tools
30
What they doRead · write · destructive
17 · 13 · 017 read13 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 Freshsales connection

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

    Each user opens the link once and enters their Freshsales 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
  • freshsales_appointment_getGet one Freshsales appointment by ID.Read-only

    Get Appointment

    Get one Freshsales appointment by ID. Returns the appointment's title, start and end, time zone, location, linked record and attendees. Use this when you have an appointment ID. Use freshsales_appointments_list to find appointments.

    Inputs

    appointment_idintegerrequired
    Numeric ID of the appointment. Get it from freshsales_appointments_list. Example: 16000123456.
  • freshsales_appointments_listList Freshsales appointments, either upcoming or past.Read-only

    List Appointments

    List Freshsales appointments, either upcoming or past. Returns the appointments with id, title, start and end, and time zone. Use this to review a calendar. Use freshsales_appointment_get for one appointment's full details.

    Inputs

    filterstring
    Which appointments to return. Use open for upcoming appointments (the default). Freshsales documents the other value as complete (past appointments). Example: open.default open
    includestring
    Comma-separated related records to embed in the appointments response. Allowed values: creater, targetable, appointment_attendees. Example: targetable,appointment_attendees.
    pageinteger
    Page number to return, starting at 1. Each page holds 25 records by default. Example: 2.
  • freshsales_contact_getGet one Freshsales contact by ID.Read-only

    Get Contact

    Get one Freshsales contact by ID. Returns the contact's fields, emails, custom fields and any related records requested in include. Use this when you have a contact ID. Use freshsales_search or freshsales_lookup to find one by name or email.

    Inputs

    contact_idintegerrequired
    Numeric ID of the contact. Get it from freshsales_search or freshsales_contacts_list. Example: 16000123456.
    includestring
    Comma-separated related records to embed in the contact response. Allowed values: sales_accounts, owner, creater, updater, source, campaign, tasks, appointments, notes, deals, territory, sales_activities. Example: sales_accounts,owner.
  • freshsales_contacts_listList the contacts in a Freshsales view, one page at a time.Read-only

    List Contacts

    List the contacts in a Freshsales view, one page at a time. Returns up to 25 contacts per page with id, name, email, phone and lead score, plus meta.total. Use this to browse contacts. Use freshsales_search to find contacts by text. Get a view_id from freshsales_views_list (entity contacts) first.

    Inputs

    view_idintegerrequired
    Numeric ID of the view. Get it from freshsales_views_list with entity contacts. Example: 16000001234.
    pageinteger
    Page number to return, starting at 1. Each page holds 25 records by default. Example: 2.
    sortstring
    Field to sort the contacts by. One of: lead_score, created_at, updated_at, open_deals_amount, last_contacted. Example: updated_at.one of lead_scorecreated_atupdated_atopen_deals_amountlast_contacted
    sort_typestring
    Sort direction: asc for ascending or desc for descending. Example: desc.one of ascdesc
  • freshsales_deal_getGet one Freshsales deal by ID.Read-only

    Get Deal

    Get one Freshsales deal by ID. Returns the deal's amount, stage, expected close date, custom fields and any related records requested in include. Use this when you have a deal ID. Use freshsales_search to find one by name.

    Inputs

    deal_idintegerrequired
    Numeric ID of the deal. Get it from freshsales_search or freshsales_deals_list. Example: 16000123456.
    includestring
    Comma-separated related records to embed in the deal response. Allowed values: sales_account, owner, creater, updater, source, contacts, deal_stage, deal_reason, deal_type, campaign, deal_payment_status, deal_product, currency, sales_activities. Example: sales_account,deal_stage,contacts.
  • freshsales_deals_listList the deals in a Freshsales view, one page at a time.Read-only

    List Deals

    List the deals in a Freshsales view, one page at a time. Returns up to 25 deals per page with id, name, amount, stage and expected close date, plus meta.total. Use this to browse a pipeline. Use freshsales_search to find deals by name. Get a view_id from freshsales_views_list (entity deals) first.

    Inputs

    view_idintegerrequired
    Numeric ID of the view. Get it from freshsales_views_list with entity deals. Example: 16000001234.
    pageinteger
    Page number to return, starting at 1. Each page holds 25 records by default. Example: 2.
    sortstring
    Field to sort the deals by. One of: amount, expected_close, created_at, updated_at, last_contacted. Example: updated_at.one of amountexpected_closecreated_atupdated_atlast_contacted
    sort_typestring
    Sort direction: asc for ascending or desc for descending. Example: desc.one of ascdesc
  • freshsales_lookupFind Freshsales contacts, accounts or deals whose field exactly equals a value, such as an email address or name.Read-only

    Lookup Records

    Find Freshsales contacts, accounts or deals whose field exactly equals a value, such as an email address or name. Returns the matching records grouped by record type. Use this to check whether a record exists before creating one. Use freshsales_search for partial or free-text matches.

    Inputs

    entitiesstringrequired
    Comma-separated record types to look in: contact, sales_account, deal. Every listed type must have the field in f. Example: contact.
    fstringrequired
    Field to match against. Contacts support name, email and text, number, dropdown or radio custom fields (by internal name, e.g. cf_region); accounts and deals support name and the same custom field types. Example: email.
    qstringrequired
    Exact value to match. Partial values do not match. Example: jane@acme.com.
  • freshsales_owners_listList the users in the Freshsales account who can own records.Read-only

    List Owners

    List the users in the Freshsales account who can own records. Returns each user's id and display name. Use this to find the owner_id to assign contacts, accounts, deals, tasks and sales activities.

    Inputs

    This tool takes no inputs.