grain
CleanAccess Grain meeting recordings, transcripts, AI notes, highlights, and views via the Grain Public API.
SKILL.md
---
name: grain
description: Access Grain meeting recordings, transcripts, AI notes, highlights, and views via the Grain Public API. Use when the user asks about their Grain meetings, wants to fetch a transcript, get AI meeting notes or action items, list recent recordings, browse views, or retrieve highlights. Triggers include phrases like "show my Grain recordings", "get the transcript from my last meeting", "what were the action items from my Grain meeting", "list my Grain views", "fetch meeting notes from Grain", or any request to read meeting data from Grain. Requires GRAIN_API_TOKEN to be configured.
metadata:
openclaw:
primaryEnv: GRAIN_API_TOKEN
requires:
env:
- GRAIN_API_TOKEN
---
# Grain Skill
Fetches meeting data from the Grain Public API using a Personal Access Token (PAT).
## What a PAT can access
A PAT acts as the user who generated it. It provides access to:
- Recordings that user can see (their own + shared with them)
- Transcripts and AI notes for those recordings
- Highlights and views the user has access to
It does **not** provide workspace-wide access (other members' private recordings, video files, admin data).
## Setup: Getting a PAT
Direct the user here if GRAIN_API_TOKEN is not configured:
1. Log into [grain.com](https://grain.com)
2. Click your profile/avatar → **Settings**
3. Go to the **API Access** section
4. Click **Generate** (or **Create token**) to create a Personal Access Token
5. Copy the token — it's only shown once
6. Share it with Polly: "here is my Grain token: <token>"
7. Polly will store it with `manage_skills(action="config", skill_name="grain", api_key="<token>")`
## Script
All API calls go through `scripts/grain_api.py` (stdlib only, no pip installs).
```bash
GRAIN_API_TOKEN="$GRAIN_API_TOKEN" python3 /home/polly/skills/user/grain/scripts/grain_api.py <command> [args]
```
## Commands
| Command | What it does |
|---------|-------------|
| `list-recordings [--limit N]` | List recent recordings (id + title) |
| `get-recording <id> [--transcript json\|vtt] [--notes json\|md\|text] [--sections "..."]` | Full recording detail with optional transcript and AI notes |
| `list-views [--type recordings\|highlights]` | List saved views |
| `get-transcript <id> [--format json\|vtt]` | Transcript only (default: vtt) |
| `get-notes <id> [--format json\|md\|text] [--sections "Action Items,Summary"]` | AI notes only (default: md) |
## Workflows
**List recent recordings**
```bash
... grain_api.py list-recordings --limit 10
```
Present as a numbered list with title and id.
**Get transcript**
1. If no id given, run `list-recordings` first
2. `get-transcript <id> --format vtt` → display as readable text
**Action items from last meeting**
1. `list-recordings --limit 1` → get id
2. `get-notes <id> --sections "Action Items"` → present cleanly
**Summarize a meeting**
1. `list-recordings --limit 1` → get id
2. `get-notes <id>` → summarize all sections
## Notes
- Pagination is handled automatically up to `--limit`
- Common intelligence notes sections: `Summary`, `Action Items`, `Key Moments`, `Next Steps` (varies by workspace config)
- If transcript/notes are `null`, the recording hasn't finished processing yet
- See `references/api.md` for full endpoint details
Version History
SHA-256 (latest)
7ac76e594b730994c5a770ad8b86ae0a147b7d228f4978a49e33cbab4efe42a2