Skip to content

Commit af4e6c6

Browse files
committed
fix(granola): restore correct calendar_event field names (event_title/organiser/calendar_event_id/scheduled_start_time/scheduled_end_time/invitees)
1 parent ddfc28f commit af4e6c6

5 files changed

Lines changed: 36 additions & 19 deletions

File tree

apps/docs/content/docs/en/tools/granola.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,11 @@ Retrieves a specific meeting note from Granola by ID, including summary, attende
8080
|`id` | string | Folder ID |
8181
|`name` | string | Folder name |
8282
| `calendarEventTitle` | string | Calendar event title |
83+
| `calendarOrganiser` | string | Calendar event organiser email |
8384
| `calendarEventId` | string | Calendar event ID |
84-
| `startTime` | string | Calendar event start time |
85-
| `endTime` | string | Calendar event end time |
85+
| `scheduledStartTime` | string | Scheduled start time |
86+
| `scheduledEndTime` | string | Scheduled end time |
87+
| `invitees` | json | Calendar event invitee emails |
8688
| `transcript` | json | Meeting transcript entries \(only if requested\) |
8789
|`speaker` | string | Speaker source \(microphone or speaker\) |
8890
|`text` | string | Transcript text |

apps/sim/blocks/blocks/granola.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,11 @@ export const GranolaBlock: BlockConfig = {
166166
attendees: { type: 'json', description: 'Meeting attendees (name, email)' },
167167
folders: { type: 'json', description: 'Folders the note belongs to (id, name)' },
168168
calendarEventTitle: { type: 'string', description: 'Calendar event title' },
169+
calendarOrganiser: { type: 'string', description: 'Calendar event organiser email' },
169170
calendarEventId: { type: 'string', description: 'Calendar event ID' },
170-
startTime: { type: 'string', description: 'Calendar event start time' },
171-
endTime: { type: 'string', description: 'Calendar event end time' },
171+
scheduledStartTime: { type: 'string', description: 'Scheduled start time' },
172+
scheduledEndTime: { type: 'string', description: 'Scheduled end time' },
173+
invitees: { type: 'json', description: 'Calendar event invitee emails' },
172174
transcript: {
173175
type: 'json',
174176
description: 'Meeting transcript entries (speaker, text, startTime, endTime)',

apps/sim/connectors/granola/granola.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,15 @@ interface GranolaFolderMembership {
4444

4545
/**
4646
* Calendar event details attached to a note, when available.
47+
* Field names match the Granola API's CalendarEvent schema.
4748
*/
4849
interface GranolaCalendarEvent {
49-
id?: string
50-
title?: string | null
51-
start_time?: string | null
52-
end_time?: string | null
50+
event_title?: string | null
51+
organiser?: string | null
52+
calendar_event_id?: string | null
53+
scheduled_start_time?: string | null
54+
scheduled_end_time?: string | null
55+
invitees?: { email: string }[]
5356
}
5457

5558
/**
@@ -305,8 +308,8 @@ export const granolaConnector: ConnectorConfig = {
305308

306309
const attendees = collectAttendees(note)
307310
const folders = collectFolders(note)
308-
const meeting = note.calendar_event?.title?.trim() || undefined
309-
const meetingDate = note.calendar_event?.start_time?.trim() || undefined
311+
const meeting = note.calendar_event?.event_title?.trim() || undefined
312+
const meetingDate = note.calendar_event?.scheduled_start_time?.trim() || undefined
310313

311314
return {
312315
externalId: note.id,

apps/sim/tools/granola/get_note.ts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,12 @@ export const getNoteTool: ToolConfig<GranolaGetNoteParams, GranolaGetNoteRespons
7070
id: f.id ?? '',
7171
name: f.name ?? '',
7272
})),
73-
calendarEventTitle: data.calendar_event?.title ?? null,
74-
calendarEventId: data.calendar_event?.id ?? null,
75-
startTime: data.calendar_event?.start_time ?? null,
76-
endTime: data.calendar_event?.end_time ?? null,
73+
calendarEventTitle: data.calendar_event?.event_title ?? null,
74+
calendarOrganiser: data.calendar_event?.organiser ?? null,
75+
calendarEventId: data.calendar_event?.calendar_event_id ?? null,
76+
scheduledStartTime: data.calendar_event?.scheduled_start_time ?? null,
77+
scheduledEndTime: data.calendar_event?.scheduled_end_time ?? null,
78+
invitees: (data.calendar_event?.invitees ?? []).map((i: { email: string }) => i.email),
7779
transcript: data.transcript
7880
? data.transcript.map(
7981
(t: {
@@ -128,13 +130,19 @@ export const getNoteTool: ToolConfig<GranolaGetNoteParams, GranolaGetNoteRespons
128130
description: 'Calendar event title',
129131
optional: true,
130132
},
133+
calendarOrganiser: {
134+
type: 'string',
135+
description: 'Calendar event organiser email',
136+
optional: true,
137+
},
131138
calendarEventId: { type: 'string', description: 'Calendar event ID', optional: true },
132-
startTime: {
139+
scheduledStartTime: {
133140
type: 'string',
134-
description: 'Calendar event start time',
141+
description: 'Scheduled start time',
135142
optional: true,
136143
},
137-
endTime: { type: 'string', description: 'Calendar event end time', optional: true },
144+
scheduledEndTime: { type: 'string', description: 'Scheduled end time', optional: true },
145+
invitees: { type: 'json', description: 'Calendar event invitee emails' },
138146
transcript: {
139147
type: 'json',
140148
description: 'Meeting transcript entries (only if requested)',

apps/sim/tools/granola/types.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@ export interface GranolaGetNoteResponse extends ToolResponse {
4545
attendees: { name: string | null; email: string }[]
4646
folders: { id: string; name: string }[]
4747
calendarEventTitle: string | null
48+
calendarOrganiser: string | null
4849
calendarEventId: string | null
49-
startTime: string | null
50-
endTime: string | null
50+
scheduledStartTime: string | null
51+
scheduledEndTime: string | null
52+
invitees: string[]
5153
transcript: { speaker: string; text: string; startTime: string; endTime: string }[] | null
5254
}
5355
}

0 commit comments

Comments
 (0)