Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to ServiceM8

Scalekit connector
Open markdown

The ServiceM8 connector lets your AI agent act in each user's ServiceM8 account. Each user signs in to ServiceM8 once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 114 tools.

Tools
114
What they doRead · write · destructive
71 · 41 · 271 read41 write2 destructive
Users sign in with
OAuth app
Your own ServiceM8 app

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 ServiceM8 connection

    In AgentKit > Connections, create a ServiceM8 connection and copy its redirect URI. The name you give it is the connection_name your code passes. See Configure connections.

  4. Register an OAuth app

    ServiceM8 connections use your own OAuth app. Register one with ServiceM8 and add the redirect URI you copied.

    Then enter the app's Client ID and Client Secret on the ServiceM8 connection.

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

    Each user signs in once. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool
  • servicem8_get_assetGet one Asset from ServiceM8 by UUID.Read-only

    Retrieve an Asset

    Get one Asset from ServiceM8 by UUID. Returns the Asset record with fields such as uuid, active, edit_date, company_uuid, asset_code. Use when you already have the UUID. Use the matching list tool to find records or filter. Prerequisite: get the UUID from the matching list tool. Requires the read_assets OAuth scope.

    Inputs

    asset_uuidstringrequired
    UUID of the Asset. Get UUIDs from the matching list tool.
  • servicem8_get_asset_typeGet one Asset Type from ServiceM8 by UUID.Read-only

    Retrieve an Asset Type

    Get one Asset Type from ServiceM8 by UUID. Returns the Asset Type record with fields such as uuid, active, edit_date, name. Use when you already have the UUID. Use the matching list tool to find records or filter. Prerequisite: get the UUID from the matching list tool. Requires the read_assets OAuth scope.

    Inputs

    asset_type_uuidstringrequired
    UUID of the Asset Type. Get UUIDs from the matching list tool.
  • servicem8_get_attachmentGet one Attachment from ServiceM8 by UUID.Read-only

    Retrieve an Attachment

    Get one Attachment from ServiceM8 by UUID. Returns the Attachment record with fields such as related_object, related_object_uuid, attachment_name, file_type, attachment_source. Use when you already have the UUID. Use the matching list tool to find records or filter. Prerequisite: get the UUID from the matching list tool. Requires the read_attachments OAuth scope.

    Inputs

    attachment_uuidstringrequired
    UUID of the Attachment. Get UUIDs from the matching list tool.
  • servicem8_get_badgeGet one Badge from ServiceM8 by UUID.Read-only

    Retrieve a Badge

    Get one Badge from ServiceM8 by UUID. Returns the Badge record with fields such as uuid, active, edit_date, name, automatically_allocated. Use when you already have the UUID. Use the matching list tool to find records or filter. Prerequisite: get the UUID from the matching list tool. Requires the read_badges OAuth scope.

    Inputs

    badge_uuidstringrequired
    UUID of the Badge. Get UUIDs from the matching list tool.
  • servicem8_get_categoryGet one Category from ServiceM8 by UUID.Read-only

    Retrieve a Category

    Get one Category from ServiceM8 by UUID. Returns the Category record with fields such as name, colour, uuid, active, edit_date. Use when you already have the UUID. Use the matching list tool to find records or filter. Prerequisite: get the UUID from the matching list tool. Requires the read_job_categories OAuth scope.

    Inputs

    category_uuidstringrequired
    UUID of the Category. Get UUIDs from the matching list tool.
  • servicem8_get_clientGet one Client from ServiceM8 by UUID.Read-only

    Retrieve a Client

    Get one Client from ServiceM8 by UUID. Returns the Client record with fields such as name, abn_number, address, billing_address, is_individual. Use when you already have the UUID. Use the matching list tool to find records or filter. Prerequisite: get the UUID from the matching list tool. Requires the read_customers OAuth scope.

    Inputs

    client_uuidstringrequired
    UUID of the Client. Get UUIDs from the matching list tool.
  • servicem8_get_company_contactGet one Company Contact from ServiceM8 by UUID.Read-only

    Retrieve a Company Contact

    Get one Company Contact from ServiceM8 by UUID. Returns the Company Contact record with fields such as company_uuid, first, last, phone, mobile. Use when you already have the UUID. Use the matching list tool to find records or filter. Prerequisite: get the UUID from the matching list tool. Requires the read_customer_contacts OAuth scope.

    Inputs

    company_contact_uuidstringrequired
    UUID of the Company Contact. Get UUIDs from the matching list tool.
  • servicem8_get_document_templateGet one Document Template from ServiceM8 by UUID.Read-only

    Retrieve a Document Template

    Get one Document Template from ServiceM8 by UUID. Returns the Document Template record with fields such as uuid, active, edit_date, template_type, related_object. Use when you already have the UUID. Use the matching list tool to find records or filter. Prerequisite: get the UUID from the matching list tool. Requires the read_templates OAuth scope.

    Inputs

    document_template_uuidstringrequired
    UUID of the Document Template. Get UUIDs from the matching list tool.