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
- Access token
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. 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>Create the Grain connection
In AgentKit > Connections, create a Grain connection. The name you give it is the
connection_nameyour code passes. See Configure connections.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.actionsconst connector = 'grain'const identifier = 'user_123'// Generate an authorization link for the userconst { 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 callconst result = await actions.executeTool({connector,identifier,toolName: 'grain_hooks_list',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "grain"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize Grain:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="grain_hooks_list",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach 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 toexecute_toolgrain_hooks_listList the webhooks (hooks) registered on the Grain workspace, optionally filtered by event type or enabled/disabled state.Read-onlyList 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-onlyList 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-onlyDownload 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-onlyGet 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-onlyGet 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-onlyGet 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
txtvttsrtdefaulttxt 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-onlyList 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-onlyList 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.
grain_users_listList the users in the Grain workspace, with their id, name, and email.Read-onlyList Workspace Users
List the users in the Grain workspace, with their id, name, and email. Use this to resolve user ids needed by other tools such as grain_recording_share_user or grain_recording_upload_url_create.
Inputs
This tool takes no inputs.
grain_hook_createRegister a webhook (hook) that Grain calls with an HTTP POST whenever the given event type occurs — new/updated/deleted recordings, highlights, or stories, or upload processing status changes.WriteCreate Webhook
Register a webhook (hook) that Grain calls with an HTTP POST whenever the given event type occurs — new/updated/deleted recordings, highlights, or stories, or upload processing status changes.
Inputs
hook_typestringrequired- The event type this webhook subscribes to.one of
recording_addedrecording_updatedrecording_deletedhighlight_addedhighlight_updatedhighlight_deletedstory_addedstory_updatedstory_deletedupload_status hook_urlstringrequired- HTTPS URL that Grain will POST event payloads to.
grain_recording_tag_addAdd a tag to a Grain recording, for later filtering and organization.WriteAdd Recording Tag
Add a tag to a Grain recording, for later filtering and organization.
- Idempotent
Inputs
recording_idstringrequired- UUID of the recording to tag.
tagstringrequired- Tag to add. Must start with a letter or digit and contain only letters, digits, and hyphens.
grain_recording_updateUpdate a Grain recording's title.WriteUpdate Recording
Update a Grain recording's title.
- Idempotent
Inputs
recording_idstringrequired- UUID of the recording to update.
titlestringrequired- New title for the recording.
grain_recording_upload_url_createGenerate a one-time upload URL for adding a new recording to Grain.WriteCreate Recording Upload URL
Generate a one-time upload URL for adding a new recording to Grain. After calling this, PUT the raw file bytes (.mov, .mp4, .mp3, or .m4a) to the returned url; Grain processes the file asynchronously and reports progress via 'upload_status' webhooks.
Inputs
filenamestringrequired- Name of the file to upload, including its extension. Supported extensions: .mov, .mp4, .mp3, .m4a.
user_idstring- UUID of the workspace user who should own the uploaded recording. Required when authenticating with a Workspace Access Token; not used with a Personal Access Token. Use grain_users_list to discover user ids.
grain_hook_deleteDelete a registered Grain webhook so it stops receiving event calls.DestructiveDelete Webhook
Delete a registered Grain webhook so it stops receiving event calls.
- Idempotent
Inputs
hook_idstringrequired- UUID of the webhook to delete. Use grain_hooks_list to discover hook ids.
grain_recording_tag_removeRemove a tag from a Grain recording.DestructiveRemove Recording Tag
Remove a tag from a Grain recording.
- Idempotent
Inputs
recording_idstringrequired- UUID of the recording to remove the tag from.
tagstringrequired- Exact tag name to remove.
No tools match.