feat(grain): migrate to v2 API, add get-transcript and list-recordings actions - #21865
feat(grain): migrate to v2 API, add get-transcript and list-recordings actions#21865howleysv wants to merge 3 commits into
Conversation
…s actions Migrate all components from the legacy v1 public API to v2 (api.grain.com/_/public-api/v2, Public-Api-Version: 2025-10-31): - Get Recording: replace transcript/intelligence-notes format props with v2 include options (highlights, participants, AI action items, AI summary, calendar event, HubSpot, screenshares); major bump to 1.0.0 - New Recording (Instant): subscribe via v2 hook_type instead of the removed views resource, add include props; major bump to 1.0.0 - Remove the eight other sources (updated/removed recordings, highlights, stories) — existing deployments stay pinned to their published versions - Add Get Transcript action (json/txt/vtt/srt formats) - Add List Recordings action with v2 recording filters - Guard webhook deactivate when no hook ID is stored; emit native recording ID for stable dedupe
- Default prevContext safely in recordingId options loader - Add min: 1 constraint to maxResults in list-recordings - Use recording end_datetime for emitted event timestamp, falling back to Date.now() when unavailable - Expand action descriptions with agent guidance and cross-tool references
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified. |
|
Thanks for submitting this PR! When we review PRs, we follow the Pipedream component guidelines. If you're not familiar, here's a quick checklist:
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (26)
💤 Files with no reviewable changes (17)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe Grain integration now uses Public API v2. It adds recording listing and transcript actions, supports optional recording data, updates recording webhooks, and removes obsolete view-based source components and fixtures. ChangesGrain API v2 integration
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to The PR is merge-ready after normal checks and review; no actionable merge-blocking risk remains. Sequence Diagram(s)sequenceDiagram
participant Action
participant GrainApp
participant GrainAPI
Action->>GrainApp: request recording, transcript, or recording list
GrainApp->>GrainAPI: send Public API v2 request
GrainAPI-->>GrainApp: return requested data
GrainApp-->>Action: return response and summary
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 8 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
| description: "Fetches a specific recording by its ID from Grain, returning its metadata (title, times, URL, tags, teams, meeting type)." | ||
| + " Enable the optional include props to add highlights, participants, AI action items, AI summary, calendar event, HubSpot data, or screenshares to the response." | ||
| + " Use **List Recordings** to find recording IDs, and **Get Transcript** to fetch the full transcript." | ||
| + " [See the documentation](https://developers.grain.com)", |
There was a problem hiding this comment.
| + " [See the documentation](https://developers.grain.com)", | |
| + " [See the documentation](https://developers.grain.com/#get-recording)", |
| + " The `json` format returns structured segments with speaker, participant ID, start/end times in milliseconds, and text;" | ||
| + " `txt`, `vtt`, and `srt` return plain text or subtitle formats." | ||
| + " Use **List Recordings** to find recording IDs; use **Get Recording** for the recording's metadata instead of its transcript." | ||
| + " [See the documentation](https://developers.grain.com)", |
There was a problem hiding this comment.
| + " [See the documentation](https://developers.grain.com)", | |
| + " [See the documentation](https://developers.grain.com/#get-recording-transcript-json)", |
| description: "Lists Grain recordings, optionally filtered by start datetime range (ISO8601), title search, or participant scope." | ||
| + " Automatically paginates and returns up to Max Results recordings." | ||
| + " Use this to find recording IDs for **Get Recording** and **Get Transcript**." | ||
| + " [See the documentation](https://developers.grain.com)", |
There was a problem hiding this comment.
| + " [See the documentation](https://developers.grain.com)", | |
| + " [See the documentation](hhttps://developers.grain.com/#list-recordings)", |
| export default { | ||
| ...common, | ||
| key: "grain-new-highlight-instant", | ||
| name: "New Highlight (Instant)", |
There was a problem hiding this comment.
It looks like this and the other deleted sources can be implemented in v2.
https://developers.grain.com/#create-hook
| name: "New Recording (Instant)", | ||
| description: "Emit new event when a recording that matches the filter is added.", | ||
| version: "0.0.1", | ||
| description: "Emit new event when a recording is added. [See the documentation](https://developers.grain.com)", |
There was a problem hiding this comment.
| description: "Emit new event when a recording is added. [See the documentation](https://developers.grain.com)", | |
| description: "Emit new event when a recording is added. [See the documentation](https://developers.grain.com/#create-hook)", |
Clone of #21855 with "Allow edits by maintainers"
Summary
Migrates the Grain integration from the legacy v1 public API to the v2 public API (
https://api.grain.com/_/public-api/v2, requiredPublic-Api-Version: 2025-10-31header). Grain's v1 API is deprecated and will be sunset. See the documentation.Auth is unchanged — Grain's OAuth endpoints are unversioned and v2 accepts the same bearer tokens, so existing connected accounts continue to work without any app-config changes.
Changes
grain.app.mjs: new v2 base URL and version header; list/get recording moved to v2POSTendpoints withfilter/includebodies; webhook creation moved toPOST /hooks/createwithhook_type(the v1viewsresource no longer exists in v2); sharedpropDefinitionsfor the recording include options.1.0.0, major — props removed/renamed): v1transcript_format/intelligence_notes_format/allowed_intelligence_notesprops replaced with v2 include options (highlights, participants, AI action items, AI summary, calendar event, HubSpot data, screenshares).1.0.0, major —viewIdprop removed): subscribes viahook_type: recording_addedwith optional include props; test event updated to the v2 payload. Also guardsdeactivate()when no hook ID was stored, and emits the recording's native ID for stable deduplication.0.0.1): fetches a recording's transcript injson,txt,vtt, orsrtformat.0.0.1): lists recordings with v2 filters (date range, title search, participant scope) and cursor pagination.components/grain/package.jsonbumped0.1.0→1.0.0(major, matching the largest component change).Checklist
Please check the following items before your PR can be reviewed:
Versioning
0.0.1for new ones)package.json's version updatedNew app
If this is a new app, please submit an app integration request - the PR will only be reviewed after the app is integrated.
CodeRabbit review
After the PR is opened, and if new changes are pushed, CodeRabbit will automatically review it. Do not 'mark as resolved' CodeRabbit's comments, but reply to them instead, whether you agree (and update the PR accordingly) or disagree.
Summary by CodeRabbit
New Features
Changes