Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Grain

Scalekit connector
Open markdown

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

Tools
19
What they doRead · write · destructive
9 · 6 · 49 read6 write4 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 Grain connection

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

    Each user opens the link once and enters their Grain 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
  • grain_hooks_listList the webhooks (hooks) registered on the Grain workspace, optionally filtered by event type or enabled/disabled state.Read-only

    List Webhooks

    List the webhooks (hooks) registered on the Grain workspace, optionally filtered by event type or enabled/disabled state.

    Inputs

    hook_typestring
    Only return webhooks subscribed to this event type.one of recording_addedrecording_updatedrecording_deletedhighlight_addedhighlight_updatedhighlight_deletedstory_addedstory_updatedstory_deletedupload_status
    statestring
    Only return webhooks in this state.one of enableddisabled
  • grain_meeting_types_listList the meeting types configured in the Grain workspace, with their id, name, and scope (internal or external).Read-only

    List Meeting Types

    List the meeting types configured in the Grain workspace, with their id, name, and scope (internal or external). Use this to resolve meeting type ids needed by grain_recordings_list.

    Inputs

    This tool takes no inputs.

  • grain_recording_downloadDownload the underlying media file for a Grain recording (video/mp4 or audio/mp3, depending on the recording's media_type).Read-only

    Download Recording

    Download the underlying media file for a Grain recording (video/mp4 or audio/mp3, depending on the recording's media_type).

    Inputs

    recording_idstringrequired
    UUID of the recording to download.
  • grain_recording_getGet a single Grain recording by id, with optional inclusion of highlights, participants, AI summary/action items, private notes, calendar event, HubSpot links, and screenshares.Read-only

    Get Recording

    Get a single Grain recording by id, with optional inclusion of highlights, participants, AI summary/action items, private notes, calendar event, HubSpot links, and screenshares.

    Inputs

    recording_idstringrequired
    UUID of the recording to fetch. Use grain_recordings_list to discover recording ids.
    include_ai_action_itemsboolean
    Include AI-detected action items in the response.
    include_ai_summaryboolean
    Include the AI-generated meeting summary in the response.
    include_calendar_eventboolean
    Include the linked calendar event details in the response.
    include_highlightsboolean
    Include the recording's highlights in the response.
    include_hubspotboolean
    Include linked HubSpot company and deal ids in the response.
    include_participantsboolean
    Include the recording's participant list in the response.
    include_private_notesboolean
    Personal Access Token only. Include the caller's private notes on the recording.
    include_screensharesboolean
    Include screenshare timing segments in the response.
  • grain_recording_transcript_getGet the structured JSON transcript of a Grain recording: an array of segments, each with a start/end timestamp (ms), the spoken text, and the speaker's name and participant id.Read-only

    Get Recording Transcript (JSON)

    Get the structured JSON transcript of a Grain recording: an array of segments, each with a start/end timestamp (ms), the spoken text, and the speaker's name and participant id.

    Inputs

    recording_idstringrequired
    UUID of the recording whose transcript should be fetched.
  • grain_recording_transcript_text_getGet a Grain recording's transcript as plain text, WebVTT, or SRT — ready to display or feed into subtitle/captioning tools, instead of the structured JSON segments returned by grain_recording_transcript_get.Read-only

    Get Recording Transcript (Text Format)

    Get a Grain recording's transcript as plain text, WebVTT, or SRT — ready to display or feed into subtitle/captioning tools, instead of the structured JSON segments returned by grain_recording_transcript_get.

    Inputs

    formatstringrequired
    Text format to return: 'txt' (speaker name + text per line), 'vtt' (WebVTT), or 'srt' (SubRip subtitles).one of txtvttsrtdefault txt
    recording_idstringrequired
    UUID of the recording whose transcript should be fetched.
  • grain_recordings_listList meeting recordings in the Grain workspace (or, with a Personal Access Token, the caller's own recordings).Read-only

    List Recordings

    List meeting recordings in the Grain workspace (or, with a Personal Access Token, the caller's own recordings). Supports filtering by date range, title search, team, meeting type, attendance, and participant scope, plus optional inclusion of highlights, participants, AI summary/action items, and more. Returns a page of recordings and a cursor for the next page.

    Inputs

    after_datetimestring
    Only return recordings whose start_datetime is after this ISO8601 timestamp (inclusive).
    attendancestring
    Personal Access Token only. 'hosted' returns only recordings the caller hosted; 'attended' returns only recordings the caller attended.one of hostedattended
    before_datetimestring
    Only return recordings whose start_datetime is before this ISO8601 timestamp (exclusive).
    cursorstring
    Pagination cursor from a previous response's cursor field, used to fetch the next page.
    include_ai_action_itemsboolean
    Include AI-detected action items in the response.
    include_ai_summaryboolean
    Include the AI-generated meeting summary in the response.
    include_calendar_eventboolean
    Include the linked calendar event details in the response.
    include_highlightsboolean
    Include each recording's highlights in the response.
    include_hubspotboolean
    Include linked HubSpot company and deal ids in the response.
    include_participantsboolean
    Include each recording's participant list in the response.
    include_private_notesboolean
    Personal Access Token only. Include the caller's private notes on each recording.
    include_screensharesboolean
    Include screenshare timing segments in the response.
    meeting_type_idstring
    Only return recordings matching this meeting type id (UUID). Use grain_meeting_types_list to discover meeting type ids.
    participant_scopestring
    'internal' returns only internal/team meetings; 'external' returns only external/customer meetings.one of internalexternal
    team_idstring
    Only return recordings belonging to this team id (UUID). Use grain_teams_list to discover team ids.
    title_searchstring
    Return recordings whose title matches this search string.
  • grain_teams_listList the teams configured in the Grain workspace, with their id and name.Read-only

    List Teams

    List the teams configured in the Grain workspace, with their id and name. Use this to resolve team ids needed by other tools such as grain_recording_share_team or grain_recordings_list.

    Inputs

    This tool takes no inputs.