Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Odoo

Scalekit connector
Open markdown

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

Tools
23
What they doRead · write · destructive
13 · 9 · 113 read9 write1 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 Odoo connection

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

    Each user opens the link once and enters their Odoo 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
  • odoo_count_recordsCount the records of an Odoo model that match a domain filter.Read-only

    Count Records

    Count the records of an Odoo model that match a domain filter. Returns a single integer. Use this to size a result set before paging through odoo_search_read_records.

    Inputs

    modelstringrequired
    Technical name of the Odoo model to operate on, with dots (for example res.partner, crm.lead, sale.order, account.move, product.product, project.task, hr.employee). Use odoo_get_model_fields to inspect a model.
    contextobject
    Optional context object passed to the ORM, for example {"lang": "fr_FR"} for translated values or {"active_test": false} to include archived records in searches.
    domainarray
    Odoo search domain: a list of [field, operator, value] conditions that are ANDed together, optionally using the prefix operators '|' (or), '&' (and) and '!' (not). Example: [["is_company", "=", true], ["name", "ilike", "deco"]]. Omit or pass [] to match every record.
    limitinteger
    Optional cap on the count; counting stops once this many matches are found, which is faster on very large tables.
  • odoo_get_model_fieldsDescribe the fields of an Odoo model: technical name, label, type, whether required or read-only, relation target and selection values.Read-only

    Get Model Fields

    Describe the fields of an Odoo model: technical name, label, type, whether required or read-only, relation target and selection values. Returns an object keyed by field name. Call this before creating or filtering on an unfamiliar model so field names and valid values are correct.

    Inputs

    modelstringrequired
    Technical name of the Odoo model to operate on, with dots (for example res.partner, crm.lead, sale.order, account.move, product.product, project.task, hr.employee). Use odoo_get_model_fields to inspect a model.
    attributesarray
    Optional list of field attributes to return for each field. Useful values are string, type, required, readonly, relation and selection. Omit for all attributes (large for big models).
    fieldsarray
    Optional list of field names to describe. Omit to describe every field of the model.
  • odoo_get_user_contextGet the context of the user that owns the API key, including their user ID (uid), language and timezone.Read-only

    Get Current User Context

    Get the context of the user that owns the API key, including their user ID (uid), language and timezone. Returns an object such as {"lang": "en_US", "tz": "Europe/Brussels", "uid": 2}. Use this to learn the authenticated user's ID, for example before assigning records to yourself.

    Inputs

    This tool takes no inputs.

  • odoo_list_contactsList contacts (customers, vendors, people and companies) from Odoo, optionally filtered by text or type.Read-only

    List Contacts

    List contacts (customers, vendors, people and companies) from Odoo, optionally filtered by text or type. Returns an array of partner records with id, name, email, phone, company flag and address fields. Use this to browse or find contacts. Use odoo_name_search_records when only an id and name are needed, and odoo_create_contact to add one.

    Inputs

    domainarray
    Optional extra Odoo domain ANDed with the other filters, for conditions not covered by the named filters. Example: [["create_date", ">=", "2025-01-01"]].
    fieldsarray
    List of field names to return per record. Defaults to ['name', 'email', 'phone', 'is_company', 'city', 'country_id', 'parent_id']. Use odoo_get_model_fields to discover other field names.
    is_companyboolean
    Set true to return only companies, false to return only individuals. Omit for both.
    limitinteger
    Maximum number of records to return. Defaults to 50 to keep responses small; raise it or page with offset for more.default 50
    offsetinteger
    Number of matching records to skip before returning results, used for paging together with limit.default 0
    orderstring
    Sort expression as comma-separated 'field asc|desc' terms, for example 'create_date desc' or 'name asc, id desc'. Omit for Odoo's default model order.
    searchstring
    Text to match case-insensitively against name, email or phone. Omit for no text filter.
  • odoo_list_employeesList employees from Odoo, optionally filtered by text.Read-only

    List Employees

    List employees from Odoo, optionally filtered by text. Returns an array of employee records with id, name, job title, work email, work phone and department. Requires the Employees app.

    Inputs

    domainarray
    Optional extra Odoo domain ANDed with the other filters, for conditions not covered by the named filters. Example: [["create_date", ">=", "2025-01-01"]].
    fieldsarray
    List of field names to return per record. Defaults to ['name', 'job_title', 'work_email', 'work_phone', 'department_id', 'parent_id']. Use odoo_get_model_fields to discover other field names.
    limitinteger
    Maximum number of records to return. Defaults to 50 to keep responses small; raise it or page with offset for more.default 50
    offsetinteger
    Number of matching records to skip before returning results, used for paging together with limit.default 0
    orderstring
    Sort expression as comma-separated 'field asc|desc' terms, for example 'create_date desc' or 'name asc, id desc'. Omit for Odoo's default model order.
    searchstring
    Text to match case-insensitively against employee name or work email. Omit for no text filter.
  • odoo_list_invoicesList customer invoices, vendor bills and credit notes from Odoo, optionally filtered by type, state, payment state or partner.Read-only

    List Invoices and Bills

    List customer invoices, vendor bills and credit notes from Odoo, optionally filtered by type, state, payment state or partner. Returns an array of journal entry records with id, number, partner, type, state, payment state, dates and total. Requires the Invoicing or Accounting app. Journal entries that are not invoices are excluded unless move_type is set to entry.

    Inputs

    domainarray
    Optional extra Odoo domain ANDed with the other filters, for conditions not covered by the named filters. Example: [["create_date", ">=", "2025-01-01"]].
    fieldsarray
    List of field names to return per record. Defaults to ['name', 'partner_id', 'move_type', 'state', 'payment_state', 'invoice_date', 'invoice_date_due', 'amount_total', 'currency_id']. Use odoo_get_model_fields to discover other field names.
    limitinteger
    Maximum number of records to return. Defaults to 50 to keep responses small; raise it or page with offset for more.default 50
    move_typestring
    Kind of document: out_invoice is a customer invoice, in_invoice a vendor bill, out_refund a customer credit note, in_refund a vendor credit note. Defaults to customer and vendor invoices and bills.one of out_invoicein_invoiceout_refundin_refundout_receiptin_receiptentry
    offsetinteger
    Number of matching records to skip before returning results, used for paging together with limit.default 0
    orderstring
    Sort expression as comma-separated 'field asc|desc' terms, for example 'create_date desc' or 'name asc, id desc'. Omit for Odoo's default model order.
    partner_idinteger
    Only return documents for this partner (res.partner ID). Find IDs with odoo_list_contacts.
    payment_statestring
    Filter by payment state: not_paid, in_payment, paid, partial or reversed. Omit for all.one of not_paidin_paymentpaidpartialreversed
    statestring
    Filter by posting state: draft, posted or cancel. Omit for all.one of draftpostedcancel
  • odoo_list_leadsList CRM leads and opportunities from Odoo, optionally filtered by text, type or probability.Read-only

    List CRM Leads and Opportunities

    List CRM leads and opportunities from Odoo, optionally filtered by text, type or probability. Returns an array of lead records with id, name, contact, email, expected revenue, probability, stage and salesperson. Requires the CRM app. Use this to browse the pipeline and odoo_create_lead to add one.

    Inputs

    domainarray
    Optional extra Odoo domain ANDed with the other filters, for conditions not covered by the named filters. Example: [["create_date", ">=", "2025-01-01"]].
    fieldsarray
    List of field names to return per record. Defaults to ['name', 'partner_id', 'email_from', 'phone', 'expected_revenue', 'probability', 'stage_id', 'user_id', 'type']. Use odoo_get_model_fields to discover other field names.
    limitinteger
    Maximum number of records to return. Defaults to 50 to keep responses small; raise it or page with offset for more.default 50
    offsetinteger
    Number of matching records to skip before returning results, used for paging together with limit.default 0
    orderstring
    Sort expression as comma-separated 'field asc|desc' terms, for example 'create_date desc' or 'name asc, id desc'. Omit for Odoo's default model order.
    searchstring
    Text to match case-insensitively against lead name, contact name or email. Omit for no text filter.
    typestring
    Restrict to raw leads or to opportunities. Omit for both.one of leadopportunity
  • odoo_list_productsList products and variants from Odoo, optionally filtered by text or sale availability.Read-only

    List Products

    List products and variants from Odoo, optionally filtered by text or sale availability. Returns an array of product records with id, name, internal reference, barcode, sales price and type. Use this to find product IDs for sales order or invoice lines.

    Inputs

    domainarray
    Optional extra Odoo domain ANDed with the other filters, for conditions not covered by the named filters. Example: [["create_date", ">=", "2025-01-01"]].
    fieldsarray
    List of field names to return per record. Defaults to ['name', 'default_code', 'barcode', 'list_price', 'standard_price', 'type']. Use odoo_get_model_fields to discover other field names.
    limitinteger
    Maximum number of records to return. Defaults to 50 to keep responses small; raise it or page with offset for more.default 50
    offsetinteger
    Number of matching records to skip before returning results, used for paging together with limit.default 0
    orderstring
    Sort expression as comma-separated 'field asc|desc' terms, for example 'create_date desc' or 'name asc, id desc'. Omit for Odoo's default model order.
    sale_okboolean
    Set true to return only products that can be sold, false for the rest. Omit for both.
    searchstring
    Text to match case-insensitively against product name, internal reference or barcode. Omit for no text filter.