Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Twenty CRM

Scalekit connector
Open markdown

The Twenty CRM connector lets your AI agent act in each user's Twenty CRM account. Each user connects their own Twenty CRM access token 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
15 · 10 · 515 read10 write5 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 Twenty CRM connection

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

    Each user opens the link once and enters their Twenty CRM 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
  • twenty_get_companyRetrieve a single company record in Twenty by id.Read-only

    Get Company

    Retrieve a single company record in Twenty by id. Returns data.company with the record's fields and, at depth 1, its related records. Use twenty_get_company when the id is known. Use twenty_list_companies to find ids.

    Inputs

    idstringrequired
    UUID of the company record.
    depthinteger
    Level of related records to include. 0 returns only the record, 1 also includes its direct relations.one of 01default 1
  • twenty_get_noteRetrieve a single note record in Twenty by id.Read-only

    Get Note

    Retrieve a single note record in Twenty by id. Returns data.note with the record's fields and, at depth 1, its related records. Use twenty_get_note when the id is known. Use twenty_list_notes to find ids.

    Inputs

    idstringrequired
    UUID of the note record.
    depthinteger
    Level of related records to include. 0 returns only the record, 1 also includes its direct relations.one of 01default 1
  • twenty_get_objectRetrieve one object type from the Twenty workspace data model by id, including its field definitions.Read-only

    Get Data Model Object

    Retrieve one object type from the Twenty workspace data model by id, including its field definitions. Returns data.object with nameSingular, namePlural, labels, flags and its fields. Use twenty_get_object when the object id is known. Use twenty_list_objects to find ids.

    Inputs

    idstringrequired
    UUID of the object metadata record.
  • twenty_get_opportunityRetrieve a single opportunity record in Twenty by id.Read-only

    Get Opportunity

    Retrieve a single opportunity record in Twenty by id. Returns data.opportunity with the record's fields and, at depth 1, its related records. Use twenty_get_opportunity when the id is known. Use twenty_list_opportunities to find ids.

    Inputs

    idstringrequired
    UUID of the opportunity record.
    depthinteger
    Level of related records to include. 0 returns only the record, 1 also includes its direct relations.one of 01default 1
  • twenty_get_personRetrieve a single person record in Twenty by id.Read-only

    Get Person

    Retrieve a single person record in Twenty by id. Returns data.person with the record's fields and, at depth 1, its related records. Use twenty_get_person when the id is known. Use twenty_list_people to find ids.

    Inputs

    idstringrequired
    UUID of the person record.
    depthinteger
    Level of related records to include. 0 returns only the record, 1 also includes its direct relations.one of 01default 1
  • twenty_get_taskRetrieve a single task record in Twenty by id.Read-only

    Get Task

    Retrieve a single task record in Twenty by id. Returns data.task with the record's fields and, at depth 1, its related records. Use twenty_get_task when the id is known. Use twenty_list_tasks to find ids.

    Inputs

    idstringrequired
    UUID of the task record.
    depthinteger
    Level of related records to include. 0 returns only the record, 1 also includes its direct relations.one of 01default 1
  • twenty_get_workspace_memberRetrieve a single workspace member in Twenty by id.Read-only

    Get Workspace Member

    Retrieve a single workspace member in Twenty by id. Returns data.workspaceMember with the member's name, email, locale and time zone. Use twenty_get_workspace_member when the id is known. Use twenty_list_workspace_members to find ids.

    Inputs

    idstringrequired
    UUID of the workspace member.
    depthinteger
    Level of related records to include. 0 returns only the record, 1 also includes its direct relations.one of 01default 1
  • twenty_list_companiesList companies records in Twenty with optional filtering, ordering and cursor pagination.Read-only

    List Companies

    List companies records in Twenty with optional filtering, ordering and cursor pagination. Returns data.companies (array of company records), pageInfo (hasNextPage, startCursor, endCursor) and totalCount. Use twenty_list_companies to browse or filter. Use twenty_get_company to fetch one record by id.

    Inputs

    depthinteger
    Level of related records to include. 0 returns only the record, 1 also includes its direct relations.one of 01default 1
    ending_beforestring
    Cursor for the previous page. Pass the startCursor value from the pageInfo of the previous response.
    filterstring
    Filter expression in the form field[COMPARATOR]:value. Combine conditions with commas (AND) or wrap them in or(...), and(...). Strings are quoted. Comparators include eq, neq, in, is, gt, gte, lt, lte, startsWith, like and ilike. Example: name[ilike]:"%acme%"
    limitinteger
    Maximum number of records to return per page. The API default is 60 and the maximum is 60.default 60
    order_bystring
    Sort order as comma-separated fields with an optional direction in brackets: AscNullsFirst, AscNullsLast, DescNullsFirst or DescNullsLast. Example: createdAt[DescNullsLast]
    starting_afterstring
    Cursor for the next page. Pass the endCursor value from the pageInfo of the previous response.