Skip to content

feat(granola): add Granola meeting notes integration#3790

Merged
waleedlatif1 merged 4 commits intostagingfrom
waleedlatif1/add-granola-integration
Mar 26, 2026
Merged

feat(granola): add Granola meeting notes integration#3790
waleedlatif1 merged 4 commits intostagingfrom
waleedlatif1/add-granola-integration

Conversation

@waleedlatif1
Copy link
Collaborator

Summary

  • Add Granola integration with two tools: list notes and get note
  • Tools support date filtering, pagination, transcript inclusion, and full meeting metadata
  • Block with API key auth, operation dropdown, and advanced mode for optional filters
  • Icon, docs, and registry entries included

Type of Change

  • New feature

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)

@cursor
Copy link

cursor bot commented Mar 26, 2026

PR Summary

Medium Risk
Adds new external-API tooling and a new block wired into registries; main risk is incorrect request/response mapping or auth/header handling causing runtime failures rather than impacting existing integrations.

Overview
Adds a new Granola integration end-to-end: new tools granola_list_notes and granola_get_note that call Granola’s public API with API-key auth, supporting date filters/pagination and optional transcript retrieval.

Wires the integration into Sim via a new GranolaBlock (operation picker + advanced filters), registers it in the blocks/tools registries, and surfaces it in the landing/integrations data.

Updates docs to include a new granola tool page and adds GranolaIcon to both docs and Sim icon mappings.

Written by Cursor Bugbot for commit 3ce86b8. Configure here.

@vercel
Copy link

vercel bot commented Mar 26, 2026

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Mar 26, 2026 10:02pm

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 26, 2026

Greptile Summary

This PR adds a Granola meeting notes integration to Sim, introducing two tools (granola_list_notes and granola_get_note), a block definition, icon, docs, and all necessary registry entries. The implementation follows established patterns: user-only visibility on the API key, AuthMode.ApiKey on the block, snake_case-to-camelCase field mapping in transformResponse, and correct URL construction with URL + searchParams.

Two issues found:

  1. Likely pagination bug in list_notes.ts: data.hasMore is read in camelCase while every other field in the response transformation uses snake_case (created_at, updated_at, folder_membership, etc.). If the Granola API returns has_more, pagination will silently always return false.
  2. Incomplete block outputs: The block's outputs definition is missing several fields returned by the granola_get_note tool — ownerName, ownerEmail, createdAt, updatedAt, calendarEventId, scheduledStartTime, and scheduledEndTime — meaning these cannot be referenced in downstream Sim nodes.

Confidence Score: 3/5

Mostly safe but the pagination field name mismatch could silently break multi-page note retrieval.

The integration is well-structured and follows project conventions. However, the likely data.hasMore vs data.has_more field name mismatch in list_notes.ts would silently disable pagination — users requesting notes would only ever receive the first page with no indication there are more. The missing block outputs are a functional gap but not a data-loss risk.

apps/sim/tools/granola/list_notes.ts (pagination field name), apps/sim/blocks/blocks/granola.ts (missing outputs)

Important Files Changed

Filename Overview
apps/sim/tools/granola/list_notes.ts List notes tool with correct auth/URL building, but likely uses wrong data.hasMore field name (should be data.has_more) causing pagination to silently return false
apps/sim/tools/granola/get_note.ts Get note tool with well-structured response transformation, correct user-only visibility on API key, and consistent snake_case API field mapping
apps/sim/blocks/blocks/granola.ts Block definition with correct AuthMode.ApiKey and user-only visibility, but block outputs missing several get_note fields
apps/sim/tools/granola/types.ts Type definitions are well-formed with proper nullable types and match the tool response shapes
apps/sim/tools/registry.ts Both granola tools correctly registered in the tools registry
apps/sim/blocks/registry.ts GranolaBlock correctly imported and registered in the blocks registry
apps/docs/content/docs/en/tools/granola.mdx Comprehensive docs covering both tools with accurate input/output tables

Sequence Diagram

sequenceDiagram
    participant U as User/Agent
    participant B as GranolaBlock
    participant E as Sim Executor
    participant API as Granola API

    U->>B: Configure (apiKey, operation, filters)

    alt operation = list_notes
        B->>E: granola_list_notes(apiKey, createdAfter?, createdBefore?, updatedAfter?, cursor?, pageSize?)
        E->>API: GET /v1/notes?[filters] Authorization: Bearer apiKey
        API-->>E: { notes[], has_more, cursor }
        E-->>B: { notes[], hasMore, cursor }
        B-->>U: notes[], hasMore, cursor
    else operation = get_note
        B->>E: granola_get_note(apiKey, noteId, includeTranscript?)
        E->>API: GET /v1/notes/noteId Authorization: Bearer apiKey
        API-->>E: { id, title, owner, summary, attendees, calendar_event, transcript? }
        E-->>B: { id, title, summaryText, attendees, folders, calendarEventTitle, invitees, transcript? }
        B-->>U: note details
    end
Loading

Comments Outside Diff (2)

  1. apps/sim/tools/granola/list_notes.ts, line 703-704 (link)

    hasMore likely mismatches API response field name

    Every other field in the transformResponse uses snake_case to read from the API response (data.created_at, data.updated_at, data.folder_membership, data.calendar_event, data.summary_text, etc.), but the pagination fields are read as camelCase:

    hasMore: data.hasMore ?? false,
    cursor: data.cursor ?? null,

    If the Granola API returns has_more (snake_case) — consistent with all other response fields — then data.hasMore will always be undefined, causing the fallback false to be returned regardless of the actual API value. This would silently suppress pagination, making it impossible to retrieve more than the first page of notes.

    Please verify the exact field names in the Granola API response and update accordingly.

  2. apps/sim/blocks/blocks/granola.ts, line 368-388 (link)

    Several get_note tool outputs missing from block output definition

    The block's outputs definition omits several fields that the granola_get_note tool actually returns. Users of this block cannot reference these fields downstream in Sim workflows:

    • ownerName — note owner name
    • ownerEmail — note owner email
    • createdAt — creation timestamp
    • updatedAt — last update timestamp
    • calendarEventId — calendar event ID
    • scheduledStartTime — scheduled start time
    • scheduledEndTime — scheduled end time

    These are all present in get_note.ts's outputs definition and in GranolaGetNoteResponse. They should be added to the block's outputs to expose them to downstream blocks.

Reviews (2): Last reviewed commit: "fix(granola): use string comparison for ..." | Re-trigger Greptile

@waleedlatif1
Copy link
Collaborator Author

Re: Greptile's suggestion that data.hasMore should be data.has_more — this is actually correct as-is. The Granola OpenAPI spec (openapi.json) defines ListNotesOutput with hasMore (camelCase), not has_more. While the note-level fields use snake_case (created_at, updated_at), the pagination response fields are explicitly camelCase in their spec. No change needed.

The Bugbot issue about includeTranscript string truthiness is fixed in 3ce86b8.

@waleedlatif1
Copy link
Collaborator Author

@greptile

@waleedlatif1
Copy link
Collaborator Author

@cursor review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@waleedlatif1 waleedlatif1 merged commit 7a1a460 into staging Mar 26, 2026
2 of 3 checks passed
@waleedlatif1 waleedlatif1 deleted the waleedlatif1/add-granola-integration branch March 26, 2026 22:00
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