Skip to content

fix(granola): align get_note with real API spec#5467

Merged
waleedlatif1 merged 1 commit into
stagingfrom
granola-validate
Jul 7, 2026
Merged

fix(granola): align get_note with real API spec#5467
waleedlatif1 merged 1 commit into
stagingfrom
granola-validate

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Ran a full /validate-integration pass on Granola against the official OpenAPI spec (docs.granola.ai)
  • Confirmed we cover all 3 public Granola API endpoints (list_notes, get_note, list_folders) — no gaps
  • Fixed webUrl in get_note to be a required non-nullable string per spec (was modeled as optional/nullable)
  • Added missing speakerName field to transcript entries (resolved speaker name, present in the API but previously dropped)

Type of Change

  • Bug fix

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 7, 2026 3:01pm

Request Review

@cursor

cursor Bot commented Jul 7, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Narrow integration schema/mapping fix for Granola get_note with no auth or core platform changes; consumers that assumed nullable webUrl may see '' instead of null.

Overview
Aligns Granola Get Note with the official API: webUrl is now a required string (empty string when missing) instead of optional/nullable, and transcript segments expose speakerName from speaker.name, which was previously dropped.

Block output docs, tool outputs, response types, and the transform in get_note are updated so workflows and LLM tool schemas match the real response shape.

Reviewed by Cursor Bugbot for commit 25f3b8b. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR tightens the Granola get_note tool to match the official Granola OpenAPI spec: webUrl is now a required non-nullable string (was string | null), and the previously-dropped speakerName field is now extracted from each transcript entry's speaker.name property.

  • webUrl is changed from ?? null to ?? '' in the transform, the TypeScript interface is narrowed to string, and the optional: true marker is removed from the output descriptor — three-way consistent.
  • speakerName: string | null is added to both the runtime transform (t.speaker?.name ?? null) and the TypeScript interface, mirroring the existing speakerLabel pattern.
  • The block-level transcript output description is updated to mention the new field.

Confidence Score: 5/5

Safe to merge — the changes are a narrow, well-scoped alignment with the external API spec with no logic changes that could affect existing callers negatively.

The three changed files are fully consistent: the runtime transform, the TypeScript interface, and the output descriptor all agree on the new shape. The webUrl fallback switches from null to an empty string, which is a no-worse default for a field the API guarantees is present. speakerName is additive and optional, so downstream consumers that don't use it are unaffected.

No files require special attention.

Important Files Changed

Filename Overview
apps/sim/tools/granola/get_note.ts Core fix file: changes webUrl fallback from null to empty string, adds speakerName field extraction from speaker.name, and removes the optional marker from webUrl's output descriptor — all consistent with the stated API spec alignment.
apps/sim/tools/granola/types.ts Type change: webUrl narrowed from string
apps/sim/blocks/blocks/granola.ts Documentation-only update: adds speakerName to the transcript output description string to reflect the newly exposed field.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant Client
    participant getNoteTool
    participant GranolaAPI

    Client->>getNoteTool: "{ noteId, apiKey, includeTranscript }"
    getNoteTool->>GranolaAPI: "GET /v1/notes/:id[?include=transcript]"
    GranolaAPI-->>getNoteTool: "{ id, web_url, transcript: [{ speaker: { source, diarization_label, name }, text, ... }], ... }"
    Note over getNoteTool: web_url ?? '' (required string)<br/>speaker.name ?? null (speakerName)
    getNoteTool-->>Client: "{ webUrl: string, transcript: [{ speaker, speakerLabel, speakerName, text, ... }] | null }"
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant Client
    participant getNoteTool
    participant GranolaAPI

    Client->>getNoteTool: "{ noteId, apiKey, includeTranscript }"
    getNoteTool->>GranolaAPI: "GET /v1/notes/:id[?include=transcript]"
    GranolaAPI-->>getNoteTool: "{ id, web_url, transcript: [{ speaker: { source, diarization_label, name }, text, ... }], ... }"
    Note over getNoteTool: web_url ?? '' (required string)<br/>speaker.name ?? null (speakerName)
    getNoteTool-->>Client: "{ webUrl: string, transcript: [{ speaker, speakerLabel, speakerName, text, ... }] | null }"
Loading

Reviews (1): Last reviewed commit: "fix(granola): align get_note with real A..." | Re-trigger Greptile

@waleedlatif1 waleedlatif1 merged commit e5b9432 into staging Jul 7, 2026
13 checks passed
@waleedlatif1 waleedlatif1 deleted the granola-validate branch July 7, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant